I would like to be able to control these devices that manage the heating via Wi-Fi and the Tuya controller. These devices work with Home Assistant but are not yet supported by Gladys.
Haier domestic air conditioner (full functionality) (Do not touch, do not modify)
The air conditioners were installed by a professional. They are of the Thermor brand. The Thermor app is not compatible with Home Assistant. But the Tuya bridge detects the split units as the original Haier brand.
The eCosy controls the only radiator that is in use in my home. I bought it before I discovered Home Assistant and Zigbee.
I actually need Tuya as well. I just installed 2 Airton air conditioners + 1 pilot-wire thermostat that uses Tuya. I was indeed able to install this fairly easily in HA, and locally (well, advertised as such, but you still have to connect via the cloud).
I plan to look into this soon to modify the current integration and manage to connect.
I have a first draft for the TUYA integration to update the Tuya account configuration. I specifically modified the field names to match the names used on the website. I hid the « Client Secret » like passwords. And I added information about renewing trial periods (which are renewable for up to 3 months but completely free and are usually applied a few minutes after the request).
This update also includes the foundation for local communication (no more cloud). Switch management works locally.
The PR:
In a future PR I will add the devices as discussed previously.
PS: @pierre-gilles, I do, however, have an issue with Tuya protocol version 3.5. I can’t find a Node.js project for this protocol. Apparently only TinyTuya implements it, and it’s in Python. I can’t find a maintained project in this regard (protocol 3.5 isn’t new, it’s over 3 years old).
ChatGPT gives me 2 possibilities:
Redevelop the protocol handling ourselves like « TinyTuya » in Node.js, but we would need to maintain it afterwards
Add Python support alongside Gladys to install TinyTuya… I don’t think that’s what you want…
If any owners of Tuya devices happen to pass by, I’d be interested in feedback on a test image — for this cloud/local connection, as well as for future additions.
I’d be happy to test, but I’ll set it up via Portainer. If you confirm that my stack is correct, I’ll test it as soon as I receive your reply.
services:
tuya-test:
image: terdious/gladys:tuya-test
container_name: tuya-test
restart: always
privileged: true
network_mode: host
environment:
NODE_ENV: production
SQLITE_FILE_PATH: /var/lib/gladysassistant/gladys-tuya-test.db
SERVER_PORT: 81 # The Gladys port is 83 on my side; do I need to change it?
TZ: Europe/Paris
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/lib/gladysassistant:/var/lib/gladysassistant
- /dev:/dev
No, on the contrary, the goal here is to test in a session alongside your production. No need to stop your production. Just check that port 81 is not in use, otherwise set it to a free and accessible one ^^
The main thing being this: `SQLITE_FILE_PATH: /var
Assume that I am a “basic” user, not a developer. As such, here are my thoughts as a tester:
I’m having a bit of trouble with the Tuya configuration help that is just above the fields to fill in, including in the currently production version. It took a real effort to find the solution thinking “oh yes, there’s documentation, where is it again?” : Is it possible to add a link to the Tuya documentation that opens in a new window?
I don’t know what to put in the App Username field. Is it the Project Code that I find on Tuya Smart Developer Center or is it a name that I find in my smartphone app?
The IP devices are, for the moment, on the same network as Gladys. I therefore expect discovery to happen automatically.
Another suggestion not related to the current exercise: on Home Assistant the Tuya integration is done directly via a direct link with the smartphone app using a link via the app’s user code and then a QR code callback. Wouldn’t it be simpler to proceed this way? Especially since this implies having a Tuya app on the smartphone for both the Gladys solution and the Home Assistant solution.
PS C:\WINDOWS\system32> python --version
Python 3.12.10
PS C:\WINDOWS\system32> pip --version
pip 25.0.1 from C:\Users\alain\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip (python 3.12)
PS C:\WINDOWS\system32> python -m tinytuya scan
C:\Users\alain\AppData\Local\Programs\Python\Python312\python.exe: No module named tinytuya
PS C:\WINDOWS\system32> python3 -m pip install --user tinytuya
Python est introuvable ; exÚcutez sans arguments Ó installer Ó partir du Microsoft Store ou dÚsactivez ce raccourci dans ParamÞtres > Applications > paramÞtres d
PS C:\WINDOWS\system32>
On the Portainer side:
Make sure everything is correct; you can add the version number on the image line.
All that’s left is to enable Re-pull image and redeploy and click Update