Page 12 of 13
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
Posted: Wednesday 29 January 2025 6:36
by marexsc
Just dimming the display backlight doesn't do much - I tried, but it's more about bland or not very intense colors. It's like too little sharpness or contrast, unfortunately our TFT display doesn't support these functions. I hope I'm wrong because I'd also like it to be clearer.
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
Posted: Wednesday 29 January 2025 11:47
by Thorgal789
What is your device ? it's a 2432S028R ? You know the version ? Else how many USB port you have, mini-USB and USB-C ?
I have a 2432S028R with 1 USB-C + 1 Mini USB (it's the native version, without edition in platformio.ini file)
Used with Dark mode and brightness to 25 % (Yes, I think too thoses devices have too much luminosity) and I haven't problem. I can add 10% but if in your side it have an impact on color and not luminosity it's naother problem, on my side this option realy have an impact on the "light producted" by the device.
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
Posted: Thursday 30 January 2025 0:44
by marexsc
My device is 2432S028 without any letters, version with 1xUSB USBmini 1xUSB C, I'm not entirely sure but the driver is probably ili9432 (backlight gpio 21, LDR gpio34), and maybe that's the problem because at the moment I'm working on 2432S028R and ili9431 driver.
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
Posted: Thursday 30 January 2025 7:55
by marexsc
The image is a sample of what the difference is, the second display is "Openhasp"
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
Posted: Thursday 30 January 2025 15:48
by Thorgal789
I think I have same.
It's the defaut config, you haven't edited anything in platoformio file ?
So it use the driver TFT_ESPI
Code: Select all
-DTFT_ESPI=1
#-DLOVYANGFX=1
#-DARDUINO_GFX
(You can try with the 2 other)
The backlight GPIO is 21 yes, but the gpio 34 is the light sensor for me (CDS).
And your device is blinking ? On your capture you have one device with a dark theme and the other with a lighter, so hard to compare.
The dark theme don't use a black color, it's more a "dark grey".
It's an older version, but colors are same.
If you want I can give you a code to replace the "dark grey" by a full dark ?
Make a try with the "light" theme ?
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
Posted: Saturday 01 February 2025 12:40
by Thorgal789
Have updated the "master" code on github. There is a corrective about domoticz device id, I don't remember what is was, but can make a try.
There is too the "light websocket" support and the OTA, so now you can update the device only using Wifi.
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
Posted: Saturday 01 February 2025 17:22
by kniazio
Thorgal789 wrote: ↑Saturday 01 February 2025 12:40
Have updated the "master" code on github. There is a corrective about domoticz device id, I don't remember what is was, but can make a try.
There is too the "light websocket" support and the OTA, so now you can update the device only using Wifi.
Is this the webserver? How to upload OTA?
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
Posted: Saturday 01 February 2025 18:40
by Kedi
Put /update after the 192.168.1.117 -> 192.168.1.117/update
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
Posted: Sunday 02 February 2025 14:41
by Thorgal789
Ha yes, I forget to describe OTA, I will update the Github in 20 mn.
There is 2 options for OTA, PUSHOTA and PULLOTA you can enable one of them or nothing (not both ofc).
PUSHOTA Enable the OTA in PUSH mode, it mean there is a webserver that run permanently, youcan access it using /update as url.
PULLOTA can be used using the GUI, on the device itself, using the first menu, it will download itself the new firmware, but for the moment the url is hardcoded (not sure people will use this mode, I think I m the only one to prefer the PULLOTA)
In ota.cpp
Code: Select all
const char url[] = "http://192.168.1.81:8080/firmware.bin";
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
Posted: Sunday 02 February 2025 17:32
by marexsc
If you can, send the black color you mentioned earlier.
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
Posted: Sunday 02 February 2025 19:28
by Thorgal789
About the "dark grey" Im using ?
If you are using the dark theme, the code is in file main_ui.cpp
Code: Select all
else
{
background = lv_palette_darken(LV_PALETTE_GREY, 4);
lv_style_set_shadow_color(&style_shadow, lv_palette_darken(LV_PALETTE_GREY, 2));
}
lv_style_set_bg_color(&style_shadow, background);
For information
Code: Select all
For the lighter variants of a palette color use lv_color_t c = lv_palette_lighten(LV_PALETTE_..., v). v can be 1..5. For the darker variants of a palette color use lv_color_t c = lv_palette_darken(LV_PALETTE_..., v). v can be 1..4.
You want to make the color more black ?
Code: Select all
background = lv_color_hex(0x000000);
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
Posted: Wednesday 05 February 2025 13:08
by Kedi
I love it

, but just a few remarks:
1. Personnal is incorrect, it should be personal with just 1 'n'
2. Personally I like the black background beter, perhaps that var could be transfered to the personal_settings.h file. So everybody could use its own personal background color more easily.
3. I switched in the info tab the order of baro and utility to be consistent with Domoticz, and also changed the baro into weather like in Domoticz.
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
Posted: Wednesday 05 February 2025 19:14
by Thorgal789
Arf, I have just made the release with the typo ....
1 - Corrected, but too late now
2- My GF too, and you are not alone, so for the moment full black is the defaut, the problem is I m using a fonction to generate the palette, and it use only a bool value, so it can be only on or off, not possible to make a third "custom" option, I need lot of settings to have a full custom palette.
3- Corrected too, have increased the tab size and and a capital letter too.
Change on the "test" branch.
Edit:
You haven't a "persistence phenomenon" with the full dark color ? (we can guess the widget even if the display is using a full colored backgound)
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
Posted: Sunday 23 February 2025 21:23
by Ltech
I love it!
Running on esp32-8048S070C in 10 minutes
And I convert it for the esp32-8048S050C.
Only trouble is the timeout. If I put the screen on 50%, it jumps to 100% and not 0% after timeout.. It is inverted
I put my config in attachment
I can't get it to GIT
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
Posted: Friday 07 March 2025 17:06
by Thorgal789
Ltech wrote: ↑Sunday 23 February 2025 21:23
Oups, sorry have just see your comment.
Thx I will add it tommorrow to the github.
About your issue, it only happen with the "standby mode" ? I mean , if you set it to 25% or 75% using the setting panel you haven't issue, or it's reversed too ?
I m seing you have edited the code
It's to correct your issue ?
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
Posted: Sunday 09 March 2025 10:40
by Thorgal789
Ok so I hav found nothing about your issue, nothing similar, and no settings to 'invert" the brighness so have just used a hack
Code: Select all
#ifdef ESP32_8048S050C
brightness = 255 - brightness;
#endif
The code is updated on the "test" branch
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
Posted: Monday 10 March 2025 8:33
by Ltech
No this is only inverting the brightness. The brightness setting mode was fine.
When the sleep mode is activated, it turns to 100% brightness, no to 0%
It has to be somewhere else.
So on first touch, the monitor go back to 50% from 100% after leep mode (wake timeout)
In you modification it is only inverting the default brightness setting, not the screen sleep brightness setting
I guess the backlight led is driven inverted. When in pwm those are pulses, when in sleep it is an fix level...
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
Posted: Monday 10 March 2025 17:43
by Thorgal789
Ltech wrote: ↑Monday 10 March 2025 8:33
In you modification it is only inverting the default brightness setting, not the screen sleep brightness setting
The "hack" invert all brightness, it need to work for all requests, even the sleep brightness.
You mean with it the normal setting for brightness is reversed but you still have the same issue ?
The fonction is screen_timer_sleep() and inside there is
So without the hack the value stay 0 and with the hack it become 255, not possible you still have the same result .....
I have just see this fonction
Code: Select all
void set_screen_brightness()
{
if (global_config.brightness < 32)
screen_setBrightness(255);
else
screen_setBrightness(global_config.brightness);
}
It's called on "wake up", so for you it's again 50% if I m right.
I guess the backlight led is driven inverted. When in pwm those are pulses, when in sleep it is an fix level...
And if you remove my hack and use value 1 ? Perhaps the issue is only for 0.
I m reducting the frequency too, but I don't think it can have an impact on brightness ....
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
Posted: Tuesday 11 March 2025 8:22
by Ltech
Yes, this make it works! Thank-you !
You can publish the 5" sunton
Was this my mistake trying to make the screen working?
screen_setBrightness(254) => screen_setBrightness(0)
Code: Select all
#ifdef AUTO_BRIGHTNESS
....
#else
screen_setBrightness(0);
isScreenInSleep = true;
// Screen is off, no need to make the cpu run fast, the user won't notice ;)
setCpuFrequencyMhz(CPU_FREQ_LOW);
Serial.printf("CPU Speed: %d MHz\n", ESP.getCpuFreqMHz());
#endif
}
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
Posted: Tuesday 11 March 2025 18:18
by Thorgal789
Was this my mistake trying to make the screen working?
IDK ^^, depend if this code was here before or after your issue.
Im doing same, it s for that there is so much disabled code, I m not able to remember if it's usefull or not.
So what is the final solution ? to add it officially on github.
Rool back to
only ? No more changes ? Can remove the hack or still need it ?