Page 7 of 19

Re: [REQUEST] Plugin for Tuya

Posted: Wednesday 30 January 2019 23:00
by Zuikkis
Hello! :)

I bought this wifi IR controller: (Edit, fixed link)

https://www.aliexpress.com/item/Mini-Sm ... 59020.html

I'm planned to use it to control my air conditioner. I hoped I could integrate it in Domoticz, but that's still work in progress. :)

I managed to configure it and get the id and key. And devices show up correctly in domoticz. But there is an obvious problem :D

get_dps.py output:
Plug State Information:
{'devId': '06234732cc50e3527f35', 'dps': {'1': 'send_ir'}}

Plug DPS List:
So.. It only has one DPS called "send_ir". That's not very useful for a device that could control TVs, DVDs etc, with many buttons each! It must be missing some argument to feed the actual IR data?

TurnON.py and TurnOFF.py also work just fine with no errors when I give "send_ir" as DPS. But either won't do anything.

In the TuyaSmart android app I have configured my A/C and it is working. But also there it's problem that if I want to program a timer for example, it only shows this "send_ir" type with no parameters.. So it only works as a remote control, manually clicking buttons. Not very useful as I already have a working remote. :)

Re: [REQUEST] Plugin for Tuya

Posted: Thursday 31 January 2019 9:54
by DAVIZINHO
tixi7 wrote: Wednesday 30 January 2019 22:45 Some good news to avoid the limitations of tuya firmware.
OTA update is possible for alternative firmware:
https://www.heise.de/ct/artikel/Tuya-Co ... 84830.html
Yes i use other methot (tuyOTA) and works perfect with my multiplug zeoota.
Now i have tasmota and all works perfect without the plugin.
Thanks

Re: [REQUEST] Plugin for Tuya

Posted: Wednesday 06 February 2019 18:05
by geertvercamer
Hi,

I'm sure I have the right ID/Key/... as I can access the devices with both Node-Red and python (turnON / turnOFF)

My problem is that after adding the hardware into Domoticz, no devices are created.
In the log I see these lines repeated 15".

Anyone's got an idea?
Is there some more elaborate log available?

Thanks
-------
Update:
I find this in the log now:

Code: Select all

2019-02-07 20:40:29.134 Error: (tixi_tuya_smartplug_plugin) failed to load 'plugin.py', Python Path used was 'C:\Program Files (x86)\Domoticz\plugins\Tuya SmartPlug\;C:\Users\Hoofdgebruiker\AppData\Local\Programs\Python\Python36-32\python36.zip;C:\Users\Hoofdgebruiker\AppData\Local\Programs\Python\Python36-32\Lib\;C:\Users\Hoofdgebruiker\AppData\Local\Programs\Python\Python36-32\DLLs\;C:\Program Files (x86)\Domoticz'.
2019-02-07 20:40:29.135 Error: (Smart Plug 1) Module Import failed, exception: 'ModuleNotFoundError'
2019-02-07 20:40:29.135 Error: (Smart Plug 1) Module Import failed: ' Name: pytuya'
2019-02-07 20:40:29.135 Error: (Smart Plug 1) Error Line details not available.
However, when I try to (re)install pytuya:

Code: Select all

C:\Program Files (x86)\Domoticz\plugins\Tuya SmartPlug>pip3 install pytuya
Requirement already satisfied: pytuya in c:\users\hoofdgebruiker\appdata\local\programs\python\python36-32\lib\site-packages (7.0.2)
Requirement already satisfied: pyaes in c:\users\hoofdgebruiker\appdata\local\programs\python\python36-32\lib\site-packages (from pytuya) (1.6.1)

Re: [REQUEST] Plugin for Tuya

Posted: Saturday 09 February 2019 22:51
by dorenberg
Strange issue. Got the device ID and local ID. See the device in domoticz. But when trying to switch, only the colour of the LED goes off.

Plug State Information:
{'devId': '12716401807d3a7b5c6b', 'dps': {'6': '00ff0000000000', '4': 255, '106' : 2272, '101': True, '1': True, '2': 'colour', '10': 'ffff0505ff000000ff00ffff00 ff00ff0000ff000000', '7': 'ffff500100ff00', '104': 0, '9': 'ffff5001ff0000', '8' : 'ffff8003ff000000ff000000ff000000000000000000', '3': 180, '5': '171918009c1919 ', '105': 0}}


This is what I see. DPS 1 only shuts the LED off, but not the plug. DPS 101 is also in the list, but does nothing. Confused here. The device is lonsonho power plug from ali with power measurement.

with the turnoff.py and turnon.py I can seem to switch it with the DPS 101, but not in domoticz

Re: [REQUEST] Plugin for Tuya

Posted: Saturday 09 February 2019 23:07
by tixi7
geertvercamer wrote: Wednesday 06 February 2019 18:05 However, when I try to (re)install pytuya:

Code: Select all

C:\Program Files (x86)\Domoticz\plugins\Tuya SmartPlug>pip3 install pytuya
Requirement already satisfied: pytuya in c:\users\hoofdgebruiker\appdata\local\programs\python\python36-32\lib\site-packages (7.0.2)
Requirement already satisfied: pyaes in c:\users\hoofdgebruiker\appdata\local\programs\python\python36-32\lib\site-packages (from pytuya) (1.6.1)
From what i see, you are using pip3 to install pytuya. It is probably not the same version as the one used by the plugin.
As far as I know you are the first one using windows...

Re: [REQUEST] Plugin for Tuya

Posted: Saturday 09 February 2019 23:09
by tixi7
dorenberg wrote: Saturday 09 February 2019 22:51 Strange issue. Got the device ID and local ID. See the device in domoticz. But when trying to switch, only the colour of the LED goes off.

Plug State Information:
{'devId': '12716401807d3a7b5c6b', 'dps': {'6': '00ff0000000000', '4': 255, '106' : 2272, '101': True, '1': True, '2': 'colour', '10': 'ffff0505ff000000ff00ffff00 ff00ff0000ff000000', '7': 'ffff500100ff00', '104': 0, '9': 'ffff5001ff0000', '8' : 'ffff8003ff000000ff000000ff000000000000000000', '3': 180, '5': '171918009c1919 ', '105': 0}}


This is what I see. DPS 1 only shuts the LED off, but not the plug. DPS 101 is also in the list, but does nothing. Confused here. The device is lonsonho power plug from ali with power measurement.

with the turnoff.py and turnon.py I can seem to switch it with the DPS 101, but not in domoticz
For testing, can you try as a multisocket plug and create a group with dps 1 and 101?

Re: [REQUEST] Plugin for Tuya

Posted: Saturday 09 February 2019 23:15
by tixi7
Some update concerning the OTA update:
https://www.heise.de/ct/artikel/Tuya-Co ... 84830.html

I tried the Tasmota firmware on two different single socket and a bulb:
For the plugs it works well.
For the bulb the colour are not working at the moment.

Re: [REQUEST] Plugin for Tuya

Posted: Sunday 10 February 2019 9:54
by dorenberg
tixi7 wrote: Saturday 09 February 2019 23:09
dorenberg wrote: Saturday 09 February 2019 22:51 Strange issue. Got the device ID and local ID. See the device in domoticz. But when trying to switch, only the colour of the LED goes off.

Plug State Information:
{'devId': '12716401807d3a7b5c6b', 'dps': {'6': '00ff0000000000', '4': 255, '106' : 2272, '101': True, '1': True, '2': 'colour', '10': 'ffff0505ff000000ff00ffff00 ff00ff0000ff000000', '7': 'ffff500100ff00', '104': 0, '9': 'ffff5001ff0000', '8' : 'ffff8003ff000000ff000000ff000000000000000000', '3': 180, '5': '171918009c1919 ', '105': 0}}


This is what I see. DPS 1 only shuts the LED off, but not the plug. DPS 101 is also in the list, but does nothing. Confused here. The device is lonsonho power plug from ali with power measurement.

with the turnoff.py and turnon.py I can seem to switch it with the DPS 101, but not in domoticz
For testing, can you try as a multisocket plug and create a group with dps 1 and 101?
tried it with 1;101 in DPS field, but no response. Maybe that the numbers in this field are limited to 1 number?

Re: [REQUEST] Plugin for Tuya

Posted: Sunday 10 February 2019 11:39
by dorenberg
I have a lonsonho plug where DPS is:

104 = current in mA
105 = power in W (has to be divided by 10)
106 = voltage (has to be divided by 10)

So maybe good to make the input variable.

historical information is also found in the json output. 0.02 is in kWh of today. 0.43 is total. Can we use this too for domoticz?

## {
"result": {
"thisDay": "0.02",
"sum": "0.43",
"years": {
"2019": {
"02": "0.43"
}
}
},
"t": 1549792047291,
"success": true,
"status": "ok"
}

Re: [REQUEST] Plugin for Tuya

Posted: Sunday 10 February 2019 12:39
by dorenberg
some more info about the lohsonho smart plug. For the counter ability in domoticz dps 103 can be used in combination with the timestamp.

Code: Select all

{
"result": [
{
"code": "led_switch",
"dpId": 1,
"name": "Led Name",
"time": 1549790486134,
"type": "bool",
"value": "true"
},
{
"code": "work_mode",
"dpId": 2,
"name": "",
"time": 1549750251799,
"type": "enum",
"value": "colour"
},
{
"code": "bright_value",
"dpId": 3,
"name": "",
"time": 1549750239901,
"type": "value",
"value": "180"
},
{
"code": "temp_value",
"dpId": 4,
"name": "",
"time": 1549750239901,
"type": "value",
"value": "255"
},
{
"code": "colour_data",
"dpId": 5,
"name": "",
"time": 1549750258764,
"type": "string",
"value": "17171900f11919"
},
{
"code": "scene_data",
"dpId": 6,
"name": "",
"time": 1549750239901,
"type": "string",
"value": "00ff0000000000"
},
{
"code": "flash_scene_1",
"dpId": 7,
"name": "",
"time": 1549750239901,
"type": "string",
"value": "ffff500100ff00"
},
{
"code": "flash_scene_2",
"dpId": 8,
"name": "",
"time": 1549750239901,
"type": "string",
"value": "ffff8003ff000000ff000000ff000000000000000000"
},
{
"code": "flash_scene_3",
"dpId": 9,
"name": "",
"time": 1549750239901,
"type": "string",
"value": "ffff5001ff0000"
},
{
"code": "flash_scene_4",
"dpId": 10,
"name": "",
"time": 1549750239901,
"type": "string",
"value": "ffff0505ff000000ff00ffff00ff00ff0000ff000000"
},
{
"code": "power",
"dpId": 101,
"name": "switch name",
"time": 1549788792970,
"type": "bool",
"value": "true"
},
{
"code": "countdown",
"dpId": 102,
"name": "",
"time": 1549566662279,
"type": "value",
"value": "0"
},
{
"code": "add_ele",
"dpId": 103,
"name": "",
"time": 1549797703000,
"type": "value",
"value": "16"
},
{
"code": "cur_current",
"dpId": 104,
"name": "",
"time": 1549798233249,
"type": "value",
"value": "77"
},
{
"code": "cur_power",
"dpId": 105,
"name": "",
"time": 1549798233249,
"type": "value",
"value": "80"
},
{
"code": "cur_voltage",
"dpId": 106,
"name": "",
"time": 1549798233249,
"type": "value",
"value": "2256"
}
],
"t": 1549798234336,
"success": true,
"status": "ok
-- 

Re: [REQUEST] Plugin for Tuya

Posted: Wednesday 13 February 2019 18:57
by geertvercamer
@tixi7, isn't it strange that the get_dps.py and turnOn/Off.py are working then?

answering myself: no it isn't at those files aren't importing Domoticz.

It looks like it's failing on

Code: Select all

import Domoticz
where should I find that?
Should I download it from somewhere?

Thanks!

Re: [REQUEST] Plugin for Tuya

Posted: Thursday 14 February 2019 11:34
by dorenberg
Well I don't think it is a domoticz issue as I can switch the LED with DPS 1 (off and on). However the plug switch is 101, and that is not possible.

Re: [REQUEST] Plugin for Tuya

Posted: Friday 15 February 2019 23:56
by turbo2007
hi

i have domoticz stable 4.9700 on RPI2 python 3.4.2
domoticz freez after i enable plugin
turnON.py and turnoOFF.py script works OK
what can i check why script don't add device ?

Re: [REQUEST] Plugin for Tuya

Posted: Saturday 16 February 2019 9:22
by dorenberg
I think you have to enable domoticz to receive new devices. (red button in settings).

Re: [REQUEST] Plugin for Tuya

Posted: Saturday 16 February 2019 17:37
by turbo2007
I have enable New devices but problem is in plugin when i enable it domoticz doesn't reply i must restart it from shell and its running 5 second when plugin initialize domoticz is down

Re: [REQUEST] Plugin for Tuya

Posted: Saturday 16 February 2019 23:17
by tixi7
dorenberg wrote: Thursday 14 February 2019 11:34 Well I don't think it is a domoticz issue as I can switch the LED with DPS 1 (off and on). However the plug switch is 101, and that is not possible.
I cannot get the reason of your problem. Can you send some debug traces?

An alternative to test is to use a virtual switch and to call directly turnON/OFF as scripts

Re: [REQUEST] Plugin for Tuya

Posted: Saturday 16 February 2019 23:24
by tixi7
geertvercamer wrote: Wednesday 13 February 2019 18:57 @tixi7, isn't it strange that the get_dps.py and turnOn/Off.py are working then?

answering myself: no it isn't at those files aren't importing Domoticz.

It looks like it's failing on

Code: Select all

import Domoticz
where should I find that?
Should I download it from somewhere?

Thanks!
This is directly in Domoticz (in LInux at least). Maybe something goes wrong with your domoticz installation, but i have no idea how it works on windows.
i found this "related topic" : https://www.domoticz.com/forum/viewtopic.php?t=21367

Re: [REQUEST] Plugin for Tuya

Posted: Sunday 17 February 2019 4:20
by tixi7
turbo2007 wrote: Saturday 16 February 2019 17:37 I have enable New devices but problem is in plugin when i enable it domoticz doesn't reply i must restart it from shell and its running 5 second when plugin initialize domoticz is down
Did you follow the readme for the ln -s ... with the correct paths?

Did you check the logs?

Re: [REQUEST] Plugin for Tuya

Posted: Monday 18 February 2019 18:39
by dorenberg
tixi7 wrote: Saturday 16 February 2019 23:17
dorenberg wrote: Thursday 14 February 2019 11:34 Well I don't think it is a domoticz issue as I can switch the LED with DPS 1 (off and on). However the plug switch is 101, and that is not possible.
I cannot get the reason of your problem. Can you send some debug traces?

An alternative to test is to use a virtual switch and to call directly turnON/OFF as scripts

WITH DPS 101 PLUG SWITCHING
2019-02-18 19:02:46.228 Status: User: Admin initiated a switch command (52/TV plug/Off)
2019-02-18 19:02:46.269 Error: (TV plug) 'onCommand' failed 'KeyError'.
2019-02-18 19:02:46.269 Error: (TV plug) ----> Line 513 in '/home/pi/domoticz/plugins/Domoticz-Tuya-SmartPlug-Plugin/plugin.py', function onCommand
2019-02-18 19:02:46.269 Error: (TV plug) ----> Line 450 in '/home/pi/domoticz/plugins/Domoticz-Tuya-SmartPlug-Plugin/plugin.py', function onCommand
2019-02-18 19:02:48.444 (TV plug) Pushing 'onHeartbeatCallback' on to queue
2019-02-18 19:02:48.474 (TV plug) Processing 'onHeartbeatCallback' message
2019-02-18 19:02:48.474 (TV plug) Calling message handler 'onHeartbeat'.
2019-02-18 19:02:58.446 (TV plug) Pushing 'onHeartbeatCallback' on to queue
2019-02-18 19:02:58.495 (TV plug) Processing 'onHeartbeatCallback' message
2019-02-18 19:02:58.495 (TV plug) Calling message handler 'onHeartbeat'.
2019-02-18 19:02:58.496 (TV plug) Pushing 'WriteDirective' on to queue
2019-02-18 19:02:58.497 (TV plug) Processing 'WriteDirective' message
2019-02-18 19:02:58.497 (TV plug) Sending 86 bytes of data
2019-02-18 19:02:58.497 (TV plug) 00 00 55 aa 00 00 00 00 00 00 00 0a 00 00 00 46 7b 22 67 77 ..U�...........F{"gw
2019-02-18 19:02:58.497 (TV plug) 49 64 22 3a 22 31 32 37 31 36 34 30 31 38 30 37 64 33 61 37 Id":"12716401807d3a7
2019-02-18 19:02:58.497 (TV plug) 62 35 63 36 62 22 2c 22 64 65 76 49 64 22 3a 22 31 32 37 31 b5c6b","devId":"1271
2019-02-18 19:02:58.497 (TV plug) 36 34 30 31 38 30 37 64 33 61 37 62 35 63 36 62 22 7d 00 00 6401807d3a7b5c6b"}..
2019-02-18 19:02:58.497 (TV plug) 00 00 00 00 aa 55 .. .. .. .. .. .. .. .. .. .. .. .. .. .. ....�U
2019-02-18 19:02:58.776 (TV plug) Pushing 'ReadEvent' on to queue
2019-02-18 19:02:58.798 (TV plug) Processing 'ReadEvent' message
2019-02-18 19:02:58.798 (TV plug) Received 331 bytes of data
2019-02-18 19:02:58.798 (TV plug) 00 00 55 aa 00 00 00 00 00 00 00 0a 00 00 01 3b 00 00 00 00 ..U�...........;....
2019-02-18 19:02:58.798 (TV plug) 7b 22 64 65 76 49 64 22 3a 22 31 32 37 31 36 34 30 31 38 30 {"devId":"1271640180
2019-02-18 19:02:58.798 (TV plug) 37 64 33 61 37 62 35 63 36 62 22 2c 22 64 70 73 22 3a 7b 22 7d3a7b5c6b","dps":{"
2019-02-18 19:02:58.799 (TV plug) 31 22 3a 74 72 75 65 2c 22 32 22 3a 22 63 6f 6c 6f 75 72 22 1":true,"2":"colour"
2019-02-18 19:02:58.799 (TV plug) 2c 22 33 22 3a 31 38 30 2c 22 34 22 3a 32 35 35 2c 22 35 22 ,"3":180,"4":255,"5"
2019-02-18 19:02:58.799 (TV plug) 3a 22 31 39 31 37 31 37 30 31 35 33 31 39 31 39 22 2c 22 36 :"19171701531919","6
2019-02-18 19:02:58.799 (TV plug) 22 3a 22 30 30 66 66 30 30 30 30 30 30 30 30 30 30 22 2c 22 ":"00ff0000000000","
2019-02-18 19:02:58.799 (TV plug) 37 22 3a 22 66 66 66 66 35 30 30 31 30 30 66 66 30 30 22 2c 7":"ffff500100ff00",
2019-02-18 19:02:58.799 (TV plug) 22 38 22 3a 22 66 66 66 66 38 30 30 33 66 66 30 30 30 30 30 "8":"ffff8003ff00000
2019-02-18 19:02:58.799 (TV plug) 30 66 66 30 30 30 30 30 30 66 66 30 30 30 30 30 30 30 30 30 0ff000000ff000000000
2019-02-18 19:02:58.799 (TV plug) 30 30 30 30 30 30 30 30 30 22 2c 22 39 22 3a 22 66 66 66 66 000000000","9":"ffff
2019-02-18 19:02:58.799 (TV plug) 35 30 30 31 66 66 30 30 30 30 22 2c 22 31 30 22 3a 22 66 66 5001ff0000","10":"ff
2019-02-18 19:02:58.800 (TV plug) 66 66 30 35 30 35 66 66 30 30 30 30 30 30 66 66 30 30 66 66 ff0505ff000000ff00ff
2019-02-18 19:02:58.800 (TV plug) 66 66 30 30 66 66 30 30 66 66 30 30 30 30 66 66 30 30 30 30 ff00ff00ff0000ff0000
2019-02-18 19:02:58.800 (TV plug) 30 30 22 2c 22 31 30 31 22 3a 74 72 75 65 2c 22 31 30 34 22 00","101":true,"104"
2019-02-18 19:02:58.800 (TV plug) 3a 30 2c 22 31 30 35 22 3a 30 2c 22 31 30 36 22 3a 32 32 38 :0,"105":0,"106":228
2019-02-18 19:02:58.800 (TV plug) 39 7d 7d 2c 32 f4 93 00 00 aa 55 .. .. .. .. .. .. .. .. .. 9}},2��..�U
2019-02-18 19:02:58.800 (TV plug) Pushing 'onMessageCallback' on to queue
2019-02-18 19:02:58.800 (TV plug) Processing 'onMessageCallback' message


WITH DPS 1 (LED SWITCHING)
2019-02-18 19:04:02.001 (TV plug) Pushing 'WriteDirective' on to queue
2019-02-18 19:04:02.001 (TV plug) Processing 'onMessageCallback' message
2019-02-18 19:04:02.001 (TV plug) Calling message handler 'onMessage'.
2019-02-18 19:04:02.001 (TV plug) onMessage called: 192.168.1.102:6668 b'\x00\x00U\xaa\x00\x00\x00\x00\x00\x00\x00\n\x00\x00\x01<\x00\x00\x00\x00{"devId":"12716401807d3a7b5c6b","dps":{"1":false,"2":"colour","3":180,"4":255,"5":"19171701531919","6":"00ff0000000000","7":"ffff500100ff00","8":"ffff8003ff000000ff000000ff000000000000000000","9":"ffff5001ff0000","10":"ffff0505ff000000ff00ffff00ff00ff0000ff000000","101":true,"104":0,"105":0,"106":2296}}\xb28@Q\x00\x00\xaaU'
2019-02-18 19:04:02.002 (TV plug) Updating device from 1:'On' to have values 0:'Off'.
2019-02-18 19:04:02.014 (TV plug) Update TV plug: 0 - 'Off'
2019-02-18 19:04:02.014 (TV plug) Processing 'WriteDirective' message
2019-02-18 19:04:02.014 (TV plug) Pushing 'ReadEvent' on to queue
2019-02-18 19:04:02.015 (TV plug) Sending 86 bytes of data
2019-02-18 19:04:02.015 (TV plug) 00 00 55 aa 00 00 00 00 00 00 00 0a 00 00 00 46 7b 22 67 77 ..U�...........F{"gw
2019-02-18 19:04:02.015 (TV plug) 49 64 22 3a 22 31 32 37 31 36 34 30 31 38 30 37 64 33 61 37 Id":"12716401807d3a7
2019-02-18 19:04:02.015 (TV plug) 62 35 63 36 62 22 2c 22 64 65 76 49 64 22 3a 22 31 32 37 31 b5c6b","devId":"1271
2019-02-18 19:04:02.015 (TV plug) 36 34 30 31 38 30 37 64 33 61 37 62 35 63 36 62 22 7d 00 00 6401807d3a7b5c6b"}..
2019-02-18 19:04:02.015 (TV plug) 00 00 00 00 aa 55 .. .. .. .. .. .. .. .. .. .. .. .. .. .. ....�U
2019-02-18 19:04:02.015 (TV plug) Processing 'ReadEvent' message
2019-02-18 19:04:02.015 (TV plug) Received 183 bytes of data
2019-02-18 19:04:02.016 (TV plug) 00 00 55 aa 00 00 00 00 00 00 00 07 00 00 00 0c 00 00 00 00 ..U�................
2019-02-18 19:04:02.016 (TV plug) 78 93 70 91 00 00 aa 55 00 00 55 aa 00 00 00 00 00 00 00 08 x�p�..�U..U�........
2019-02-18 19:04:02.016 (TV plug) 00 00 00 8b 00 00 00 00 33 2e 31 32 61 64 31 39 32 39 62 36 ...�....3.12ad1929b6
2019-02-18 19:04:02.016 (TV plug) 34 31 36 32 35 36 66 2b 5a 68 67 79 73 66 71 5a 4e 45 46 6c 416256f+ZhgysfqZNEFl
2019-02-18 19:04:02.016 (TV plug) 61 30 37 38 52 61 61 37 50 79 4f 63 69 30 63 71 46 6f 43 49 a078Raa7PyOci0cqFoCI
2019-02-18 19:04:02.016 (TV plug) 4a 66 4b 49 59 6c 4c 32 6c 61 34 35 42 4b 45 38 74 69 34 30 JfKIYlL2la45BKE8ti40
2019-02-18 19:04:02.016 (TV plug) 37 54 68 6d 70 69 72 38 70 70 58 4f 56 59 32 47 72 59 6a 2f 7Thmpir8ppXOVY2GrYj/
2019-02-18 19:04:02.016 (TV plug) 6e 31 48 6e 70 74 54 34 4b 6e 52 42 61 76 68 55 48 79 62 79 n1HnptT4KnRBavhUHyby
2019-02-18 19:04:02.016 (TV plug) 43 74 4d 35 45 55 56 67 6b 69 4c 55 6e 73 3d 8e ac e2 8c 00 CtM5EUVgkiLUns=���.
2019-02-18 19:04:02.016 (TV plug) 00 aa 55 .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .�U
2019-02-18 19:04:02.016 (TV plug) Pushing 'onMessageCallback' on to queue
2019-02-18 19:04:02.017 (TV plug) Processing 'onMessageCallback' message
2019-02-18 19:04:02.017 (TV plug) Calling message handler 'onMessage'.
2019-02-18 19:04:02.017 (TV plug) onMessage called: 192.168.1.102:6668 b'\x00\x00U\xaa\x00\x00\x00\x00\x00\x00\x00\x07\x00\x00\x00\x0c\x00\x00\x00\x00x\x93p\x91\x00\x00\xaaU\x00\x00U\xaa\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x8b\x00\x00\x00\x003.12ad1929b6416256f+ZhgysfqZNEFla078Raa7PyOci0cqFoCIJfKIYlL2la45BKE8ti407Thmpir8ppXOVY2GrYj/n1HnptT4KnRBavhUHybyCtM5EUVgkiLUns=\x8e\xac\xe2\x8c\x00\x00\xaaU'
2019-02-18 19:04:02.021 (TV plug) Pushing 'ReadEvent' on to queue
2019-02-18 19:04:02.067 (TV plug) Processing 'ReadEvent' message
2019-02-18 19:04:02.067 (TV plug) Received 332 bytes of data
2019-02-18 19:04:02.067 (TV plug) 00 00 55 aa 00 00 00 00 00 00 00 0a 00 00 01 3c 00 00 00 00 ..U�...........<....
2019-02-18 19:04:02.067 (TV plug) 7b 22 64 65 76 49 64 22 3a 22 31 32 37 31 36 34 30 31 38 30 {"devId":"1271640180
2019-02-18 19:04:02.067 (TV plug) 37 64 33 61 37 62 35 63 36 62 22 2c 22 64 70 73 22 3a 7b 22 7d3a7b5c6b","dps":{"
2019-02-18 19:04:02.068 (TV plug) 31 22 3a 66 61 6c 73 65 2c 22 32 22 3a 22 63 6f 6c 6f 75 72 1":false,"2":"colour
2019-02-18 19:04:02.068 (TV plug) 22 2c 22 33 22 3a 31 38 30 2c 22 34 22 3a 32 35 35 2c 22 35 ","3":180,"4":255,"5
2019-02-18 19:04:02.068 (TV plug) 22 3a 22 31 39 31 37 31 37 30 31 35 33 31 39 31 39 22 2c 22 ":"19171701531919","
2019-02-18 19:04:02.068 (TV plug) 36 22 3a 22 30 30 66 66 30 30 30 30 30 30 30 30 30 30 22 2c 6":"00ff0000000000",
2019-02-18 19:04:02.068 (TV plug) 22 37 22 3a 22 66 66 66 66 35 30 30 31 30 30 66 66 30 30 22 "7":"ffff500100ff00"
2019-02-18 19:04:02.068 (TV plug) 2c 22 38 22 3a 22 66 66 66 66 38 30 30 33 66 66 30 30 30 30 ,"8":"ffff8003ff0000
2019-02-18 19:04:02.068 (TV plug) 30 30 66 66 30 30 30 30 30 30 66 66 30 30 30 30 30 30 30 30 00ff000000ff00000000
2019-02-18 19:04:02.068 (TV plug) 30 30 30 30 30 30 30 30 30 30 22 2c 22 39 22 3a 22 66 66 66 0000000000","9":"fff
2019-02-18 19:04:02.068 (TV plug) 66 35 30 30 31 66 66 30 30 30 30 22 2c 22 31 30 22 3a 22 66 f5001ff0000","10":"f
2019-02-18 19:04:02.068 (TV plug) 66 66 66 30 35 30 35 66 66 30 30 30 30 30 30 66 66 30 30 66 fff0505ff000000ff00f
2019-02-18 19:04:02.069 (TV plug) 66 66 66 30 30 66 66 30 30 66 66 30 30 30 30 66 66 30 30 30 fff00ff00ff0000ff000
2019-02-18 19:04:02.069 (TV plug) 30 30 30 22 2c 22 31 30 31 22 3a 74 72 75 65 2c 22 31 30 34 000","101":true,"104
2019-02-18 19:04:02.069 (TV plug) 22 3a 30 2c 22 31 30 35 22 3a 30 2c 22 31 30 36 22 3a 32 32 ":0,"105":0,"106":22
2019-02-18 19:04:02.069 (TV plug) 39 36 7d 7d b2 38 40 51 00 00 aa 55 .. .. .. .. .. .. .. .. 96}}�8@Q..�U
2019-02-18 19:04:02.069 (TV plug) Pushing 'onMessageCallback' on to queue
2019-02-18 19:04:02.069 (TV plug) Processing 'onMessageCallback' message
2019-02-18 19:04:02.069 (TV plug) Calling message handler 'o

Re: [REQUEST] Plugin for Tuya

Posted: Tuesday 19 February 2019 7:52
by tixi7
For the log dps 101, you have a key error at the beginning.

I thing you need to delete the HW and device in domoticz and then create again with the new dps value.

Let me know