New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
Moderators: leecollings, remb0
-
- Posts: 37
- Joined: Saturday 28 March 2020 13:55
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Contact:
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
Nice project! Is it possible to use the Arduino IDE or another easy way to upload the bin file to the CYD?
I don't have Visual Studio & Platform IO installed (yet).
BTW: I'm testing with a CYD as an alternative, semi real-time (every 15 s refresh) and stand-alone energy monitor - using api calls the contents of some domoticz devices can be shown on the CYD.
I don't have Visual Studio & Platform IO installed (yet).
BTW: I'm testing with a CYD as an alternative, semi real-time (every 15 s refresh) and stand-alone energy monitor - using api calls the contents of some domoticz devices can be shown on the CYD.
- Attachments
-
- cyd-energy monitor
- cyd.jpg (162.48 KiB) Viewed 1040 times
Raspberry PI 2 & 3 & 4 | RFlink | MySensors | ESP32 | Homebridge | Tasmota Sonoff | Zigbee2Mqtt | ADS-B
-
- 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)
You can't use websocket notification ? Or values are moving a lot and it's useless ? And yes CYD are realy good device, lot of things possible with them.semi real-time (every 15 s refresh)
Yes, I think it's that is doing @stupsi99, but the problem is more the compilation, as lot of settings need to be set before it.Nice project! Is it possible to use the Arduino IDE or another easy way to upload the bin file to the CYD?
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
Yes! I use Tasmota webinstaller to upload the file.
1) https://tasmota.github.io/install/
2) select "tasmota32 LVGL" to flash.
3) enter wifi ssid and password
4) login to webinterface and flash the new .bin file
After reboot the config screen starts at CYD
1) https://tasmota.github.io/install/
2) select "tasmota32 LVGL" to flash.
3) enter wifi ssid and password
4) login to webinterface and flash the new .bin file
After reboot the config screen starts at CYD
-
- Posts: 37
- Joined: Saturday 28 March 2020 13:55
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Contact:
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
Thanks, but how can I set the wifi ssid and password? I can only select the bin file:
- Attachments
-
- tasmota webinstaller
- install-bin.png (80.98 KiB) Viewed 1001 times
Raspberry PI 2 & 3 & 4 | RFlink | MySensors | ESP32 | Homebridge | Tasmota Sonoff | Zigbee2Mqtt | ADS-B
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
Install the tasmota32 LVGL first !!
After finish you see a box to enter the wifi (PC)
Reboot and login to the CYD webinterface.
Then update to your .bin file (webinterface CYD)
After finish you see a box to enter the wifi (PC)
Reboot and login to the CYD webinterface.
Then update to your .bin file (webinterface CYD)
-
- 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 was my mistake from beginning to use capacitive board esp32-2432S024C. Everything works fine, thanks to Thorgal789, but it is really hard to make any adjustment on the small screen. I want to move to esp32-2432S024R display, could you please add this board to your project. Thanks
-
- 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)
The esp32-2432S024C use the same graphic driver than the esp32-2432S028R, juste need to change the touch driver.
I have make code for the esp32-2432S024R (untested, and not online yet) but it use same resolution than the other, so only 240*320 ?
I have make code for the esp32-2432S024R (untested, and not online yet) but it use same resolution than the other, so only 240*320 ?
-
- 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)
Ok so have pushed the esp32-2432S024R to test on the branch "test".
Tell me the result pls ?
Tell me the result pls ?
-
- 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)
Thanks a lot! I was able to get a message, "Calibrate Screen", But something wrong with the resolution. No matter what value I put in esp32-2432S024R.json file
"-"DTFT_HEIGHT=320",
"-DTFT_WIDTH=240",
Screen stay the same orientation. Here is a warning I got:
In file included from .pio/libdeps/esp32-2432S024R/TFT_eSPI/User_Setup_Select.h:203,
from .pio/libdeps/esp32-2432S024R/TFT_eSPI/TFT_eSPI.h:69,
from src/core/screen_driver.cpp:49:
.pio/libdeps/esp32-2432S024R/TFT_eSPI/TFT_Drivers/ILI9341_Defines.h:8: warning: "TFT_WIDTH" redefined
#define TFT_WIDTH 320
<command-line>: note: this is the location of the previous definition
In file included from .pio/libdeps/esp32-2432S024R/TFT_eSPI/User_Setup_Select.h:203,
from .pio/libdeps/esp32-2432S024R/TFT_eSPI/TFT_eSPI.h:69,
from src/core/screen_driver.cpp:49:
.pio/libdeps/esp32-2432S024R/TFT_eSPI/TFT_Drivers/ILI9341_Defines.h:9: warning: "TFT_HEIGHT" redefined
#define TFT_HEIGHT 240
<command-line>: note: this is the location of the previous definition
In file included from src/core/screen_driver.cpp:49:
"-"DTFT_HEIGHT=320",
"-DTFT_WIDTH=240",
Screen stay the same orientation. Here is a warning I got:
In file included from .pio/libdeps/esp32-2432S024R/TFT_eSPI/User_Setup_Select.h:203,
from .pio/libdeps/esp32-2432S024R/TFT_eSPI/TFT_eSPI.h:69,
from src/core/screen_driver.cpp:49:
.pio/libdeps/esp32-2432S024R/TFT_eSPI/TFT_Drivers/ILI9341_Defines.h:8: warning: "TFT_WIDTH" redefined
#define TFT_WIDTH 320
<command-line>: note: this is the location of the previous definition
In file included from .pio/libdeps/esp32-2432S024R/TFT_eSPI/User_Setup_Select.h:203,
from .pio/libdeps/esp32-2432S024R/TFT_eSPI/TFT_eSPI.h:69,
from src/core/screen_driver.cpp:49:
.pio/libdeps/esp32-2432S024R/TFT_eSPI/TFT_Drivers/ILI9341_Defines.h:9: warning: "TFT_HEIGHT" redefined
#define TFT_HEIGHT 240
<command-line>: note: this is the location of the previous definition
In file included from src/core/screen_driver.cpp:49:
- Attachments
-
- 20241017_145227.jpg (223.29 KiB) Viewed 620 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)
Other settings:
screen_driver.cpp
disp_drv.hor_res = TFT_WIDTH;
disp_drv.ver_res = TFT_HEIGHT;
tft.setRotation(global_config.rotateScreen ? 4 : 0);
screen_driver.cpp
disp_drv.hor_res = TFT_WIDTH;
disp_drv.ver_res = TFT_HEIGHT;
tft.setRotation(global_config.rotateScreen ? 4 : 0);
-
- 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)
The resolution is something hard to found, but I think we can use the 3 drivers for this devices so will be not a problem.
There is a special setting to swap the resolution on the actual driver (ATM I m using TFT_eSPI), If I remember it's but need first to found the correct orientation.
You have tried to play with
There is too a "hardcoded" rotation that can perturb it, in screen_driver.cpp
And this line change nothing ?
From here https://github.com/HASwitchPlate/openHA ... /750/files setting are not so bad, but can have a special hardware.
edit:
Have found the special setting to swap x and y
So need to use -DILI9341_DRIVER=1 or -DILI9342_DRIVER=1
And it seem this driver don't use TFT_ROTATION, so need to edit direclty the code in screen_driver.cpp
There is a special setting to swap the resolution on the actual driver (ATM I m using TFT_eSPI), If I remember it's
Code: Select all
-DILI9342_DRIVER=1
You have tried to play with
Code: Select all
"-DTFT_ROTATION=4",
Code: Select all
// Rotation option
#ifdef TFT_ESPI
tft.setRotation(global_config.rotateScreen ? 0 : 2);
#endif
Code: Select all
tft.setRotation(global_config.rotateScreen ? 4 : 0);
From here https://github.com/HASwitchPlate/openHA ... /750/files setting are not so bad, but can have a special hardware.
edit:
Have found the special setting to swap x and y
Code: Select all
// Change the width and height if required (defined in portrait mode)
// or use the constructor to over-ride defaults
#if defined (ILI9341_DRIVER) || defined (ILI9341_2_DRIVER)
#define TFT_WIDTH 240
#define TFT_HEIGHT 320
#elif defined (ILI9342_DRIVER)
#define TFT_WIDTH 320
#define TFT_HEIGHT 240
#endif
And it seem this driver don't use TFT_ROTATION, so need to edit direclty the code in screen_driver.cpp
Code: Select all
// Rotation option
#ifdef TFT_ESPI
tft.setRotation(global_config.rotateScreen ? 0 : 2);
#endif
-
- 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)
I have changed "-DILI9341_DRIVER=1",at esp32-2432S024R.json. Looks good but touch doesn't works
-
- 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)
From that I m reading the R version use a XPT2046 and the Capacitive use a CST820.
I m searching other project on Github and except a difference here on some project
Changed in
The library seem to work.
You just have the screen "Calibrate Screen" and nothing is working ?
You have tried to run the project with "serial monitor" enabled ?
I m searching other project on Github and except a difference here on some project
Code: Select all
#ifdef TOUCH_XPT2046
#define XPT2046_IRQ 36
Code: Select all
#ifdef TOUCH_XPT2046
#define XPT2046_IRQ -1
You just have the screen "Calibrate Screen" and nothing is working ?
You have tried to run the project with "serial monitor" enabled ?
-
- 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)
Here is "serial monitor" output
- Attachments
-
- 102124 serial monitor.jpg (44.19 KiB) Viewed 551 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)
Here is a board display
- Attachments
-
- 20241021_080701.jpg (188.41 KiB) Viewed 552 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)
No serial output when touching the display ?
You want to use Portrait mode ?
And color issue, the display need to be white text on black screen, try
in the esp32-2432S024R.json file.
Can make a try with adding too
It's from this project https://github.com/b00mekk/ESP32Maraude ... 2S024R_CYD but I don't think it use the touchpad.
It have prebuild file, can you make a try to see if it work on your device ?
You want to use Portrait mode ?
And color issue, the display need to be white text on black screen, try
Code: Select all
"-DTFT_INVERSION_ON=1",
Can make a try with adding too
Code: Select all
"-DUSE_HSPI_PORT=1",
It have prebuild file, can you make a try to see if it work on your device ?
-
- 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)
"-DUSE_HSPI_PORT=1", it did a trick.
Calibration working now, I use it in a Portrait mode. Trying to connect to wifi. Thanks a lot!
Calibration working now, I use it in a Portrait mode. Trying to connect to wifi. Thanks a lot!
-
- 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)
Now is a new issue. After board is loaded I can see calibration screen with calibration mark and can perform a calibration.Than "Connecting to WiFi" screen comes up and stop. "Reset" button dosn't responsive
- Attachments
-
- 20241021_134848.jpg (177.9 KiB) Viewed 538 times
-
- 102424.jpg (70.39 KiB) Viewed 538 times
-
- 20241021_134947.jpg (223.34 KiB) Viewed 538 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)
No SSID available, it mean the arduino don't found the wifi network.
You have already set the SSID and the password ? Or was broken before ?
I have updated the branch "test" with your last comments and have added one more debug line that print the SSID used for connection.
To check that, there is an hidden utility, line 347 in screen_driver.cpp, it will enable something to test the touch (but need to reset the calibration using -DFORCECALIBRATE=true in platformio.ini )
You have already set the SSID and the password ? Or was broken before ?
I have updated the branch "test" with your last comments and have added one more debug line that print the SSID used for connection.
It's possible the touchpad was in landscape and the display in portrait."Reset" button dosn't responsive
To check that, there is an hidden utility, line 347 in screen_driver.cpp, it will enable something to test the touch (but need to reset the calibration using -DFORCECALIBRATE=true in platformio.ini )
Who is online
Users browsing this forum: No registered users and 1 guest