Python Plugin: TUYA
Moderator: leecollings
-
- Posts: 2
- Joined: Friday 26 March 2021 16:15
- Target OS: NAS (Synology & others)
- Domoticz version: 2020.2
- Location: France
- Contact:
Re: Python Plugin: TUYA
My Domoticz was on NAS Synology, I had some problems with the plugin by Xenomes (python and requests).
New instalation with Docker and now It's perfect.
Thank's to Xenomes
New instalation with Docker and now It's perfect.
Thank's to Xenomes
NAS DS716II - Docker - RFX - RFLINK - Mysensors - ZWave
Domoticz 2021.1
Domoticz 2021.1
- Xenomes
- Posts: 379
- Joined: Tuesday 27 November 2018 19:05
- Target OS: Linux
- Domoticz version: 2024.7
- Location: Netherlands
- Contact:
Re: Python Plugin: TUYA
Nice to hear that it is working!
HP T630 (32GB SSD/8GB Mem) - Ubuntu 22.04.4 LTS (64Bit) - Domoticz 2024.7 with Machinon theme - RFLink - KaKu - Sonoff - Tasmota - Shelly - MQTT2Zigbee - OpenTherm Gateway - Tinytuya - IR Blaster - P1 Smart Meter - NPN Watermeter - Google Assistant
-
- Posts: 91
- Joined: Monday 11 January 2016 9:29
- Target OS: -
- Domoticz version: 2022.2
- Location: France
- Contact:
Re: Python Plugin: TUYA
Hi,
I really appreciate this plugin as it is working fine with my plugs, except rare http connections on these last days (haven't seen it before domoticz version 2021.01)
Anyway, I have some "wifi door detectors" appaired in SmartLife, but it doesn't appear in Domoticz, what should I do? (I activated the "add new devices", stop/start the plugin, it doesn't appear in the devices list )
Thank you for your help
I really appreciate this plugin as it is working fine with my plugs, except rare http connections on these last days (haven't seen it before domoticz version 2021.01)
Anyway, I have some "wifi door detectors" appaired in SmartLife, but it doesn't appear in Domoticz, what should I do? (I activated the "add new devices", stop/start the plugin, it doesn't appear in the devices list )
Thank you for your help
VM Debian - Domoticz stable v2023.1, RFXtrx433, Aeotec Z-Stick Gen5, APC ES700
- rts: dio, oregon, somfy
- zwave: fibaro fgs212, aeotec smart switch, vision ZG8101
- IO Homecontrol: Velux Connexoon
- logitech harmony hub, philips hue, gps Pilot
- rts: dio, oregon, somfy
- zwave: fibaro fgs212, aeotec smart switch, vision ZG8101
- IO Homecontrol: Velux Connexoon
- logitech harmony hub, philips hue, gps Pilot
- Xenomes
- Posts: 379
- Joined: Tuesday 27 November 2018 19:05
- Target OS: Linux
- Domoticz version: 2024.7
- Location: Netherlands
- Contact:
Re: Python Plugin: TUYA
Can you post a example?
You can run the debug_discovery.py from the tools directory it will show if your device is detected by the tuyaapi.
HP T630 (32GB SSD/8GB Mem) - Ubuntu 22.04.4 LTS (64Bit) - Domoticz 2024.7 with Machinon theme - RFLink - KaKu - Sonoff - Tasmota - Shelly - MQTT2Zigbee - OpenTherm Gateway - Tinytuya - IR Blaster - P1 Smart Meter - NPN Watermeter - Google Assistant
-
- Posts: 91
- Joined: Monday 11 January 2016 9:29
- Target OS: -
- Domoticz version: 2022.2
- Location: France
- Contact:
Re: Python Plugin: TUYA
Hello,
New example on this mrning:
Yes, I have already used this script, and no it doesn't show my detectors. I don't know what to do...
Except I can use the tuya skill in Alexa, and activate a virtual switch of dz for each open/close action, for each device
New example on this mrning:
Code: Select all
2021-04-27 08:02:37.787 Error: Tuya Plugin: (Tuya Plugin) handleThread: ('Connection aborted.', OSError(101, 'Network is unreachable')) line 209
Except I can use the tuya skill in Alexa, and activate a virtual switch of dz for each open/close action, for each device
VM Debian - Domoticz stable v2023.1, RFXtrx433, Aeotec Z-Stick Gen5, APC ES700
- rts: dio, oregon, somfy
- zwave: fibaro fgs212, aeotec smart switch, vision ZG8101
- IO Homecontrol: Velux Connexoon
- logitech harmony hub, philips hue, gps Pilot
- rts: dio, oregon, somfy
- zwave: fibaro fgs212, aeotec smart switch, vision ZG8101
- IO Homecontrol: Velux Connexoon
- logitech harmony hub, philips hue, gps Pilot
- Xenomes
- Posts: 379
- Joined: Tuesday 27 November 2018 19:05
- Target OS: Linux
- Domoticz version: 2024.7
- Location: Netherlands
- Contact:
Re: Python Plugin: TUYA
The device is not supported by api of Tuya. The only thing what you can do is to ask Tuya to add device to the API see https://github.com/Xenomes/Domoticz-TUY ... hould-i-do
Can you set the debugging on everything and post the messages before and after the error occurs?TroisSix wrote: ↑Tuesday 27 April 2021 14:22 New example on this mrning:Code: Select all
2021-04-27 08:02:37.787 Error: Tuya Plugin: (Tuya Plugin) handleThread: ('Connection aborted.', OSError(101, 'Network is unreachable')) line 209
HP T630 (32GB SSD/8GB Mem) - Ubuntu 22.04.4 LTS (64Bit) - Domoticz 2024.7 with Machinon theme - RFLink - KaKu - Sonoff - Tasmota - Shelly - MQTT2Zigbee - OpenTherm Gateway - Tinytuya - IR Blaster - P1 Smart Meter - NPN Watermeter - Google Assistant
-
- Posts: 91
- Joined: Monday 11 January 2016 9:29
- Target OS: -
- Domoticz version: 2022.2
- Location: France
- Contact:
Re: Python Plugin: TUYA
@Xenomes,
I haven't seen any error since the last time, I'll keep you informed if got new ones
I haven't seen any error since the last time, I'll keep you informed if got new ones
VM Debian - Domoticz stable v2023.1, RFXtrx433, Aeotec Z-Stick Gen5, APC ES700
- rts: dio, oregon, somfy
- zwave: fibaro fgs212, aeotec smart switch, vision ZG8101
- IO Homecontrol: Velux Connexoon
- logitech harmony hub, philips hue, gps Pilot
- rts: dio, oregon, somfy
- zwave: fibaro fgs212, aeotec smart switch, vision ZG8101
- IO Homecontrol: Velux Connexoon
- logitech harmony hub, philips hue, gps Pilot
- Xenomes
- Posts: 379
- Joined: Tuesday 27 November 2018 19:05
- Target OS: Linux
- Domoticz version: 2024.7
- Location: Netherlands
- Contact:
Re: Python Plugin: TUYA
HP T630 (32GB SSD/8GB Mem) - Ubuntu 22.04.4 LTS (64Bit) - Domoticz 2024.7 with Machinon theme - RFLink - KaKu - Sonoff - Tasmota - Shelly - MQTT2Zigbee - OpenTherm Gateway - Tinytuya - IR Blaster - P1 Smart Meter - NPN Watermeter - Google Assistant
-
- Posts: 91
- Joined: Monday 11 January 2016 9:29
- Target OS: -
- Domoticz version: 2022.2
- Location: France
- Contact:
Re: Python Plugin: TUYA
I searched a long time on the web, forums, etc, and no one got it working with the api.
So for the one who are searching to get the status of their door/window sensors in Dz, I could do it
I share what I've done:
Hope it will help, I know it's not a Roll's Royce, but it works well for me
So for the one who are searching to get the status of their door/window sensors in Dz, I could do it
I share what I've done:
- I added some virtual switches in Domoticz, and I added the plugin Tuya in Amazon Alexa.
- then I configure the routines to activate / deactivate the virtual switches when a sensor is opened/closed.
Hope it will help, I know it's not a Roll's Royce, but it works well for me
VM Debian - Domoticz stable v2023.1, RFXtrx433, Aeotec Z-Stick Gen5, APC ES700
- rts: dio, oregon, somfy
- zwave: fibaro fgs212, aeotec smart switch, vision ZG8101
- IO Homecontrol: Velux Connexoon
- logitech harmony hub, philips hue, gps Pilot
- rts: dio, oregon, somfy
- zwave: fibaro fgs212, aeotec smart switch, vision ZG8101
- IO Homecontrol: Velux Connexoon
- logitech harmony hub, philips hue, gps Pilot
Re: Python Plugin: TUYA
Hello, I have a problem with your plugin :
First i created hardware tuya and i got this logs in domoticz :
2021-05-01 20:53:43.352 Active notification Subsystems: fcm, http (2/13)
2021-05-01 20:53:43.358 Starting shared server on: :::6144
2021-05-01 20:53:43.288 Status: Domoticz V2021.1 (c)2012-2021 GizMoCuz
2021-05-01 20:53:43.289 Status: Build Hash: 8547c5b7e, Date: 2021-04-17 17:29:11
2021-05-01 20:53:43.289 Status: Startup Path: D:\Programmes\Domoticz\
2021-05-01 20:53:43.344 Status: PluginSystem: Started, Python version '3.9.4'.
2021-05-01 20:53:43.353 Status: WebServer(HTTP) started on address: :: with port 8080
2021-05-01 20:53:43.356 Status: WebServer(SSL) started on address: :: with port 443
2021-05-01 20:53:43.358 Status: TCPServer: shared server started...
2021-05-01 20:53:43.359 Status: RxQueue: queue worker started...
2021-05-01 20:53:45.390 Status: NotificationSystem: thread started...
2021-05-01 20:53:45.391 Status: EventSystem: reset all events...
2021-05-01 20:53:45.393 Status: EventSystem: reset all device statuses...
2021-05-01 20:53:45.446 Status: Python EventSystem: Initalizing event module.
2021-05-01 20:53:45.447 Status: EventSystem: Started
2021-05-01 20:53:45.447 Status: EventSystem: Queue thread started...
2021-05-01 20:54:22.904 Test hardware started.
2021-05-01 20:54:22.904 Status: Test: (Test) Entering work loop.
2021-05-01 20:54:22.904 Status: Test: (Test) Started.
2021-05-01 20:54:23.139 Test: (Test) Waiting 60 seconds to connect TuyaApi login timeout
2021-05-01 20:54:23.137 Status: Test: (Test) Initialized version 1.0.8, author 'Wagner Oliveira'
2021-05-01 20:55:23.146 Test: (Test) TUYA plugin started
2021-05-01 20:55:23.146 Test: (Test) Debug logging mask set to: PYTHON CONNECTION
2021-05-01 20:55:23.146 Test: (Test) 'HardwareID':'2'
2021-05-01 20:55:23.146 Test: (Test) 'HomeFolder':'D:\Programmes\Domoticz\plugins\TUYA\'
2021-05-01 20:55:23.147 Test: (Test) 'StartupFolder':'D:\Programmes\Domoticz\'
2021-05-01 20:55:23.147 Test: (Test) 'UserDataFolder':'D:\Programmes\Domoticz\'
2021-05-01 20:55:23.147 Test: (Test) 'Database':'C:\ProgramData\Domoticz\domoticz.db'
2021-05-01 20:55:23.148 Test: (Test) 'Language':'en'
2021-05-01 20:55:23.148 Test: (Test) 'Version':'1.0.8'
2021-05-01 20:55:23.148 Test: (Test) 'Author':'Wagner Oliveira'
2021-05-01 20:55:23.148 Test: (Test) 'Name':'Test'
2021-05-01 20:55:23.149 Test: (Test) 'Port':'0'
2021-05-01 20:55:23.149 Test: (Test) 'Username':'*********'
2021-05-01 20:55:23.149 Test: (Test) 'Password':'*******'
2021-05-01 20:55:23.149 Test: (Test) 'Key':'tuya'
2021-05-01 20:55:23.149 Test: (Test) 'Mode1':'33'
2021-05-01 20:55:23.150 Test: (Test) 'Mode2':'smart_life'
2021-05-01 20:55:23.150 Test: (Test) 'Mode6':'18'
2021-05-01 20:55:23.151 Test: (Test) 'DomoticzVersion':'2021.1'
2021-05-01 20:55:23.151 Test: (Test) 'DomoticzHash':'8547c5b7e'
2021-05-01 20:55:23.151 Test: (Test) 'DomoticzBuildTime':'2021-04-17 17:29:11'
2021-05-01 20:55:23.151 Test: (Test) Device count: 0
2021-05-01 20:55:23.152 Test: (Test) in handlethread
2021-05-01 20:55:23.146 Error: Test hardware (2) thread seems to have ended unexpectedly
and domoticz crashed.
Then i relaunch domoticz and here are the logs that appeared :
2021-05-01 21:03:27.262 Active notification Subsystems: fcm, http (2/13)
2021-05-01 21:03:27.268 Starting shared server on: :::6144
2021-05-01 21:03:27.195 Status: Domoticz V2021.1 (c)2012-2021 GizMoCuz
2021-05-01 21:03:27.196 Status: Build Hash: 8547c5b7e, Date: 2021-04-17 17:29:11
2021-05-01 21:03:27.199 Status: Startup Path: D:\Programmes\Domoticz\
2021-05-01 21:03:27.255 Status: PluginSystem: Started, Python version '3.9.4'.
2021-05-01 21:03:27.263 Status: WebServer(HTTP) started on address: :: with port 8080
2021-05-01 21:03:27.266 Status: WebServer(SSL) started on address: :: with port 443
2021-05-01 21:03:27.268 Status: TCPServer: shared server started...
2021-05-01 21:03:27.268 Status: RxQueue: queue worker started...
2021-05-01 21:03:29.283 Test hardware started.
2021-05-01 21:03:29.534 Test: (Test) Waiting 60 seconds to connect TuyaApi login timeout
2021-05-01 21:03:29.283 Status: Test: (Test) Entering work loop.
2021-05-01 21:03:29.283 Status: Test: (Test) Started.
2021-05-01 21:03:29.284 Status: NotificationSystem: thread started...
2021-05-01 21:03:29.285 Status: EventSystem: reset all events...
2021-05-01 21:03:29.287 Status: EventSystem: reset all device statuses...
2021-05-01 21:03:29.336 Status: Python EventSystem: Initalizing event module.
2021-05-01 21:03:29.337 Status: EventSystem: Started
2021-05-01 21:03:29.337 Status: EventSystem: Queue thread started...
2021-05-01 21:03:29.533 Status: Test: (Test) Initialized version 1.0.8, author 'Wagner Oliveira'
2021-05-01 21:03:29.774 Status: PluginSystem: 1 plugins started.
2021-05-01 21:04:29.537 Test: (Test) TUYA plugin started
2021-05-01 21:04:29.537 Test: (Test) Debug logging mask set to: PYTHON CONNECTION
2021-05-01 21:04:29.537 Test: (Test) 'HardwareID':'2'
2021-05-01 21:04:29.537 Test: (Test) 'HomeFolder':'D:\Programmes\Domoticz\plugins\TUYA\'
2021-05-01 21:04:29.538 Test: (Test) 'StartupFolder':'D:\Programmes\Domoticz\'
2021-05-01 21:04:29.538 Test: (Test) 'UserDataFolder':'D:\Programmes\Domoticz\'
2021-05-01 21:04:29.538 Test: (Test) 'Database':'C:\ProgramData\Domoticz\domoticz.db'
2021-05-01 21:04:29.538 Test: (Test) 'Language':'en'
2021-05-01 21:04:29.539 Test: (Test) 'Version':'1.0.8'
2021-05-01 21:04:29.539 Test: (Test) 'Author':'Wagner Oliveira'
2021-05-01 21:04:29.539 Test: (Test) 'Name':'Test'
2021-05-01 21:04:29.539 Test: (Test) 'Port':'0'
2021-05-01 21:04:29.540 Test: (Test) 'Username':'********'
2021-05-01 21:04:29.540 Test: (Test) 'Password':'******'
2021-05-01 21:04:29.540 Test: (Test) 'Key':'tuya'
2021-05-01 21:04:29.540 Test: (Test) 'Mode1':'33'
2021-05-01 21:04:29.541 Test: (Test) 'Mode2':'smart_life'
2021-05-01 21:04:29.541 Test: (Test) 'Mode6':'18'
2021-05-01 21:04:29.541 Test: (Test) 'DomoticzVersion':'2021.1'
2021-05-01 21:04:29.541 Test: (Test) 'DomoticzHash':'8547c5b7e'
2021-05-01 21:04:29.541 Test: (Test) 'DomoticzBuildTime':'2021-04-17 17:29:11'
2021-05-01 21:04:29.542 Test: (Test) Device count: 0
2021-05-01 21:04:29.543 Test: (Test) in handlethread
2021-05-01 21:04:29.662 Test: (Test) onHeartbeat called time=1619895869.66255
2021-05-01 21:04:29.663 Test: (Test) in handlethread
2021-05-01 21:04:29.663 Test: (Test) Device count: 0
2021-05-01 21:04:31.147 Test: (Test) DEV name=Salon 4 state=True id=70770354c44f3393bc41 online=False
and it crash again and again.
I have well changed informations in "debug_discovery.py" and it well found my devices when i run it in console.
Could you help me please ?
(Sorry for my bad english, not my natural language)
First i created hardware tuya and i got this logs in domoticz :
2021-05-01 20:53:43.352 Active notification Subsystems: fcm, http (2/13)
2021-05-01 20:53:43.358 Starting shared server on: :::6144
2021-05-01 20:53:43.288 Status: Domoticz V2021.1 (c)2012-2021 GizMoCuz
2021-05-01 20:53:43.289 Status: Build Hash: 8547c5b7e, Date: 2021-04-17 17:29:11
2021-05-01 20:53:43.289 Status: Startup Path: D:\Programmes\Domoticz\
2021-05-01 20:53:43.344 Status: PluginSystem: Started, Python version '3.9.4'.
2021-05-01 20:53:43.353 Status: WebServer(HTTP) started on address: :: with port 8080
2021-05-01 20:53:43.356 Status: WebServer(SSL) started on address: :: with port 443
2021-05-01 20:53:43.358 Status: TCPServer: shared server started...
2021-05-01 20:53:43.359 Status: RxQueue: queue worker started...
2021-05-01 20:53:45.390 Status: NotificationSystem: thread started...
2021-05-01 20:53:45.391 Status: EventSystem: reset all events...
2021-05-01 20:53:45.393 Status: EventSystem: reset all device statuses...
2021-05-01 20:53:45.446 Status: Python EventSystem: Initalizing event module.
2021-05-01 20:53:45.447 Status: EventSystem: Started
2021-05-01 20:53:45.447 Status: EventSystem: Queue thread started...
2021-05-01 20:54:22.904 Test hardware started.
2021-05-01 20:54:22.904 Status: Test: (Test) Entering work loop.
2021-05-01 20:54:22.904 Status: Test: (Test) Started.
2021-05-01 20:54:23.139 Test: (Test) Waiting 60 seconds to connect TuyaApi login timeout
2021-05-01 20:54:23.137 Status: Test: (Test) Initialized version 1.0.8, author 'Wagner Oliveira'
2021-05-01 20:55:23.146 Test: (Test) TUYA plugin started
2021-05-01 20:55:23.146 Test: (Test) Debug logging mask set to: PYTHON CONNECTION
2021-05-01 20:55:23.146 Test: (Test) 'HardwareID':'2'
2021-05-01 20:55:23.146 Test: (Test) 'HomeFolder':'D:\Programmes\Domoticz\plugins\TUYA\'
2021-05-01 20:55:23.147 Test: (Test) 'StartupFolder':'D:\Programmes\Domoticz\'
2021-05-01 20:55:23.147 Test: (Test) 'UserDataFolder':'D:\Programmes\Domoticz\'
2021-05-01 20:55:23.147 Test: (Test) 'Database':'C:\ProgramData\Domoticz\domoticz.db'
2021-05-01 20:55:23.148 Test: (Test) 'Language':'en'
2021-05-01 20:55:23.148 Test: (Test) 'Version':'1.0.8'
2021-05-01 20:55:23.148 Test: (Test) 'Author':'Wagner Oliveira'
2021-05-01 20:55:23.148 Test: (Test) 'Name':'Test'
2021-05-01 20:55:23.149 Test: (Test) 'Port':'0'
2021-05-01 20:55:23.149 Test: (Test) 'Username':'*********'
2021-05-01 20:55:23.149 Test: (Test) 'Password':'*******'
2021-05-01 20:55:23.149 Test: (Test) 'Key':'tuya'
2021-05-01 20:55:23.149 Test: (Test) 'Mode1':'33'
2021-05-01 20:55:23.150 Test: (Test) 'Mode2':'smart_life'
2021-05-01 20:55:23.150 Test: (Test) 'Mode6':'18'
2021-05-01 20:55:23.151 Test: (Test) 'DomoticzVersion':'2021.1'
2021-05-01 20:55:23.151 Test: (Test) 'DomoticzHash':'8547c5b7e'
2021-05-01 20:55:23.151 Test: (Test) 'DomoticzBuildTime':'2021-04-17 17:29:11'
2021-05-01 20:55:23.151 Test: (Test) Device count: 0
2021-05-01 20:55:23.152 Test: (Test) in handlethread
2021-05-01 20:55:23.146 Error: Test hardware (2) thread seems to have ended unexpectedly
and domoticz crashed.
Then i relaunch domoticz and here are the logs that appeared :
2021-05-01 21:03:27.262 Active notification Subsystems: fcm, http (2/13)
2021-05-01 21:03:27.268 Starting shared server on: :::6144
2021-05-01 21:03:27.195 Status: Domoticz V2021.1 (c)2012-2021 GizMoCuz
2021-05-01 21:03:27.196 Status: Build Hash: 8547c5b7e, Date: 2021-04-17 17:29:11
2021-05-01 21:03:27.199 Status: Startup Path: D:\Programmes\Domoticz\
2021-05-01 21:03:27.255 Status: PluginSystem: Started, Python version '3.9.4'.
2021-05-01 21:03:27.263 Status: WebServer(HTTP) started on address: :: with port 8080
2021-05-01 21:03:27.266 Status: WebServer(SSL) started on address: :: with port 443
2021-05-01 21:03:27.268 Status: TCPServer: shared server started...
2021-05-01 21:03:27.268 Status: RxQueue: queue worker started...
2021-05-01 21:03:29.283 Test hardware started.
2021-05-01 21:03:29.534 Test: (Test) Waiting 60 seconds to connect TuyaApi login timeout
2021-05-01 21:03:29.283 Status: Test: (Test) Entering work loop.
2021-05-01 21:03:29.283 Status: Test: (Test) Started.
2021-05-01 21:03:29.284 Status: NotificationSystem: thread started...
2021-05-01 21:03:29.285 Status: EventSystem: reset all events...
2021-05-01 21:03:29.287 Status: EventSystem: reset all device statuses...
2021-05-01 21:03:29.336 Status: Python EventSystem: Initalizing event module.
2021-05-01 21:03:29.337 Status: EventSystem: Started
2021-05-01 21:03:29.337 Status: EventSystem: Queue thread started...
2021-05-01 21:03:29.533 Status: Test: (Test) Initialized version 1.0.8, author 'Wagner Oliveira'
2021-05-01 21:03:29.774 Status: PluginSystem: 1 plugins started.
2021-05-01 21:04:29.537 Test: (Test) TUYA plugin started
2021-05-01 21:04:29.537 Test: (Test) Debug logging mask set to: PYTHON CONNECTION
2021-05-01 21:04:29.537 Test: (Test) 'HardwareID':'2'
2021-05-01 21:04:29.537 Test: (Test) 'HomeFolder':'D:\Programmes\Domoticz\plugins\TUYA\'
2021-05-01 21:04:29.538 Test: (Test) 'StartupFolder':'D:\Programmes\Domoticz\'
2021-05-01 21:04:29.538 Test: (Test) 'UserDataFolder':'D:\Programmes\Domoticz\'
2021-05-01 21:04:29.538 Test: (Test) 'Database':'C:\ProgramData\Domoticz\domoticz.db'
2021-05-01 21:04:29.538 Test: (Test) 'Language':'en'
2021-05-01 21:04:29.539 Test: (Test) 'Version':'1.0.8'
2021-05-01 21:04:29.539 Test: (Test) 'Author':'Wagner Oliveira'
2021-05-01 21:04:29.539 Test: (Test) 'Name':'Test'
2021-05-01 21:04:29.539 Test: (Test) 'Port':'0'
2021-05-01 21:04:29.540 Test: (Test) 'Username':'********'
2021-05-01 21:04:29.540 Test: (Test) 'Password':'******'
2021-05-01 21:04:29.540 Test: (Test) 'Key':'tuya'
2021-05-01 21:04:29.540 Test: (Test) 'Mode1':'33'
2021-05-01 21:04:29.541 Test: (Test) 'Mode2':'smart_life'
2021-05-01 21:04:29.541 Test: (Test) 'Mode6':'18'
2021-05-01 21:04:29.541 Test: (Test) 'DomoticzVersion':'2021.1'
2021-05-01 21:04:29.541 Test: (Test) 'DomoticzHash':'8547c5b7e'
2021-05-01 21:04:29.541 Test: (Test) 'DomoticzBuildTime':'2021-04-17 17:29:11'
2021-05-01 21:04:29.542 Test: (Test) Device count: 0
2021-05-01 21:04:29.543 Test: (Test) in handlethread
2021-05-01 21:04:29.662 Test: (Test) onHeartbeat called time=1619895869.66255
2021-05-01 21:04:29.663 Test: (Test) in handlethread
2021-05-01 21:04:29.663 Test: (Test) Device count: 0
2021-05-01 21:04:31.147 Test: (Test) DEV name=Salon 4 state=True id=70770354c44f3393bc41 online=False
and it crash again and again.
I have well changed informations in "debug_discovery.py" and it well found my devices when i run it in console.
Could you help me please ?
(Sorry for my bad english, not my natural language)
- Xenomes
- Posts: 379
- Joined: Tuesday 27 November 2018 19:05
- Target OS: Linux
- Domoticz version: 2024.7
- Location: Netherlands
- Contact:
Re: Python Plugin: TUYA
I have no idea why your Domoticz crash, but can you put the plug-in debug to all maybe we can get more info.Bobby08 wrote: ↑Saturday 01 May 2021 21:25 Hello, I have a problem with your plugin :
First i created hardware tuya and i got this logs in domoticz :
...
and it crash again and again.
I have well changed informations in "debug_discovery.py" and it well found my devices when i run it in console.
Could you help me please ?
(Sorry for my bad english, not my natural language)
HP T630 (32GB SSD/8GB Mem) - Ubuntu 22.04.4 LTS (64Bit) - Domoticz 2024.7 with Machinon theme - RFLink - KaKu - Sonoff - Tasmota - Shelly - MQTT2Zigbee - OpenTherm Gateway - Tinytuya - IR Blaster - P1 Smart Meter - NPN Watermeter - Google Assistant
Re: Python Plugin: TUYA
Thanks for your quickness, i just check and this is the "all" tab i have copied.
Or maybe i don't understand
Or maybe i don't understand
- Xenomes
- Posts: 379
- Joined: Tuesday 27 November 2018 19:05
- Target OS: Linux
- Domoticz version: 2024.7
- Location: Netherlands
- Contact:
Re: Python Plugin: TUYA
Set the debug in the plug-in to all.
HP T630 (32GB SSD/8GB Mem) - Ubuntu 22.04.4 LTS (64Bit) - Domoticz 2024.7 with Machinon theme - RFLink - KaKu - Sonoff - Tasmota - Shelly - MQTT2Zigbee - OpenTherm Gateway - Tinytuya - IR Blaster - P1 Smart Meter - NPN Watermeter - Google Assistant
Re: Python Plugin: TUYA
ok i changed the debug to all and the logs give me exactly same things as before
Am i supposed to see more things ?
Am i supposed to see more things ?
- Xenomes
- Posts: 379
- Joined: Tuesday 27 November 2018 19:05
- Target OS: Linux
- Domoticz version: 2024.7
- Location: Netherlands
- Contact:
Re: Python Plugin: TUYA
I think this is the problem you have Python version '3.9.4' running I am running the default Python Version: '3.7.3'.
Or the OS is the problem, never had tested Windows
Or the OS is the problem, never had tested Windows
Last edited by Xenomes on Saturday 01 May 2021 22:35, edited 1 time in total.
HP T630 (32GB SSD/8GB Mem) - Ubuntu 22.04.4 LTS (64Bit) - Domoticz 2024.7 with Machinon theme - RFLink - KaKu - Sonoff - Tasmota - Shelly - MQTT2Zigbee - OpenTherm Gateway - Tinytuya - IR Blaster - P1 Smart Meter - NPN Watermeter - Google Assistant
Re: Python Plugin: TUYA
ok i will try with your version then and i will inform you tomorrow.
Thank you a lot
Thank you a lot
Re: Python Plugin: TUYA
Yeeeeesss with python 3.7.3 it finally works !!!
It was a long time i try to make this work, you're genius.
Thank you very much !!! <3
It was a long time i try to make this work, you're genius.
Thank you very much !!! <3
- Xenomes
- Posts: 379
- Joined: Tuesday 27 November 2018 19:05
- Target OS: Linux
- Domoticz version: 2024.7
- Location: Netherlands
- Contact:
Re: Python Plugin: TUYA
Ok great!
HP T630 (32GB SSD/8GB Mem) - Ubuntu 22.04.4 LTS (64Bit) - Domoticz 2024.7 with Machinon theme - RFLink - KaKu - Sonoff - Tasmota - Shelly - MQTT2Zigbee - OpenTherm Gateway - Tinytuya - IR Blaster - P1 Smart Meter - NPN Watermeter - Google Assistant
Re: Python Plugin: TUYA
Hi Xenomes, after some tests I have some others issues that i dont understand.
Here my debug_discovery.py :
Getting credentials
Got credentials
{ 'access_token': 'EUheu1544366034489mQR6HQjME85BjVp',
'expires_in': 864000,
'refresh_token': 'EUheu1544366034489mQR6HFyYbkUTEdB',
'token_type': 'bearer'}
Getting devices
Got devices
{ 'header': {'code': 'SUCCESS', 'payloadVersion': 1},
'payload': { 'devices': [ { 'data': { 'brightness': '255',
'color_mode': 'white',
'color_temp': 4600,
'online': False,
'state': 'true'},
'dev_type': 'light',
'ha_type': 'light',
'icon': 'https://images.tuyaeu.com/smart/icon/ay ... 2e1b1e.png',
'id': '70770354c44f3393bc41',
'name': 'Salon 4'},
{ 'data': { 'brightness': '255',
'color_mode': 'colour',
'color_temp': 7282,
'online': True,
'state': 'false'},
'dev_type': 'light',
'ha_type': 'light',
'icon': 'https://images.tuyaeu.com/smart/icon/ay ... f1c5cf.png',
'id': 'bf37a2254fdd9384a4rixk',
'name': 'Chambre'},
{ 'data': { 'brightness': '1000',
'color_mode': 'colour',
'online': True,
'state': 'false'},
'dev_type': 'light',
'ha_type': 'light',
'icon': 'https://images.tuyaeu.com/smart/icon/15 ... s3lt_0.png',
'id': '351636742462ab1459fa',
'name': 'Ruban'},
{ 'data': { 'brightness': '255',
'color_mode': 'white',
'color_temp': 4600,
'online': True,
'state': 'false'},
'dev_type': 'light',
'ha_type': 'light',
'icon': 'https://images.tuyaeu.com/smart/icon/ay ... 2e1b1e.png',
'id': '82276021c44f33cdc0f8',
'name': 'Salon 5'},
{ 'data': { 'brightness': '255',
'color_mode': 'colour',
'online': True,
'state': 'false'},
'dev_type': 'light',
'ha_type': 'light',
'icon': 'https://images.tuyaeu.com/smart/product_icon/dj.png',
'id': '60130676b4e62d50ddd7',
'name': 'Rose'},
{ 'data': { 'brightness': '255',
'color_mode': 'white',
'online': True,
'state': 'false'},
'dev_type': 'light',
'ha_type': 'light',
'icon': 'https://images.tuyaeu.com/smart/product_icon/dj.png',
'id': '74547806807d3a4648a8',
'name': 'Cuisine'},
{ 'data': { 'brightness': '255',
'color_mode': 'white',
'online': False,
'state': 'true'},
'dev_type': 'light',
'ha_type': 'light',
'icon': 'https://images.tuyaeu.com/smart/product_icon/dj.png',
'id': '60130676b4e62d50dc19',
'name': 'Ninja'},
{ 'data': { 'brightness': '255',
'color_mode': 'white',
'color_temp': 4600,
'online': False,
'state': 'false'},
'dev_type': 'light',
'ha_type': 'light',
'icon': 'https://images.tuyaeu.com/smart/icon/ay ... 2e1b1e.png',
'id': '70770354dc4f22a71e15',
'name': 'Salon 3'},
{ 'data': { 'brightness': '255',
'color_mode': 'white',
'color_temp': 4600,
'online': True,
'state': 'false'},
'dev_type': 'light',
'ha_type': 'light',
'icon': 'https://images.tuyaeu.com/smart/icon/ay ... 2e1b1e.png',
'id': '82276021c44f33cc3b2a',
'name': 'Salon 2'},
{ 'data': { 'brightness': '255',
'color_mode': 'white',
'color_temp': 4600,
'online': True,
'state': 'false'},
'dev_type': 'light',
'ha_type': 'light',
'icon': 'https://images.tuyaeu.com/smart/icon/ay ... 2e1b1e.png',
'id': '82276021c44f33cda905',
'name': 'Salon 1'},
{ 'data': { 'brightness': '255',
'color_mode': 'white',
'online': False,
'state': 'true'},
'dev_type': 'light',
'ha_type': 'light',
'icon': 'https://images.tuyaeu.com/smart/product_icon/dj.png',
'id': '60130676b4e62d50f03f',
'name': 'Bureau'},
{ 'data': {},
'dev_type': 'scene',
'ha_type': 'scene',
'id': 'BVlmpmtwzdAkkgUx',
'name': 'Salon OFF'},
{ 'data': {},
'dev_type': 'scene',
'ha_type': 'scene',
'id': 'siXNsXHl4i6gmUVk',
'name': 'Salon ON'}],
'scenes': []}}
!!! NOW REMOVE THIS FILE, SO YOUR CREDENTIALS (username, password) WON'T LEAK !!!
In my Domoticz panel I only have the LED stripe that i can change colors, whereas all my lights are same type RGB and i only can change white warm.
Also my scenes do nothing when i click on it.
Here my debug_discovery.py :
Getting credentials
Got credentials
{ 'access_token': 'EUheu1544366034489mQR6HQjME85BjVp',
'expires_in': 864000,
'refresh_token': 'EUheu1544366034489mQR6HFyYbkUTEdB',
'token_type': 'bearer'}
Getting devices
Got devices
{ 'header': {'code': 'SUCCESS', 'payloadVersion': 1},
'payload': { 'devices': [ { 'data': { 'brightness': '255',
'color_mode': 'white',
'color_temp': 4600,
'online': False,
'state': 'true'},
'dev_type': 'light',
'ha_type': 'light',
'icon': 'https://images.tuyaeu.com/smart/icon/ay ... 2e1b1e.png',
'id': '70770354c44f3393bc41',
'name': 'Salon 4'},
{ 'data': { 'brightness': '255',
'color_mode': 'colour',
'color_temp': 7282,
'online': True,
'state': 'false'},
'dev_type': 'light',
'ha_type': 'light',
'icon': 'https://images.tuyaeu.com/smart/icon/ay ... f1c5cf.png',
'id': 'bf37a2254fdd9384a4rixk',
'name': 'Chambre'},
{ 'data': { 'brightness': '1000',
'color_mode': 'colour',
'online': True,
'state': 'false'},
'dev_type': 'light',
'ha_type': 'light',
'icon': 'https://images.tuyaeu.com/smart/icon/15 ... s3lt_0.png',
'id': '351636742462ab1459fa',
'name': 'Ruban'},
{ 'data': { 'brightness': '255',
'color_mode': 'white',
'color_temp': 4600,
'online': True,
'state': 'false'},
'dev_type': 'light',
'ha_type': 'light',
'icon': 'https://images.tuyaeu.com/smart/icon/ay ... 2e1b1e.png',
'id': '82276021c44f33cdc0f8',
'name': 'Salon 5'},
{ 'data': { 'brightness': '255',
'color_mode': 'colour',
'online': True,
'state': 'false'},
'dev_type': 'light',
'ha_type': 'light',
'icon': 'https://images.tuyaeu.com/smart/product_icon/dj.png',
'id': '60130676b4e62d50ddd7',
'name': 'Rose'},
{ 'data': { 'brightness': '255',
'color_mode': 'white',
'online': True,
'state': 'false'},
'dev_type': 'light',
'ha_type': 'light',
'icon': 'https://images.tuyaeu.com/smart/product_icon/dj.png',
'id': '74547806807d3a4648a8',
'name': 'Cuisine'},
{ 'data': { 'brightness': '255',
'color_mode': 'white',
'online': False,
'state': 'true'},
'dev_type': 'light',
'ha_type': 'light',
'icon': 'https://images.tuyaeu.com/smart/product_icon/dj.png',
'id': '60130676b4e62d50dc19',
'name': 'Ninja'},
{ 'data': { 'brightness': '255',
'color_mode': 'white',
'color_temp': 4600,
'online': False,
'state': 'false'},
'dev_type': 'light',
'ha_type': 'light',
'icon': 'https://images.tuyaeu.com/smart/icon/ay ... 2e1b1e.png',
'id': '70770354dc4f22a71e15',
'name': 'Salon 3'},
{ 'data': { 'brightness': '255',
'color_mode': 'white',
'color_temp': 4600,
'online': True,
'state': 'false'},
'dev_type': 'light',
'ha_type': 'light',
'icon': 'https://images.tuyaeu.com/smart/icon/ay ... 2e1b1e.png',
'id': '82276021c44f33cc3b2a',
'name': 'Salon 2'},
{ 'data': { 'brightness': '255',
'color_mode': 'white',
'color_temp': 4600,
'online': True,
'state': 'false'},
'dev_type': 'light',
'ha_type': 'light',
'icon': 'https://images.tuyaeu.com/smart/icon/ay ... 2e1b1e.png',
'id': '82276021c44f33cda905',
'name': 'Salon 1'},
{ 'data': { 'brightness': '255',
'color_mode': 'white',
'online': False,
'state': 'true'},
'dev_type': 'light',
'ha_type': 'light',
'icon': 'https://images.tuyaeu.com/smart/product_icon/dj.png',
'id': '60130676b4e62d50f03f',
'name': 'Bureau'},
{ 'data': {},
'dev_type': 'scene',
'ha_type': 'scene',
'id': 'BVlmpmtwzdAkkgUx',
'name': 'Salon OFF'},
{ 'data': {},
'dev_type': 'scene',
'ha_type': 'scene',
'id': 'siXNsXHl4i6gmUVk',
'name': 'Salon ON'}],
'scenes': []}}
!!! NOW REMOVE THIS FILE, SO YOUR CREDENTIALS (username, password) WON'T LEAK !!!
In my Domoticz panel I only have the LED stripe that i can change colors, whereas all my lights are same type RGB and i only can change white warm.
Also my scenes do nothing when i click on it.
- Xenomes
- Posts: 379
- Joined: Tuesday 27 November 2018 19:05
- Target OS: Linux
- Domoticz version: 2024.7
- Location: Netherlands
- Contact:
Re: Python Plugin: TUYA
That is a easy one, as mention in the readme:
⚠ RGBW(W) lights must be on a colour for correct detection ⚠
HP T630 (32GB SSD/8GB Mem) - Ubuntu 22.04.4 LTS (64Bit) - Domoticz 2024.7 with Machinon theme - RFLink - KaKu - Sonoff - Tasmota - Shelly - MQTT2Zigbee - OpenTherm Gateway - Tinytuya - IR Blaster - P1 Smart Meter - NPN Watermeter - Google Assistant
Who is online
Users browsing this forum: No registered users and 1 guest