nice plugin, great job
I'm solving a problem :
OS: Windows 10
Domoticz does not find light 'Smart Strip Light-rdjl' (Smart LED Zigbee MINI Strip Controller RGB LED Strip Light Controller TUYA)
after editing plugyn.py it will add to Domoticz:
*******************************************************************************************************************
if dev_type == "light":
..... etc.
else:
Domoticz.Device(Name=dev.name(), Unit=unit, Type=241, Subtype=2, Switchtype=7, DeviceID=dev.object_id()).Create()
Domoticz.Debug("No controls found for your light device!")
********************************************************************************************************************
Domoticz Devices:
TUYA Xenomes - Smart Strip Light-rdjl Color Switch RGB On
Domoticz log:
(TUYA Xenomes) DEV name=Smart Strip Light-rdjl state=True id=bf921bxxxxxx online=True
(TUYA Xenomes) Update 1:'On' (TUYA Xenomes - Smart Strip Light-rdjl) TimedOut=False
Domoticz change color. plugyn.py original ..... works on / off:
Error: (TUYA Xenomes) 'onCommand' failed 'TypeError':'int() argument must be a string, a bytes-like object or a number, not 'NoneType''.
Eror: (TUYA Xenomes) ----> Line 276 in 'C:\Program Files (x86)\Domoticz\plugins\Domoticz-TUYA-Plugin-master\plugin.py'
Error: (TUYA Xenomes) ----> Line 150 in 'C:\Program Files (x86)\Domoticz\plugins\Domoticz-TUYA-Plugin-master\plugin.py'
Error: (TUYA Xenomes) ----> Line 79 in 'C:\Program Files (x86)\Domoticz\plugins\Domoticz-TUYA-Plugin-master\tuyaha\devices\light.py'
(TUYA Xenomes) onCommand called for Unit 4: Parameter 'Set Color', Level: 15
(TUYA Xenomes) Sending command for DeviceID=bf921bxxxxxxxx
(TUYA Xenomes) color={'b': 98, 'cw': 0, 'g': 199, 'm': 3, 'r': 255, 't': 0, 'ww': 0} h=0.10721868365180466 s=0.615686274509804
Status: setcolbrightnessvalue: ID: 8, bri: 15, color: '{m: 3, RGB: ffc762, CWWW: 0000, CT: 0}'
Domoticz change color. plugyn.py edit .... works on / off and brightness not works color:
*******************************************************************************************************************
Domoticz.Debug("color="+str(rgb)+" h="+str(h)+" s="+str(s))
# If color changed
if Devices[Unit].Color != Hue:
# if mode == 3:
# dev.set_color( [ h*360, s*100 ] )
# Domoticz.Debug("Set color called")
# if mode == 2:
temp = round(2700+((6500-2700)/255*(255-t)))
Domoticz.Debug("temp = " + str(temp))
dev.set_color_temp( temp )
Domoticz.Debug("Set white called")
# If level changed
*******************************************************************************************************************
Domoticz change color:
(TUYA Xenomes) Sending command for DeviceID=bf921bxxxxxxxx
(TUYA Xenomes) color={'b': 107, 'cw': 0, 'g': 144, 'm': 3, 'r': 255, 't': 0, 'ww': 0} h=0.041666666666666664 s=0.5803921568627451
Status: setcolbrightnessvalue: ID: 8, bri: 15, color: '{m: 3, RGB: ff906b, CWWW: 0000, CT: 0}'
Status: setcolbrightnessvalue: ID: 8, bri: 15, color: '{m: 3, RGB: ff906b, CWWW: 0000, CT: 0}'
Domoticz change brightness
(TUYA Xenomes) onCommand called for Unit 4: Parameter 'Set Color', Level: 74
2020-12-25 12:47:12.082 (TUYA Xenomes) Sending command for DeviceID=bf921bxxxxxxxxxxxxxxx
2020-12-25 12:47:12.083 (TUYA Xenomes) color={'b': 106, 'cw': 0, 'g': 143, 'm': 3, 'r': 255, 't': 0, 'ww': 0} h=0.04138702460850112 s=0.5843137254901961
2020-12-25 12:47:12.084 (TUYA Xenomes) temp = 6500
2020-12-25 12:47:12.288 (TUYA Xenomes) Set white called
2020-12-25 12:47:12.471 (TUYA Xenomes) Set bright called
******************************************************************************************************************
debug_discovery.py :
'header': {'code': 'SUCCESS', 'payloadVersion': 1},
'payload': { 'devices': [ { 'data': { 'color_mode': 'colour',
'online': True,
'state': 'true'},
'dev_type': 'light',
'ha_type': 'light',
'icon': '
https://images.tuyaeu.com/smart/icon/ay ... fd4c91.png',
'id': 'bf921bxxxxxxxxxxxx',
'name': 'Smart Strip Light-rdjl'}, ..... etc.
1. debug_discovery.py isn't there an TUYA extension?
2. how to edit * .py win10? (notepad not exactly ideal
)
3. some tool for monitoring communication TUYA and Android mobile?
thank you for answer
GW