Now, it's finally here. Our series with the Smarthome Central can continue. After the first Version had a very simple GUI, I decided to program the entire Display, and for ease of use in a library (AT_Display.h) outsource. So the application Code remains uncluttered.
The new user interface allows full configurability of the display of Measured value. There are entry forms by name, color, and size of the Widgets set. Because has not shown that the double-click on the touch screen always works, and since each double-click event to trigger a simple click of a button, I used, instead, for special functions, the long press (>3s). The design of the forms, as well as the display styles könnenb clearly visible in a header file AT_Layout.h can be adjusted. Two more header files AT_LanguageGE.h and AT_LanguageEN.h to contain the Definition of all Message texts, and thus allow for a language adaptation. The corresponding #include Statement at the beginning of the header file AT_Display.h .
The example sketch for the new Version is now SmartHomeV2 or asl want to use more new for those the the ESP8266 to the example sketch SmartHomeV2_8266. I would, however, prefer the use of the ESP32, as with the ESP8266, the memory for local variables is very scarce. Tests have shown that the application crashing under certain circumstances due to Stack problems, which leads to a restart by the Watchdog.
After Turning on appears on page 1 of the measuring value display with Widgets, depending on configuration. A click on the switch Widget (green in the picture) will toggle its value, and the Change to the remote device. If you click more than 3 seconds on a Widget the configuration page for this Widget.
In this form, we can set the label, the appearance and the Position of the Widgets. The name is the Text above or to the left of the measured value. If you click on the input area, an on-screen keyboard and you can change the Text. With the entry right, the entry is completed and the Text button at the bottom.
The size of the Widgets can have four different values.
- small size: single-spaced, with name to the left of the value
- on the left: two lines and a half in width, with a label above
- right: same as left but on the right half of the
- large: two rows with label above and a larger font.
If you click on the input area, a list with four options will appear. Just click one of the options, click to select it.
The Background color can also be set. If you click on the color box to the right, a color selection Dialog will be displayed. To choose the desired color by Clicking and completes the entry with the Finish Button.
In the same way you can set the background color of an active switch and the font color. The number of decimal places specify the number of digits after the decimal point. A click on the input field to open the number entry.
This works the same as the text keyboard.
With entering the Number the page can be chosen to be displayed in the Widget. When using the ESP32 32 pages available for the ESP8266 from memory only 8 reasons. Between the sides will be switched by Swiping.
The last entry field is for the Position of the Widgets on the page. In the case of small single-line Widgets, the line number, it is easy, starting with 0. In the case of the half-width of the Widgets is to take two rows for the left, the lower the line number, and the rights of the higher Widget. The large Widgets occupy the two lines, therefore, can not be used in this case, the second line. The maximum line number is 7.
With the Buttons at the very bottom you can Save the Changes, or without saving, cancel. The Widget can also be deleted. The Button has no function. He will later adjust font colors are used depending on the measured value.
If you click on the main page, the bottom blue bar will appear the list of devices.
For the ESP32 32 for the ESP8266 16. The rest of the pages you reach by Swiping. If you click on a device so you can change its name.
Here, too, the Change can be saved via the Save Button. Click the Details Button shows a list of all the channels of this device. When ESP32 there are a maximum of 8 for the ESP8266 to a maximum of 4. Active channels are highlighted in yellow.
If you click on a channel, the configuration window is opened for the corresponding Widget.
The registration of a new device is the same as the old Version. A new device is discovered, its ID or MAC address is displayed in the lower blue bar. You make a long click on the bottom blue bar, so the device is registered and the name dialog for the new device appear, so it is to him assign a name can be
a Lot of fun with the new Version. External devices continue to function without any necessary Changes.