Xenomes / Domoticz-TinyTUYA-Plugin

A bridge between Tinytuya and Domoticz
11 stars 6 forks source link

string indices must be integers line 518 #55

Closed galadril closed 11 months ago

galadril commented 1 year ago

Im currently seeing a lot of these errors on my plugin weirdly enough:

TinyTuya: handleThread: string indices must be integers line 518

Anyone has the same??

Xenomes commented 1 year ago

No other reports, what is your version of the plugin?

galadril commented 1 year ago

It is the latest, you added the garden irrigation device for me ;)

So the battery emptied of that garden irrigation device and i had to re-add the whole device to my smart-life app (as a new device)

And since that action the plugin gives this issue.. I also removed the hardware and devices from Domoticz, to cleanly readd it all over again, but its not working

galadril commented 11 months ago

maybe this helps?

List of devices: [ { "name": "Bewatering", "id": "bf24bda93ffd402c54iawi", "key": "Deleted", "uuid": "662e53aa1b89e291", "sn": "100093472003F8", "category": "sfkzq", "product_name": "R4238 Smart Irrigation Control", "product_id": "behtc3gdmbuvzrjz", "biz_type": 18, "model": "R4238", "sub": false, "icon": "https://images.tuyaeu.com/smart/icon/ay1533895021982bN2sO/11d9adfee48220559d5d8f38f612ae44.png" } ]

Properties of device: bf24bda93ffd402c54iawi { "result": { "category": "sfkzq", "functions": [ { "code": "switch", "desc": "{}", "name": "\u9600\u95e8\u5f00\u5173", "type": "Boolean", "values": "{}" }, { "code": "weather_delay", "desc": "{\"range\":[\"cancel\",\"24h\",\"48h\",\"72h\"]}", "name": "\u5929\u6c14\u5ef6\u65f6", "type": "Enum", "values": "{\"range\":[\"cancel\",\"24h\",\"48h\",\"72h\"]}" }, { "code": "countdown", "desc": "{\"unit\":\"s\",\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}", "name": "\u5012\u8ba1\u65f6", "type": "Integer", "values": "{\"unit\":\"s\",\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}" }, { "code": "cycle_time", "desc": "{}", "name": "\u5faa\u73af\u5b9a\u65f6", "type": "String", "values": "{}" } ], "status": [ { "code": "switch", "name": "\u9600\u95e8\u5f00\u5173", "type": "Boolean", "values": "{}" }, { "code": "battery_percentage", "name": "\u7535\u6c60\u7535\u91cf", "type": "Integer", "values": "{\"unit\":\"%\",\"min\":0,\"max\":100,\"scale\":0,\"step\":1}" }, { "code": "weather_delay", "name": "\u5929\u6c14\u5ef6\u65f6", "type": "Enum", "values": "{\"range\":[\"cancel\",\"24h\",\"48h\",\"72h\"]}" }, { "code": "countdown", "name": "\u5012\u8ba1\u65f6", "type": "Integer", "values": "{\"unit\":\"s\",\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}" }, { "code": "work_state", "name": "\u5de5\u4f5c\u72b6\u6001", "type": "Enum", "values": "{\"range\":[\"auto\",\"manual\",\"idle\"]}" }, { "code": "use_time_one", "name": "\u5355\u6b21\u4f7f\u7528\u65f6\u95f4", "type": "Integer", "values": "{\"unit\":\"s\",\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}" } ] }, "success": true, "t": 1695130689301, "tid": "c551717956f111ee8298eeefa7b3467e" }

galadril commented 11 months ago

fyi i've tried both branches., master and develop.. same outcome

Xenomes commented 11 months ago

Hi, I will check your JSON, but there's a small part missing: 'Status of device: bf24bda93ffd402c54iawi.' Can you please post that?

galadril commented 11 months ago

mm dont know why, but i just noticed that the device id that i used in domoticz changed... :( changing it to one of my devices is now working again. sorry for wasting your time

Xenomes commented 11 months ago

No problem! Good you found the solution!