Page 2 of 4

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

Posted: Saturday 12 December 2020 22:20
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

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

Posted: Sunday 13 December 2020 12:11
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?

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

Posted: Wednesday 23 December 2020 19:28
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 :-)

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

Posted: Thursday 24 December 2020 16:15
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

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

Posted: Sunday 10 January 2021 9:32
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

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

Posted: Sunday 10 January 2021 9:39
by Xenomes
You need to update the plugin to the latest version.

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

Posted: Sunday 10 January 2021 14:08
by edwin1234
If i do git pull,
Then it says : already up to date

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

Posted: Sunday 10 January 2021 15:39
by Xenomes
Witch plug-in you are using? What show the Product URL at the plug-in?

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

Posted: Sunday 10 January 2021 17:45
by edwin1234

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

Posted: Sunday 10 January 2021 19:34
by Xenomes
Could you check witch version of Tuyaha you got installed.

Code: Select all

sudo pip3 show tuyaha

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

Posted: Sunday 10 January 2021 19:55
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]

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

Posted: Sunday 10 January 2021 19:59
by Xenomes
Can you give a directory listing of the plug-in?

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

Posted: Sunday 10 January 2021 20:10
by edwin1234
You mean this?
plugin.py __pycache__ README.md tools

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

Posted: Sunday 10 January 2021 20:46
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?

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

Posted: Sunday 10 January 2021 21:08
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]

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

Posted: Sunday 10 January 2021 21:29
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 

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

Posted: Sunday 10 January 2021 21:32
by edwin1234
Request version 2.25.1

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

Posted: Sunday 10 January 2021 21:37
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"

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

Posted: Sunday 10 January 2021 21:38
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"

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

Posted: Sunday 10 January 2021 21:47
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.