Re: Python Plugin: Domoticz-TinyTUYA-Plugin (Cloud)
Posted: Saturday 15 June 2024 17:14
Hi,
I'm trying to get two new waterleak sensors to work with Domoticz. I updated to Domoticz 2024.4 but still use Python 3.6 as I struggled to update to 3.8. However I think the errors I get in the log are not associated with the python version:
Trying to switch a normal light results in:
I guess this is related to the python 3.6 version. Is there a simple fix for both?
I'm trying to get two new waterleak sensors to work with Domoticz. I updated to Domoticz 2024.4 but still use Python 3.6 as I struggled to update to 3.8. However I think the errors I get in the log are not associated with the python version:
Code: Select all
2024-06-15 17:01:45.437 Error: (JSONtoPython) Parse Error on '{ "bf1ebe05f2f8f5fab3eptc":{ "key":"_PdVCb4]k|k_|HlH","category":"waterleak","mac":"d8:d6:68:e3:95:1d","ip":,"product_id":"bw94azhcnjeu1i0v","version":3.300000}}'
2024-06-15 17:01:45.437 Error: TinyTuya: Domoticz.Configuration read failed: 'NoneType' object is not subscriptable
2024-06-15 17:01:45.437 Error: (JSONtoPython) Parse Error on '{ "bf1ebe05f2f8f5fab3eptc":{ "key":"_PdVCb4]k|k_|HlH","category":"waterleak","mac":"d8:d6:68:e3:95:1d","ip":,"product_id":"bw94azhcnjeu1i0v","version":3.300000}}'
2024-06-15 17:09:46.086 TinyTuya: Device name=Wassereinbruch Keller id=bf1ebe05f2f8f5fab3eptc category=waterleak
2024-06-15 17:09:46.570 TinyTuya: Device name= Wassereinbruch Keller id= bf1ebe05f2f8f5fab3eptc FunctionProperties= []
2024-06-15 17:09:46.570 TinyTuya: Device name= Wassereinbruch Keller id= bf1ebe05f2f8f5fab3eptc StatusProperties= [{'code': 'watersensor_state', 'name': '水浸检测状态', 'type': 'Enum', 'values': '{"range":["alarm","normal"]}'}, {'code': 'battery_percentage', 'name': '电池电量百分比', 'type': 'Integer', 'values': '{"unit":"%","min":0,"max":100,"scale":0,"step":1}'}]
2024-06-15 17:09:46.570 TinyTuya: Device name= Wassereinbruch Keller id= bf1ebe05f2f8f5fab3eptc result= [{'code': 'watersensor_state', 'value': 'normal'}, {'code': 'battery_percentage', 'value': 95}]
Code: Select all
2024-06-15 17:12:53.879 Error: TinyTuya: Call to function 'onCommand' failed, exception details:
2024-06-15 17:12:53.894 Error: TinyTuya: Traceback (most recent call last):
2024-06-15 17:12:53.894 Error: TinyTuya: File "C:\Program Files (x86)\Domoticz\plugins\Domoticz-TinyTUYA-Plugin-Master\plugin.py", line 759, in onCommand
2024-06-15 17:12:53.894 Error: TinyTuya: _plugin.onCommand(DeviceID, Unit, Command, Level, Color)
2024-06-15 17:12:53.894 Error: TinyTuya: File "C:\Program Files (x86)\Domoticz\plugins\Domoticz-TinyTUYA-Plugin-Master\plugin.py", line 156, in onCommand
2024-06-15 17:12:53.894 Error: TinyTuya: elif dev_type in ('dimmer'):
2024-06-15 17:12:53.894 Error: TinyTuya: TypeError: 'in <string>' requires string as left operand, not dict