New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
Moderators: leecollings, remb0
-
- 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)
It's not a problem, it's the normal result (I think), it's just the json as result to the request. The json contain all data for all IDX in the request. And when I say "enormous JSON" it's just 10 ko for 9 devices ^^, it's just strange when you compare the 2 working mode, starting at 10k just at start and the other at 0.
For the moment it's still in test, if the device have problem with the first json, it can ignore it, I still query the data by devices just after to initialise them. even It's useless now with this feature, I think I will remove it later, but need first to make test with scenes/groups with "getscenes" when the device is on "Scene" tab, Haven't tried how will react the websocket if I "change" on the fly the devices list.
I m still making test, but with your last feature it's possible to make hardware that connect direclty with domoticz, with realy light traffic and above all, natively.
For the moment it's still in test, if the device have problem with the first json, it can ignore it, I still query the data by devices just after to initialise them. even It's useless now with this feature, I think I will remove it later, but need first to make test with scenes/groups with "getscenes" when the device is on "Scene" tab, Haven't tried how will react the websocket if I "change" on the fly the devices list.
I m still making test, but with your last feature it's possible to make hardware that connect direclty with domoticz, with realy light traffic and above all, natively.
- gizmocuz
- Posts: 2350
- Joined: Thursday 11 July 2013 18:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Top of the world
- Contact:
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
Yes thats true, you cant avoid that
Quality outlives Quantity!
-
- Posts: 536
- Joined: Monday 20 March 2023 14:41
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Somewhere in NL
- Contact:
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
I have a small problem. Who knows the answer?
In my WiFi password I have the char. | (decimal 124) Does anyone know how to type that on the screen keyboard?
Or where and how to hardcode SSID and password in the Source?
Oeps Found it on page 3
In my WiFi password I have the char. | (decimal 124) Does anyone know how to type that on the screen keyboard?
Or where and how to hardcode SSID and password in the Source?
Oeps Found it on page 3
Logic will get you from A to B. Imagination will take you everywhere.
-
- 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 right, the keypad miss the "|".
And it's by defaut https://docs.lvgl.io/8.0/widgets/extra/keyboard.html
I think it's the only one missing, but why ?
And it's by defaut https://docs.lvgl.io/8.0/widgets/extra/keyboard.html
I think it's the only one missing, but why ?
-
- Posts: 536
- Joined: Monday 20 March 2023 14:41
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Somewhere in NL
- Contact:
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
Got it all sorted out, but then I found out that my board does not want connect to my router. rssi = 0 for some reason.
My chip is a ESP32-S3 (revision v0.2) and the board is a ESP32-8048S070 Don't know which letter comes after that.
But my initial attempt I got to filling in the password without the '|' sign.
My chip is a ESP32-S3 (revision v0.2) and the board is a ESP32-8048S070 Don't know which letter comes after that.
But my initial attempt I got to filling in the password without the '|' sign.
Logic will get you from A to B. Imagination will take you everywhere.
-
- Posts: 536
- Joined: Monday 20 March 2023 14:41
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Somewhere in NL
- Contact:
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
I got (almost) to the end result. I used my phone in tethering mode and the CYD connected fine, all my configured Domoticz devices are present and working fine, could switch lights etc...I have a lot of Arduino and VSC devices with esp8266 and esp32 connected to my router without any problem.
I have in my SSID password 2 special chars, which work fine in all my other devices, but not in this code.
Those are the '|' (dec. 124) and '\' (backslash). The last has to be escaped by an other backslash.
This SSID password works fine in all (tens) of my other devices.
Any idea where to look /solve that issue? Because I can't change my routers SSID password.
This is used. Is the Wifi @ 2.0.0 correct?
Dependency Graph
|-- LovyanGFX @ 1.1.16
|-- lvgl @ 8.4.0
|-- ArduinoJson @ 7.1.0
|-- WebSockets @ 2.4.2
|-- base64 @ 1.4.0
|-- SPI @ 2.0.0
|-- Wire @ 2.0.0
|-- Preferences @ 2.0.0
|-- HTTPClient @ 2.0.0
|-- WiFi @ 2.0.0
I have in my SSID password 2 special chars, which work fine in all my other devices, but not in this code.
Those are the '|' (dec. 124) and '\' (backslash). The last has to be escaped by an other backslash.
This SSID password works fine in all (tens) of my other devices.
Any idea where to look /solve that issue? Because I can't change my routers SSID password.
This is used. Is the Wifi @ 2.0.0 correct?
Dependency Graph
|-- LovyanGFX @ 1.1.16
|-- lvgl @ 8.4.0
|-- ArduinoJson @ 7.1.0
|-- WebSockets @ 2.4.2
|-- base64 @ 1.4.0
|-- SPI @ 2.0.0
|-- Wire @ 2.0.0
|-- Preferences @ 2.0.0
|-- HTTPClient @ 2.0.0
|-- WiFi @ 2.0.0
Logic will get you from A to B. Imagination will take you everywhere.
-
- Posts: 536
- Joined: Monday 20 March 2023 14:41
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Somewhere in NL
- Contact:
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
Got a fix by assigning fixed addresses for device, gateway, subnet and dns to the CYD.
Still wondering why the device did not get an IP from my router.
Still wondering why the device did not get an IP from my router.
Logic will get you from A to B. Imagination will take you everywhere.
-
- 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 can make a custom keyboard with all the key I want, so with the "|", but ATM I m asking if it's normal (perhaps the next version will have it, or I miss a special procedure), Because I don't see the logic, and I need to check how much data will take a custom keyboard compared to the native one.
You can enable "serial monitor" to see usefull logs.
So you mean it works if you configure your router with static IP but not if you let the DHCP choose the IP ?
I don't see the logic again ^^, It's a new device ? perhaps its MAC adress is already somewhere in the router settings ? ( Or banned by security software because of connection attemps
The tested device is the esp32-8048S070C, if you have another one we can probably add it, for the moment It take between 1/7 days to add new one.
To set a fixed SSID/password (and avoid to set it manually on the device) it's in the C++ code, but to use a specific hardware the change is in the platformio.ini file.
You can enable "serial monitor" to see usefull logs.
So you mean it works if you configure your router with static IP but not if you let the DHCP choose the IP ?
I don't see the logic again ^^, It's a new device ? perhaps its MAC adress is already somewhere in the router settings ? ( Or banned by security software because of connection attemps
Code: Select all
|-- TFT_eSPI @ 2.5.43+sha.fae22f7
|-- XPT2046_Touchscreen @ 0.0.0+sha.5d5120e
|-- lvgl @ 8.4.0
|-- ArduinoJson @ 7.0.4
|-- WebSockets @ 2.4.1
|-- base64 @ 1.4.0
|-- Preferences @ 2.0.0
|-- HTTPClient @ 2.0.0
|-- Wire @ 2.0.0
|-- WiFi @ 2.0.0
To set a fixed SSID/password (and avoid to set it manually on the device) it's in the C++ code, but to use a specific hardware the change is in the platformio.ini file.
-
- Posts: 536
- Joined: Monday 20 March 2023 14:41
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Somewhere in NL
- Contact:
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
Don't need to change the keyboard. I now hardcoded the SSID, password and network settings.
It works,and I won't change the SSID password very soon. And fixed address is fine too.
At the end all my finished devices get a fixed IP address, but for testing and setting up things I use DHCP, and that did not work in this case.
I have the esp32-8048S070C and it is working as intended.
I am now in the process of printing a nice enclosure.
It works,and I won't change the SSID password very soon. And fixed address is fine too.
At the end all my finished devices get a fixed IP address, but for testing and setting up things I use DHCP, and that did not work in this case.
I have the esp32-8048S070C and it is working as intended.
I am now in the process of printing a nice enclosure.
Logic will get you from A to B. Imagination will take you everywhere.
-
- 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)
Hello there an user on github @SargonofAssyria that have found lot of bugs, corrected ATM and have suggest the use of OTA update, to be able to make update without using the USB port, only with wifi.
So it's WIP but I need some return to choose wich one solution to use. Thee is 2 OTA mode possible
The PULL mode.
On this mode you will have a button to press on the tool panel, and the device will download the file on a server and install it.
The PUSH mode.
On this mode the device will have a webpage and you can use the file you want on your computer.
My first idea was to use the PULL mode, because using html code take too much place and because in my mind it will use less ressource on this light device, but after somes tests
It take more space in memory but less CPU use with the embed webserver .....
I m maing test to be sure the device is not less reactive (can explain what it use less memory) but IDK wich one solution is better.
If you want to make test, you can use the branch "test". You can select an OTA mode using platformio.ini file (this version have output debug on screen)
For the PULL mode need to set an url for the file (stil hardcoded ATM)
I m using the Domoticz server
For the PUSH OTA need to use the url
The good thing is if I choose the webserver, I can use it for setting, like set device to display in Home page. But honnestly I don't understand why it use so few ressources ....
But we can perhaps have security issue using this mode.
So it's WIP but I need some return to choose wich one solution to use. Thee is 2 OTA mode possible
The PULL mode.
On this mode you will have a button to press on the tool panel, and the device will download the file on a server and install it.
The PUSH mode.
On this mode the device will have a webpage and you can use the file you want on your computer.
My first idea was to use the PULL mode, because using html code take too much place and because in my mind it will use less ressource on this light device, but after somes tests
Code: Select all
PUSH OTA
RAM: [=== ] 28.0% (used 91720 bytes from 327680 bytes)
Flash: [===== ] 51.8% (used 1018901 bytes from 1966080 bytes)
25 fps 6-13% CPU used 10kb used
PULL OTA
RAM: [=== ] 27.9% (used 91304 bytes from 327680 bytes)
Flash: [===== ] 50.3% (used 989265 bytes from 1966080 bytes)
25 fps 9-20% CPU used 10kb used
I m maing test to be sure the device is not less reactive (can explain what it use less memory) but IDK wich one solution is better.
If you want to make test, you can use the branch "test". You can select an OTA mode using platformio.ini file (this version have output debug on screen)
For the PULL mode need to set an url for the file (stil hardcoded ATM)
Code: Select all
const char url[] = "http://192.168.1.81:8080/firmware.bin";
For the PUSH OTA need to use the url
Code: Select all
http://Deviceip:80/update
The good thing is if I choose the webserver, I can use it for setting, like set device to display in Home page. But honnestly I don't understand why it use so few ressources ....
But we can perhaps have security issue using this mode.
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
this one works for me, is there a newer compiled version (.bin) without cpu&fps info ??Thorgal789 wrote: ↑Monday 22 January 2024 17:00 @kniazio I m not sure it's the good file, becasuse it seem relay light butYou have it here https://www.cjoint.com/c/NAwp2H0tqLa for ESP32-2432S028RCode: Select all
Uploading .pio\build\esp32dev\firmware.bin
I have corrected a bug on wifi (it take the wrong SSID), now devices on Homepage are by defaut 1,2,3,4,5,6,7,8,9 but you can change them on the setting panel bottom (not forced to use the hardcoded line)
I have too disabled the pre-configured mode by defaut, so if you don't want to spend your time with setting manually the device you need to force it in the platoformio.ini file.
@RobertM I have put a new version online that will, I hope, solve the crash at start. In fact the code will now ignore json data if they are incompletes.Code: Select all
#-DFORCE_CONFIG # Enable or disable the forced network configuration.
I have sometime a problem on this part, but it's realy rare on my side, so not sure it's the same problem for you.
br stupsi99
-
- 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 are using a realy old one.this one works for me, is there a newer compiled version (.bin) without cpu&fps info ??
I can compile a bin for the device ESP32-2432S028R if you want, but better to make with Visual studio code, you will have access to realy more settings.
Else tell me wich one option you want or not ?
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
It would be nice to have the newer working .bin version.
Thx stupsi99
Thx stupsi99
-
- 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 can compile one in blind mode for ESP32-2432S028R but wich one setting you want ?
Except OTA, still in beta.
Except OTA, still in beta.
Code: Select all
#-DFORCE_CONFIG # Enable or disable the forced network configuration.
-DFORCECALIBRATE=false # Reset the calibration at every restart, used to reset it after a config change.
#-DOLD_DOMOTICZ # If you are using older Domoticz version < 2023.2
-DBONUSPAGE=0 # Special page to add, similar to Homepage but not updated, from 1 to 3
#-DFASTCLIC # Enable 1 clic action for some widget
#-DNO_INFO_PAGE # Disable the Info panel
#-DNO_GROUP_PAGE # Disable the Group/scene panel
#-DCUSTOM_FONT
#-DAUTO_BRIGHTNESS
#-DLIGHTWS # Only possible for version > 16088
#-DPUSHOTA # To enable Push OTA (Don't enable both OTA)
#-DPULLOTA # To enable PUSH OTA (Don't enable both OTA)
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
as easy as possible!
i use latest domoticz on raspberry pi beta version.
-DFORCECALIBRATE=false # Reset the calibration at every restart, used to reset it after a config change. FALSE
#-DOLD_DOMOTICZ # If you are using older Domoticz version < 2023.2 NO
-DBONUSPAGE=0 # Special page to add, similar to Homepage but not updated, from 1 to 3 NO
#-DFASTCLIC # Enable 1 clic action for some widget ENABLE
#-DNO_INFO_PAGE # Disable the Info panel DISABLE
#-DNO_GROUP_PAGE # Disable the Group/scene panel DISABLE
#-DCUSTOM_FONT NO
#-DAUTO_BRIGHTNESS YES if it works
#-DLIGHTWS # Only possible for version > 16088 YES
#-DPUSHOTA # To enable Push OTA (Don't enable both OTA) DISABLE
#-DPULLOTA # To enable PUSH OTA (Don't enable both OTA) DISABLE
ESP32-2432S028R with USB-C
thanks
i use latest domoticz on raspberry pi beta version.
-DFORCECALIBRATE=false # Reset the calibration at every restart, used to reset it after a config change. FALSE
#-DOLD_DOMOTICZ # If you are using older Domoticz version < 2023.2 NO
-DBONUSPAGE=0 # Special page to add, similar to Homepage but not updated, from 1 to 3 NO
#-DFASTCLIC # Enable 1 clic action for some widget ENABLE
#-DNO_INFO_PAGE # Disable the Info panel DISABLE
#-DNO_GROUP_PAGE # Disable the Group/scene panel DISABLE
#-DCUSTOM_FONT NO
#-DAUTO_BRIGHTNESS YES if it works
#-DLIGHTWS # Only possible for version > 16088 YES
#-DPUSHOTA # To enable Push OTA (Don't enable both OTA) DISABLE
#-DPULLOTA # To enable PUSH OTA (Don't enable both OTA) DISABLE
ESP32-2432S028R with USB-C
thanks
Last edited by stupsi99 on Wednesday 10 July 2024 22:01, edited 1 time in total.
-
- 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)
Oups, sorry have missed your answer.
New version to test https://www.cjoint.com/c/NGqqaLcyOwa
New version to test https://www.cjoint.com/c/NGqqaLcyOwa
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
thanks
i can flash it and got display with network and domoticz
but i can not change anythink at the Dft devices line.
original 1,2,3,4....
if i change to 22,2,3,4... i got empty screen and if i look into the config there was 658667587,0,0,0...
i try to reset and flash again but it is the same.
if i clean the line and exit - it changes to 0,0,0,0...
left was the config site, then black site, 2nd black site, then right site all devices (light, temp,utility,baro) - i have 4 virtual displays now??
if i go to the left end all system there and working with chart.
any idea what`s wrong.
thx stupsi
i can flash it and got display with network and domoticz
but i can not change anythink at the Dft devices line.
original 1,2,3,4....
if i change to 22,2,3,4... i got empty screen and if i look into the config there was 658667587,0,0,0...
i try to reset and flash again but it is the same.
if i clean the line and exit - it changes to 0,0,0,0...
left was the config site, then black site, 2nd black site, then right site all devices (light, temp,utility,baro) - i have 4 virtual displays now??
if i go to the left end all system there and working with chart.
any idea what`s wrong.
thx stupsi
-
- 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)
My fault.
The code was using previosuly ";" and the new one "," to separate device.
I have reversed your settings, if fact if I Disable the line it enable the option.
I think this version will be better https://www.cjoint.com/c/NGrqjn5QWBa
The code was using previosuly ";" and the new one "," to separate device.
i have 4 virtual displays now??
Code: Select all
#-DNO_INFO_PAGE # Disable the Info panel DISABLE
#-DNO_GROUP_PAGE # Disable the Group/scene panel DISABLE
I think this version will be better https://www.cjoint.com/c/NGrqjn5QWBa
Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)
thanks now the Dft Line works as expectet!!!
only one question is the right site gone with all devices?? (light,temp,utility,baro) i cant see it now
is it possible to aktivate this in your last version ?
big thanks for your help.
only one question is the right site gone with all devices?? (light,temp,utility,baro) i cant see it now
is it possible to aktivate this in your last version ?
big thanks 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)
It's the panel called "info panel"Who is online
Users browsing this forum: No registered users and 1 guest