Tuya Cloud Plugin [No custom firmware require]: Finally for Domoticz

Python and python framework

Moderator: leecollings

User avatar
Xenomes
Posts: 379
Joined: Tuesday 27 November 2018 19:05
Target OS: Linux
Domoticz version: 2024.7
Location: Netherlands
Contact:

Re: Tuya Cloud Plugin [No custom firmware require]: Finally for Domoticz

Post by Xenomes »

famous wrote: Saturday 12 December 2020 20:38 I tried today, but no succes with the LSC motion sensor from Action :(
If i run the debug_discovery it also noticed 0 devices ...
In the TuyaHA library there is nothing to find that a PIR is supported, sending mail is the only thing we can do. post
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
schijndela
Posts: 17
Joined: Thursday 05 July 2018 19:36
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.10717
Contact:

Re: Tuya Cloud Plugin [No custom firmware require]: Finally for Domoticz

Post by schijndela »

In awaiting answer from Tuya, I followed the steps mentioned on the following link (https://github.com/codetheweb/tuyapi/bl ... s/SETUP.md) I created an Account on the Tuya website.

If I then run tuya-cli wizard in the Console of my RPI and fill in the requested information, all the used Devices (Sockets) will be listed!?
Could it still be a library "Issue" or am I still missing something?
GeorgeW
Posts: 2
Joined: Wednesday 23 December 2020 19:02
Target OS: Windows
Domoticz version:
Contact:

Re: Tuya Cloud Plugin [No custom firmware require]: Finally for Domoticz

Post by GeorgeW »

Hi.
I'm a beginner and I can't do anything about these problems.
After installing the Tuya Plugin, it loaded my installed devices from TUYA Smart.

1. Device Smart WIFI LED Strip Light on Aliexpress. Works on, off, and an error occurs when changing colors:
2020-12-23 18:28:39.326 (TUYA) onCommand called for Unit 1: Parameter 'Set Color', Level: 46
2020-12-23 18:28:39.327 (TUYA) Sending command for DeviceID=bf921b67a1f534e1b7rdxl
2020-12-23 18:28:39.327 (TUYA) color={'b': 84, 'cw': 0, 'g': 135, 'm': 3, 'r': 255, 't': 0, 'ww': 0} h=0.049707602339181284 s=0.6705882352941176
2020-12-23 18:28:39.316 Status: setcolbrightnessvalue: ID: 5, bri: 46, color: '{m: 3, RGB: ff8754, CWWW: 0000, CT: 0}'
2020-12-23 18:28:39.328 Error: (TUYA) 'onCommand' failed 'TypeError':'int() argument must be a string, a bytes-like object or a number, not 'NoneType''.
2020-12-23 18:28:39.328 Error: (TUYA) ----> Line 250 in 'C:\Program Files (x86)\Domoticz\plugins\tuyaha-master\plugin.py'
2020-12-23 18:28:39.328 Error: (TUYA) ----> Line 143 in 'C:\Program Files (x86)\Domoticz\plugins\tuyaha-master\plugin.py'
2020-12-23 18:28:39.329 Error: (TUYA) ----> Line 79 in 'C:\Program Files (x86)\Domoticz\plugins\tuyaha-master\tuyaha\devices\light.py'
:shock:
What can I do?

2. Device SEA801- WIFI Programmable Thermostat Heater Temperature Controller on Aliexpress reports in DOMOTICZ as a switch :shock:
What can I do?

thanks for the anwers ...
GW


translate google :-)
karlzre
Posts: 26
Joined: Sunday 06 August 2017 18:48
Target OS: -
Domoticz version:
Contact:

Re: Tuya Cloud Plugin [No custom firmware require]: Finally for Domoticz

Post by karlzre »

Hi,

I just bought this from action shop : https://www.action.com/fr-be/p/dummy-3003366/
https://www.action.com/globalassets/cms ... ImageLarge

I installed it trough the Tuya app.
It was discovered in my domoticz without any issue.

But the pir sensor is not detected.

Any idea if it can be added in domoticz ?
or if we can create a scenario if motion is detected then do something ?
or is it possible to detect the status of the lamp ?

I think that the on/off switch in domoticz can switch the ligh on/off in a manual mode.
in that mode, light stay just stay on.
If i go back to tuya app, i can set the motion mode, the it follow the "scenario" in the app ( switch on on motion, etc..)
Then i see that the switch stay on in domoticz.
I didn"t see any update in the domoticz logs .
Any idea if it's possible to enable the motion mode in domoticz and to get info when motion is detected ?
the goal is to switch other lamps when motion is detected.


Thx
edwin1234
Posts: 249
Joined: Sunday 09 October 2016 20:20
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Nederland
Contact:

Re: Tuya Cloud Plugin [No custom firmware require]: Finally for Domoticz

Post by edwin1234 »

I have this error
Can you please help

Error: (tuya) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/Domoticz-TUYA-Plugin/:/usr/lib/python35.zip:/usr/lib/python3.5:/usr/lib/python3.5/plat-arm-linux-gnueabihf:/usr/lib/python3.5/lib-dynload:/usr/local/lib/python3.5/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.5/dist-packages'.
2021-01-10 09:14:55.778 Error: (Tuya) Module Import failed, exception: 'SyntaxError'
2021-01-10 09:14:55.778 Error: (Tuya) Import detail: File: /usr/local/lib/python3.5/dist-packages/tuyaha/tuyaapi.py, Line: 69, offset: 87
2021-01-10 09:14:55.778 Error: (Tuya) Error Line ' f"Discovery interval below {MIN_DISCOVERY_INTERVAL} seconds is invalid"
2021-01-10 09:14:55.778 '
2021-01-10 09:16:00.240 Error: Tuya hardware (18) thread seems to have ended unexpectedly
User avatar
Xenomes
Posts: 379
Joined: Tuesday 27 November 2018 19:05
Target OS: Linux
Domoticz version: 2024.7
Location: Netherlands
Contact:

Re: Tuya Cloud Plugin [No custom firmware require]: Finally for Domoticz

Post by Xenomes »

You need to update the plugin to the latest version.
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
edwin1234
Posts: 249
Joined: Sunday 09 October 2016 20:20
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Nederland
Contact:

Re: Tuya Cloud Plugin [No custom firmware require]: Finally for Domoticz

Post by edwin1234 »

If i do git pull,
Then it says : already up to date
User avatar
Xenomes
Posts: 379
Joined: Tuesday 27 November 2018 19:05
Target OS: Linux
Domoticz version: 2024.7
Location: Netherlands
Contact:

Re: Tuya Cloud Plugin [No custom firmware require]: Finally for Domoticz

Post by Xenomes »

Witch plug-in you are using? What show the Product URL at the plug-in?
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
edwin1234
Posts: 249
Joined: Sunday 09 October 2016 20:20
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Nederland
Contact:

Re: Tuya Cloud Plugin [No custom firmware require]: Finally for Domoticz

Post by edwin1234 »

User avatar
Xenomes
Posts: 379
Joined: Tuesday 27 November 2018 19:05
Target OS: Linux
Domoticz version: 2024.7
Location: Netherlands
Contact:

Re: Tuya Cloud Plugin [No custom firmware require]: Finally for Domoticz

Post by Xenomes »

Could you check witch version of Tuyaha you got installed.

Code: Select all

sudo pip3 show tuyaha
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
edwin1234
Posts: 249
Joined: Sunday 09 October 2016 20:20
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Nederland
Contact:

Re: Tuya Cloud Plugin [No custom firmware require]: Finally for Domoticz

Post by edwin1234 »

This is the version
Name: tuyaha
Version: 0.0.9
Summary: A Python library that implements a Tuya API endpoint that was specially designed for Home Assistant
Home-page: https://github.com/PaulAnnekov/tuyaha
Author: Pavlo Annekov and original Tuya authors
Author-email: [email protected]
User avatar
Xenomes
Posts: 379
Joined: Tuesday 27 November 2018 19:05
Target OS: Linux
Domoticz version: 2024.7
Location: Netherlands
Contact:

Re: Tuya Cloud Plugin [No custom firmware require]: Finally for Domoticz

Post by Xenomes »

Can you give a directory listing of the plug-in?
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
edwin1234
Posts: 249
Joined: Sunday 09 October 2016 20:20
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Nederland
Contact:

Re: Tuya Cloud Plugin [No custom firmware require]: Finally for Domoticz

Post by edwin1234 »

You mean this?
plugin.py __pycache__ README.md tools
User avatar
Xenomes
Posts: 379
Joined: Tuesday 27 November 2018 19:05
Target OS: Linux
Domoticz version: 2024.7
Location: Netherlands
Contact:

Re: Tuya Cloud Plugin [No custom firmware require]: Finally for Domoticz

Post by Xenomes »

Yes that's what I mean, everything looks fine. The only difference is can see from your error code is the Python version.
Can you check the python3 -V and the what is listed ad Domoticz => Setup => About?
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
edwin1234
Posts: 249
Joined: Sunday 09 October 2016 20:20
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Nederland
Contact:

Re: Tuya Cloud Plugin [No custom firmware require]: Finally for Domoticz

Post by edwin1234 »

Python 3.5.3

Domoticz
Version: 4.10717
Build Hash: b38b49e5
Compile Date: 2019-05-09 13:04:08
dzVents Version: 2.4.19
Python Version: 3.5.3 (default, Sep 27 2018, 17:25:39) [GCC 6.3.0 20170516]
User avatar
Xenomes
Posts: 379
Joined: Tuesday 27 November 2018 19:05
Target OS: Linux
Domoticz version: 2024.7
Location: Netherlands
Contact:

Re: Tuya Cloud Plugin [No custom firmware require]: Finally for Domoticz

Post by Xenomes »

You can try to extent the heath-beat from 600 to 1200 line 71 in the Plugin.py

Code: Select all

        self.tuya._discovery_interval = 1200
The results of

Code: Select all

sudo pip3 show requests 
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
edwin1234
Posts: 249
Joined: Sunday 09 October 2016 20:20
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Nederland
Contact:

Re: Tuya Cloud Plugin [No custom firmware require]: Finally for Domoticz

Post by edwin1234 »

Request version 2.25.1
edwin1234
Posts: 249
Joined: Sunday 09 October 2016 20:20
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Nederland
Contact:

Re: Tuya Cloud Plugin [No custom firmware require]: Finally for Domoticz

Post by edwin1234 »

Error: (tuya) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/Domoticz-TUYA-Plugin/:/usr/lib/python35.zip:/usr/lib/python3.5:/usr/lib/python3.5/plat-arm-linux-gnueabihf:/usr/lib/python3.5/lib-dynload:/usr/local/lib/python3.5/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.5/dist-packages'.
2021-01-10 21:35:13.207 Error: (Tuya) Module Import failed, exception: 'SyntaxError'
2021-01-10 21:35:13.207 Error: (Tuya) Import detail: File: /usr/local/lib/python3.5/dist-packages/tuyaha/tuyaapi.py, Line: 69, offset: 87
2021-01-10 21:35:13.207 Error: (Tuya) Error Line ' f"Discovery interval below {MIN_DISCOVERY_INTERVAL} seconds is invalid"
edwin1234
Posts: 249
Joined: Sunday 09 October 2016 20:20
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Nederland
Contact:

Re: Tuya Cloud Plugin [No custom firmware require]: Finally for Domoticz

Post by edwin1234 »

Thanks for your help,
After changing plugin.py:

Error: (tuya) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/Domoticz-TUYA-Plugin/:/usr/lib/python35.zip:/usr/lib/python3.5:/usr/lib/python3.5/plat-arm-linux-gnueabihf:/usr/lib/python3.5/lib-dynload:/usr/local/lib/python3.5/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.5/dist-packages'.
2021-01-10 21:35:13.207 Error: (Tuya) Module Import failed, exception: 'SyntaxError'
2021-01-10 21:35:13.207 Error: (Tuya) Import detail: File: /usr/local/lib/python3.5/dist-packages/tuyaha/tuyaapi.py, Line: 69, offset: 87
2021-01-10 21:35:13.207 Error: (Tuya) Error Line ' f"Discovery interval below {MIN_DISCOVERY_INTERVAL} seconds is invalid"
User avatar
Xenomes
Posts: 379
Joined: Tuesday 27 November 2018 19:05
Target OS: Linux
Domoticz version: 2024.7
Location: Netherlands
Contact:

Re: Tuya Cloud Plugin [No custom firmware require]: Finally for Domoticz

Post by Xenomes »

It is missing a plug in, but i don't know which one. Can you run de debug in the tools directory, maybe we got a other clue.
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
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest