New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
Moderators: leecollings, remb0
-
- Posts: 36
- Joined: Wednesday 13 September 2017 15:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V3.8153
- Location: Chicago
- Contact:
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
Thank you for prompt response. Even if I hardcoded SSID "strcpy(global_config.wifiSSID, "RpiNet");" in main.cpp the serial monitor says "
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:184
load:0x40078000,len:12732
ho 0 tail 12 room 4
load:0x40080400,len:2908
entry 0x400805c4
Starting application
Config version: 3
Starting calibration
Calibration coef: -0.1 , 0.1
Calibration offset: 238.1 , -19.4
Display buffer size: 7680 bytes
Screen init done
Brightness value: 255
Wifi connecting to SSID: SalesZoom
WiFi Status: Disconnected
WiFi Status: Disconnected
WiFi Status: Disconnected
WiFi Status: Disconnected
WiFi Status: Disconnected
WiFi Status: Disconnected
WiFi Status: Disconnected
WiFi Status: Disconnected
WiFi Status: Disconnected
WiFi Status: No SSID Available
WiFi Status: No SSID Available
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:184
load:0x40078000,len:12732
ho 0 tail 12 room 4
load:0x40080400,len:2908
entry 0x400805c4
Starting application
Config version: 3
Starting calibration
Calibration coef: -0.1 , 0.1
Calibration offset: 238.1 , -19.4
Display buffer size: 7680 bytes
Screen init done
Brightness value: 255
Wifi connecting to SSID: SalesZoom
WiFi Status: Disconnected
WiFi Status: Disconnected
WiFi Status: Disconnected
WiFi Status: Disconnected
WiFi Status: Disconnected
WiFi Status: Disconnected
WiFi Status: Disconnected
WiFi Status: Disconnected
WiFi Status: Disconnected
WiFi Status: No SSID Available
WiFi Status: No SSID Available
-
- Posts: 36
- Joined: Wednesday 13 September 2017 15:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V3.8153
- Location: Chicago
- Contact:
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
RpiNet is available on my phone, I can connect to it
-
- Posts: 36
- Joined: Wednesday 13 September 2017 15:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V3.8153
- Location: Chicago
- Contact:
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
Wifi issue has been fixed, I turned ON "-DFORCE_CONFIG" and now I can connect to WiFi. Can't set trusted network at Domoticz, working to fix it
-
- Posts: 815
- Joined: Wednesday 15 August 2018 14:38
- Target OS: -
- Domoticz version:
- Contact:
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
But you are using hardcoded setting for wifi ? "SalesZoom" was a previous try ?
You haven't the dialog to set it ? The reset button is still not working ? I have a doubt for the touchpad working mode ...
For the trusted network Domoticz/setting/parameter/security/trusted network then add the device IP.
You haven't the dialog to set it ? The reset button is still not working ? I have a doubt for the touchpad working mode ...
For the trusted network Domoticz/setting/parameter/security/trusted network then add the device IP.
-
- Posts: 36
- Joined: Wednesday 13 September 2017 15:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V3.8153
- Location: Chicago
- Contact:
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
"It's possible the touchpad was in landscape..", where I can change touchpad to the portrait. I want to display only three devices and want them to take the whole screen. Please show me where I can do this and play with the fonts. Thanks
- Attachments
-
- 20241022_134207.jpg (177.96 KiB) Viewed 740 times
-
- 20241022_133252.jpg (133.29 KiB) Viewed 740 times
-
- Posts: 36
- Joined: Wednesday 13 September 2017 15:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V3.8153
- Location: Chicago
- Contact:
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
Still some issue with the touchpad
-
- Posts: 36
- Joined: Wednesday 13 September 2017 15:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V3.8153
- Location: Chicago
- Contact:
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
Ok. Looks like everything works now. All I did is:
Screen_driver.cpp
touchscreen2.setRotation(global_config.rotateScreen ? 2 : 0);
tft.setRotation(global_config.rotateScreen ? 4 : 0);
esp32-2432S024R.json
"-DTFT_HEIGHT=320",
"-DTFT_WIDTH=240",
"-DLCD_WIDTH=240",
"-DLCD_HEIGHT=320",
I am in the portrait mode
Still need to adjust fonts
Screen_driver.cpp
touchscreen2.setRotation(global_config.rotateScreen ? 2 : 0);
tft.setRotation(global_config.rotateScreen ? 4 : 0);
esp32-2432S024R.json
"-DTFT_HEIGHT=320",
"-DTFT_WIDTH=240",
"-DLCD_WIDTH=240",
"-DLCD_HEIGHT=320",
I am in the portrait mode
Still need to adjust fonts
- Attachments
-
- 20241023_094713.jpg (187.9 KiB) Viewed 725 times
-
- Posts: 815
- Joined: Wednesday 15 August 2018 14:38
- Target OS: -
- Domoticz version:
- Contact:
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
Have updated again the branch "test".
- have removed the hardcoded part for rotation
- have added your changes
- have added for your device, you will have bigger widget.
But color are not the good one, IDK if you have changed a setting but perhaps you can remove
Text will be bigger on the next version, but I haven't try the result (I m on landscape mode on mine), ca n you share the result, we will check what we can update (fonts but perhaps too position)
- have removed the hardcoded part for rotation
- have added your changes
- have added
Code: Select all
-DDEVICE_SIZE=3
But color are not the good one, IDK if you have changed a setting but perhaps you can remove
Code: Select all
"-DTFT_RGB_ORDER=1",
-
- Posts: 36
- Joined: Wednesday 13 September 2017 15:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V3.8153
- Location: Chicago
- Contact:
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
Ok. I downloaded the latest branch "test".Changes I made:
esp32-2432S024R.json:
"-DLCD_WIDTH=240",
"-DLCD_HEIGHT=320",
platformio.ini:
-DTOTAL_ICONX=1 # How many icon widht
-DTOTAL_ICONY=3 # How many icon Heigh
-DDEVICE_SIZE=3 # Device display size
-DFASTCLIC=1
-DFORCE_CONFIG=1
I am not 100% sure about this, but it looks better on my small display
home_panel.cpp:
Ln130,168,186 : lv_obj_set_style_text_font(label2, &font1, 0);
esp32-2432S024R.json:
"-DLCD_WIDTH=240",
"-DLCD_HEIGHT=320",
platformio.ini:
-DTOTAL_ICONX=1 # How many icon widht
-DTOTAL_ICONY=3 # How many icon Heigh
-DDEVICE_SIZE=3 # Device display size
-DFASTCLIC=1
-DFORCE_CONFIG=1
I am not 100% sure about this, but it looks better on my small display
home_panel.cpp:
Ln130,168,186 : lv_obj_set_style_text_font(label2, &font1, 0);
- Attachments
-
- 20241023_140513.jpg (220.22 KiB) Viewed 717 times
-
- Posts: 815
- Joined: Wednesday 15 August 2018 14:38
- Target OS: -
- Domoticz version:
- Contact:
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
Code: Select all
"-DLCD_WIDTH=240",
"-DLCD_HEIGHT=320",
With
Code: Select all
DEVICE_SIZE=3
And still the color problem, remove
Code: Select all
"-DTFT_RGB_ORDER=1"
For the rest, I m not graphical designer so I can't help you a lot ^^, but if you want to add a border somewhere I can explain what to add on code.
-
- Posts: 36
- Joined: Wednesday 13 September 2017 15:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V3.8153
- Location: Chicago
- Contact:
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
You are right!
"-DLCD_WIDTH=240",
"-DLCD_HEIGHT=320", do nothing, can ignore
"-DTFT_RGB_ORDER=1" I can't see any difference with or without
I understand it is hard to make everyone happy, so "-DTFT_RGB_ORDER=1" does it job to increase a font.
Thanks a lot for your help!
"-DLCD_WIDTH=240",
"-DLCD_HEIGHT=320", do nothing, can ignore
"-DTFT_RGB_ORDER=1" I can't see any difference with or without
I understand it is hard to make everyone happy, so "-DTFT_RGB_ORDER=1" does it job to increase a font.
Thanks a lot for your help!
-
- Posts: 815
- Joined: Wednesday 15 August 2018 14:38
- Target OS: -
- Domoticz version:
- Contact:
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
Code: Select all
-DTFT_RGB_ORDER=1
Code: Select all
"-DTFT_INVERSION_ON=1",
Code: Select all
// Identical looking TFT displays may have a different colour ordering in the 16-bit colour
#define TFT_BGR 0 // Colour order Blue-Green-Red
#define TFT_RGB 1 // Colour order Red-Green-Blue
And you need to use TFT_BGR (= 0)
So -DTFT_RGB_ORDER=0
-
- Posts: 36
- Joined: Wednesday 13 September 2017 15:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V3.8153
- Location: Chicago
- Contact:
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
Sorry, I didn't try to change color settings, someone asking me every day when light is going to work. But everything is working fine and I want to say thanks Thorgal789 for your help.
- Attachments
-
- 20241028_202637.jpg (93.49 KiB) Viewed 594 times
-
- Posts: 815
- Joined: Wednesday 15 August 2018 14:38
- Target OS: -
- Domoticz version:
- Contact:
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
Ha yes, it's custom integration ^^, nice, I understand better now.
Don't worry, another user, another day will use the same device than you and will update the code, nothing is locked.
For information the device can support OTA update, so you don't need to open your wall switch to edit code, but it depend used settings.
Don't worry, another user, another day will use the same device than you and will update the code, nothing is locked.
For information the device can support OTA update, so you don't need to open your wall switch to edit code, but it depend used settings.
-
- Posts: 1
- Joined: Thursday 07 November 2024 19:42
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
Hello,
Is there a way or a possibility to display clock on CYD ??
Is there a way or a possibility to display clock on CYD ??
-
- Posts: 815
- Joined: Wednesday 15 August 2018 14:38
- Target OS: -
- Domoticz version:
- Contact:
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
Ha good question, there is no native "clock device" on domoticz, right ?
So yes it's possible using for exemple a text widget and a script to print text on it, I can make a try this week end, but I think it will be only for hour + minut, else it will use too much resources for nothing.
So yes it's possible using for exemple a text widget and a script to print text on it, I can make a try this week end, but I think it will be only for hour + minut, else it will use too much resources for nothing.
-
- Posts: 815
- Joined: Wednesday 15 August 2018 14:38
- Target OS: -
- Domoticz version:
- Contact:
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
I have updated the code on the "test" branch.
If you create a Text widget on domoticz, you can display a clock on it using this code in a LUA time script.
Now on the device on the text widget, if the text is less than 6 char it will be displayed automatically. So you can have a clock.
It's possible too using the websocket (there is regulary time event) but it mean I need to overwrite the device working mode (display a custom widget instead of the regular one)
I m using the bigger police, but on my device it's still too small, so need to use a bigger font in memory just for this widget I think.
If you create a Text widget on domoticz, you can display a clock on it using this code in a LUA time script.
Code: Select all
commandArray['UpdateDevice'] = 90 .. "|0|" .. os.date('%H:%M')
It's possible too using the websocket (there is regulary time event) but it mean I need to overwrite the device working mode (display a custom widget instead of the regular one)
I m using the bigger police, but on my device it's still too small, so need to use a bigger font in memory just for this widget I think.
Who is online
Users browsing this forum: No registered users and 1 guest