New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)

Subforum for general discussions. Do not dump your questions/problems here, but try to find the subforum where it belongs!

Moderators: leecollings, remb0

Post Reply
Thorgal789
Posts: 815
Joined: Wednesday 15 August 2018 14:38
Target OS: -
Domoticz version:
Contact:

New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)

Post by Thorgal789 »

Hello, I have started a new project, but now I have some hesitation for the future.

To make short I m searching a small wall mounted device to control my home.
I don't want to use Smart Panel because of the battery.
I want the device give notifications (It's the first use) so I want it is already running, never in stand by, so the consumption is a problem too, can't use too big display, and some POE touchcreen can use so much ernergy.
I want it full open, not a closed hardware.
So I have discover the CYD (Cheap Yellow Device)
CYD.jpg
CYD.jpg (11.37 KiB) Viewed 6808 times
It's small device, cheap, the 2.8 display cost 10 euros, but you can found bigger, round model, ect ....

On the same hardware, you have a ESP32 engine + touchpad + wifi + some sensors.

I have started a project you can try it here https://github.com/Smanar/CYD-Domoticz-Remote

Here you can find some captures for the 2.8 model.

Image
Image

Or a video from an older version > https://www.youtube.com/watch?v=1Lc6MlZjePM&app=desktop

It use Wifi connection to connect direclty to domoticz, to ask information and use the websocket connexion to have real time event, so nothing to add. Just power the device using USB, give the Domoticz IP the wifi password and it's all.
In reality the project is not finished so lot of setting are hard coded on the device, for exemple wich one devices will be displayed on the homepage, but it realy work in stand alone mode.

Now my questions.
The display is small so I don't think it can be usefull to display all the devices present in domoticz (using menu, not on the homepage), so use the websocket connexion is overkill, and use instead PUSH notifications can be lighter, but less friendly, more to do ....
The second use for this device is a Music player, so I can use Domoticz custom widget, or create a full media player, for the moment I m using the first solution.
I m realy bad for graphics, if you know a theme than can be used on this kind of device ....
CYD can have sensors, the one I m using have temperature and light for exemple, but to use them need to create a python plugin, it's possible using some code and custom sensor but not friendly.
Attachments
Domoticz_RGB.jpg
Domoticz_RGB.jpg (60.15 KiB) Viewed 3397 times
20231230_172204.jpg
20231230_172204.jpg (86.06 KiB) Viewed 6808 times
Last edited by Thorgal789 on Tuesday 26 March 2024 19:09, edited 5 times in total.
User avatar
madpatrick
Posts: 636
Joined: Monday 26 December 2016 12:17
Target OS: Linux
Domoticz version: 2024.7
Location: Netherlands
Contact:

Re: New project, a small wall display to control Domoticz

Post by madpatrick »

Very nice.
Maybe you get some inspiration of this devices


https://www.google.com/aclk?sa=l&ai=DCh ... BECY&nis=8

Would be nice if you can have small displays to control devices
-= HP server GEN8 Xeon(R) E3-1220L_V2 -=- OZW -=- Toon2 (rooted) -=- Domoticz v2024.7 -=- Dashticz v3.12b on Tab8" =-
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: New project, a small wall display to control Domoticz

Post by EdwinK »

O, I have that screen for my 3D printer. It's great for such a price. Would be a nice for in a room where you don't need or want a full tablet. Bedrooms or such.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
Thorgal789
Posts: 815
Joined: Wednesday 15 August 2018 14:38
Target OS: -
Domoticz version:
Contact:

Re: New project, a small wall display to control Domoticz

Post by Thorgal789 »

EdwinK wrote: Saturday 30 December 2023 19:27 O, I have that screen for my 3D printer. It's great for such a price. Would be a nice for in a room where you don't need or want a full tablet. Bedrooms or such.
Yep exactly it's my objective, smaller enought to be direcly fixed on a "wall box" (IDK the name in english, but it's wall box used for plug or switch) , low consumption, and I have started my project over a project used for a printer (kilpper)
madpatrick wrote: Saturday 30 December 2023 18:52 Very nice.
Maybe you get some inspiration of this devices

Would be nice if you can have small displays to control devices
This is exactly my problem, to make it easy to use, there is just a field where the user can put the devices ID he want on the Homepage, after, all is automatic.
First problem, some physical devices can have more than 1 entry in domoticz, (a plug have a switch + power + consumption + current) so on the shelly device all is grouped, harder to do on domoticz.
For the process is automatic, all widgets have same dimension, so can't do like on the shelly.

My first idea was to make a python plugin that send REST request to the device, like that I can make "custom" dynamic homepage, but it mean more work for the user, he need to make group, make a design for the dashboard, make rules, ect ....

Or I can make a mix, 1 "native" big widget, and 6 smalls.

ATM I m using a 3*3 dashboard, but can be increased for bigger display.

There is too the Jeedom dashboard:
macgpic-1473155769-55369709771370-sc-jpt.jpg
macgpic-1473155769-55369709771370-sc-jpt.jpg (43.07 KiB) Viewed 6692 times
The Home center
Home-Center-2.png
Home-Center-2.png (47.33 KiB) Viewed 6692 times
And HA
HA.png
HA.png (31.45 KiB) Viewed 6692 times
For the moment because of the resolution I will make a mix between the shelly and the HA one.
And IDK if I will group device, will be possible using the ID instead of the IDX on the deconz plugin for exemple, because all are starting by the MAC adress, but not sure it will be possible on all plugin ....
Thorgal789
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)

Post by Thorgal789 »

Ok, so I finally chose a theme.
Domoticz_RGB.jpg
Domoticz_RGB.jpg (60.15 KiB) Viewed 6306 times
domoticz_devices.jpg
domoticz_devices.jpg (94.67 KiB) Viewed 6306 times
domoticz_dashboard.jpg
domoticz_dashboard.jpg (97.98 KiB) Viewed 6306 times
I display only the more usefull devices on the Homepage, but all Domoticz devices are accessible on another page.
Have removed the menu, can switch pages like on a smartphone with drag

Now I m looking to display chart for sensor. I think the next step will be a video.
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)

Post by EdwinK »

Looking great, might invest in another screen for this. Or wait till there is an update for my printers screen and then reuse the 'old' one
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
Thorgal789
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)

Post by Thorgal789 »

Ok so first "stable" version. I have 1 running since 2 days.
I have put a video here https://www.youtube.com/watch?v=1Lc6MlZjePM

The code is still moving a lot, for exemple the graph at first screen is in test, in reality domoticz json are too big for the device memory (can take 100k of data just for 1 graph). And IDK if it can be usefull, I will see later, for the moment it's in stand by.

The features availables will depend of user devices. The home page will always work, the websocket return too, for the rest IDK. Some JSON are realy impressive, can take some Mega for only 5% of data used, and not possible to reduce them, there is no setting in domoticz. I m using a filtering for some of them, it's possible too using smaller requests to have smaller JSON as return, for exemple this one https://www.domoticz.com/wiki/Domoticz_ ... 2Fswitches but this one don't have data, so it's possible to make a device list, but without information.

I have starting to put a "how to" on the github page, but I m honnest, It's not something easy, but not expensive to test.
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)

Post by EdwinK »

When I have my new screen for the Bambu printer I'll take a look on how to do this.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
RobertM
Posts: 2
Joined: Sunday 13 May 2018 19:15
Target OS: -
Domoticz version:
Contact:

Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)

Post by RobertM »

I tried to upload your project but it resets to WiFi settings over and over again.
In PlatformIO, I looked for WiFi and Domoticz settings in the code and entered my own and the same there.

On the serial server I get:
Wifi connected
Connecting to Webserver
Waiting
[WSc] Connected to url:
... ?type=command&param=getdevices&rid=37
JSON PARSE: Ok

Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
....
WiFi Status: Disconnected
WiFi Status: No SSID Available
I can't seem to get past this :(
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)

Post by waltervl »

Regarding device list JSON, perhaps check the events page for dzvents, blocky programming etc. There is also a device list overview. Perhaps it is using an undocumented smaller JSON, check with your browser developer tool F12 button.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
kniazio
Posts: 198
Joined: Thursday 06 October 2016 8:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.7243
Contact:

Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)

Post by kniazio »

If anyone has a compiled .bin file for Sunton 2.8" ESP32-2432S028R, please share it.
Thorgal789
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)

Post by Thorgal789 »

@kniazio have see your PM first, so if you can just send me the devices you want in Homepage, I will send you a version with wifi not pre-configured (else not possible, values are hard coded). I m on it ATM to make them configurable with a virtual keyboard like for network setting, but it will take some more days.

@RobertM The version Online have moved a lite (The message "JSON PARSE: Ok" was removed since) but I think there is something bad at startup.
You can change the defaut widget to display on Homepage here

Code: Select all

//personnal devices
const static int t[] = {237, 81, 16, 36, 28, 35, 57, 14, 87};

But even with a not existing one I don't have the issue at every restart. And even it's a not used json, not normal it crash the device.

I think it have something to see with a delay, because I can have it, only with serial, but it happen only 1 time, at next restart all is fine.

I m leaving home for today, I will keep you in touch monday.

BTW what is your hardware ?
Thorgal789
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)

Post by Thorgal789 »

@kniazio I m not sure it's the good file, becasuse it seem relay light but

Code: Select all

Uploading .pio\build\esp32dev\firmware.bin
You have it here https://www.cjoint.com/c/NAwp2H0tqLa for ESP32-2432S028R

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.

Code: Select all

	#-DFORCE_CONFIG # Enable or disable the forced network configuration.
@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.
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.
kniazio
Posts: 198
Joined: Thursday 06 October 2016 8:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.7243
Contact:

Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)

Post by kniazio »

This project is amazing. Is it possible to do something like this for a 4.3" Makerfabs display? Here is a link to its description:
https://wiki.makerfabs.com/ESP32_S3_Par ... Touch.html
Such a panel on this display would be a real revelation.
Thorgal789
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)

Post by Thorgal789 »

So it mean it have worked for you ? No problems, was the good file ?

I have made fast search about our device, so yes I think it's possible, on the device some video are using same libs. And there is others ESP32 with exactly same hardware here https://github.com/rzeldent/platformio- ... f32-sunton
But I have made a fast search on github too with "E32S3RGB43" and I haven't foud your device

So in the worst situation, need to find the device datasheet (have tested too, have found GPIO for led but no more) and complete this kind of file https://github.com/Smanar/CYD-Domoticz- ... S028R.json

But I m almost sure it will not work on first try, you realy need platformio to make test. If you have the device I can try to send you an image configured for it, but not sure it will work.

And on bigger screen can use more than 3*3 icons, the code is dynamic (values 3 *3 can be modified on the platoformio.ini file) but I have not tried the result yet, not sure all will work.
kniazio
Posts: 198
Joined: Thursday 06 October 2016 8:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.7243
Contact:

Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)

Post by kniazio »

The file worked for me, but Sunton is a small display. I have the Makerfabs display, the one I wrote about. Now I have Openhasp on it and it works without problems. If you can, try to make a bin file for it. I will test it. I haven't mastered platforming yet. Today my friend promised to teach me. Regards.
kniazio
Posts: 198
Joined: Thursday 06 October 2016 8:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.7243
Contact:

Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)

Post by kniazio »

Could you please provide a link to the SPIFFS library you use in the project? I get an error that this particular library is missing.
Thorgal789
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)

Post by Thorgal789 »

Yes better to install platoformio on your side for test ^^
Have started a file for your device https://github.com/Smanar/CYD-Domoticz- ... RGB43.json
But I have different information from 2 sites
- https://github.com/Makerfabs/Makerfabs- ... 3_9488.ino
- https://github.com/HASwitchPlate/openHA ... 35-cap.ini

So I m realy not sure for values.
Could you please provide a link to the SPIFFS library you use in the project?
You have the error message ? all need to be automatic using VScode+platformio

Code: Select all

Dependency Graph
|-- SPI @ 2.0.0
|-- lvgl @ 8.3.9
|-- TFT_eSPI @ 2.5.43+sha.cbf06d7
|-- XPT2046_Touchscreen @ 0.0.0+sha.5d5120e
|-- ArduinoJson @ 6.21.4
|-- WebSockets @ 2.4.1
|-- base64 @ 1.4.0
|-- Preferences @ 2.0.0
|-- HTTPClient @ 2.0.0
|-- WiFi @ 2.0.0
Building in release mode
kniazio
Posts: 198
Joined: Thursday 06 October 2016 8:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.7243
Contact:

Re: New project, a small wall display to control Domoticz using CYD (Cheap ESP32 touchscreen)

Post by kniazio »

Can't compile it. Please see attached photo with errors.

This is the screen's info page.
https://github.com/Makerfabs/ESP32-S3-P ... /tree/main
If you can, make a bin for my Makerfabs and send it
Attachments
errors.jpg
errors.jpg (205.71 KiB) Viewed 5056 times
Thorgal789
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)

Post by Thorgal789 »

The warning is not a problem, I have it too, you can ignore it, I don't use this part.
The 2 others are blocking. I have checked fastly on my side I have the definition on file

Code: Select all

.pio\libdeps\esp32dev\TFT_eSPI\TFT_Drivers\ILI9341_Defines.h
This file is created every time you launch a compilation. On my side, I can remove the folder ".pio" launch a compilation and the application go to download missing libs.
VScode1.png
VScode1.png (12.63 KiB) Viewed 4974 times
You are not missing the github plugin ? Because all libs are on github, and the application just download them, you have probably a message at start when starting from scratch (delete the .pio folder or use the garbage icon) to install it, from my memory this part was native.

You are making try for the "ESP32-2432S028R" ? (because Platformio can detect the hardware and make some "adjustements".

Code: Select all

If you can, make a bin for my Makerfabs and send it
Sure but I m using the bad values ^^, I will use the same than on your github page, I will see if I can compile it without the hardware tomorrow.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest