Open MadOtis opened 1 year ago
After removing localtuya and re-installing (after an HA restart), I was able to add the 2nd smart power strip, but it is always shown as "unavailable", but I was able to find it in the HA device list and was able to download a copy of the "diagnostic data" from the device:
"integration_manifest": {
"domain": "localtuya",
"name": "LocalTuya integration",
"version": "5.0.0",
"documentation": "https://github.com/rospogrigio/localtuya/",
"dependencies": [],
"codeowners": [
"@rospogrigio",
"@postlund"
],
"issue_tracker": "https://github.com/rospogrigio/localtuya/issues",
"requirements": [],
"config_flow": true,
"iot_class": "local_push",
"is_built_in": false
},
"data": {
"device_config": {
"friendly_name": "Bedside Strip",
"host": "10.0.1.25",
"device_id": "06<sanitized>a1",
"local_key": "e<sanitized>c",
"protocol_version": "3.1",
"enable_debug": true,
"manual_dps_strings": "1,2,3,4,5,6",
"model": "Smart Power Strip",
"dps_strings": [
"1 (value: -1)",
"2 (value: -1)",
"3 (value: -1)",
"4 (value: -1)",
"5 (value: -1)",
"6 (value: -1)"
],
"entities": [
{
"id": 6,
"friendly_name": "Bedroom Strip (All)",
"restore_on_reconnect": true,
"is_passive_entity": false,
"platform": "switch"
},
{
"id": 1,
"friendly_name": "Dyson Fan",
"restore_on_reconnect": true,
"is_passive_entity": false,
"platform": "switch"
},
{
"id": 2,
"friendly_name": "Speaker",
"restore_on_reconnect": true,
"is_passive_entity": false,
"platform": "switch"
},
{
"id": 3,
"friendly_name": "Cell Charger",
"restore_on_reconnect": true,
"is_passive_entity": false,
"platform": "switch"
},
{
"id": 4,
"friendly_name": "Unused",
"restore_on_reconnect": true,
"is_passive_entity": false,
"platform": "switch"
},
{
"id": 5,
"friendly_name": "Bedside Lamp 2",
"restore_on_reconnect": true,
"is_passive_entity": false,
"platform": "switch"
}
]
},
"device_cloud_info": {
"active_time": 1622159170,
"biz_type": 18,
"category": "cz",
"create_time": 1554597255,
"icon": "smart/icon/1524736914ad18sz4byzvckzb3a38m5nrk9_0.jpg",
"id": "06<sanitized>a1",
"ip": "<sanitized>",
"lat": "<sanitized>",
"local_key": "e<sanitized>c",
"lon": "<sanitized>",
"model": "SM-SO301/306",
"name": "Bedside Strip",
"online": true,
"owner_id": "<sanitized>",
"product_id": "of0VDuFcWsBTfzWt",
"product_name": "Smart Power Strip",
"status": [
{
"code": "switch_1",
"value": true
},
{
"code": "switch_2",
"value": true
},
{
"code": "switch_3",
"value": true
},
{
"code": "switch_4",
"value": false
},
{
"code": "switch_usb1",
"value": true
}
],
"sub": false,
"time_zone": "-08:00",
"uid": "<sanitized>",
"update_time": 1658734354,
"uuid": "<sanitized>"
}
}
}
Conversely, for the 1st strip added that does FULLY work as expected:
"integration_manifest": {
"domain": "localtuya",
"name": "LocalTuya integration",
"version": "5.0.0",
"documentation": "https://github.com/rospogrigio/localtuya/",
"dependencies": [],
"codeowners": [
"@rospogrigio",
"@postlund"
],
"issue_tracker": "https://github.com/rospogrigio/localtuya/issues",
"requirements": [],
"config_flow": true,
"iot_class": "local_push",
"is_built_in": false
},
"data": {
"device_config": {
"friendly_name": "Printer Strip",
"host": "<sanitized>",
"device_id": "06<sanitized>ab",
"local_key": "b<sanitized>c",
"protocol_version": "3.1",
"enable_debug": false,
"model": "Smart Power Strip",
"dps_strings": [
"1 (value: False)",
"2 (value: False)",
"3 (value: True)",
"4 (value: True)",
"5 (value: True)",
"6 (value: 0)"
],
"entities": [
{
"id": 6,
"friendly_name": "Printer Switch (All)",
"restore_on_reconnect": true,
"is_passive_entity": false,
"platform": "switch"
},
{
"id": 1,
"friendly_name": "Mars 2 Pro",
"restore_on_reconnect": true,
"is_passive_entity": false,
"platform": "switch"
},
{
"id": 2,
"friendly_name": "Mercury Plus",
"restore_on_reconnect": true,
"is_passive_entity": false,
"platform": "switch"
},
{
"id": 3,
"friendly_name": "Minime",
"restore_on_reconnect": true,
"is_passive_entity": false,
"platform": "switch"
},
{
"id": 4,
"friendly_name": "Doctor Evil",
"restore_on_reconnect": true,
"is_passive_entity": false,
"platform": "switch"
},
{
"id": 5,
"friendly_name": "Octorprints",
"restore_on_reconnect": true,
"is_passive_entity": false,
"platform": "switch"
}
]
},
"device_cloud_info": {
"active_time": 1634706101,
"biz_type": 18,
"category": "cz",
"create_time": 1592802552,
"icon": "smart/icon/1524736914ad18sz4byzvckzb3a38m5nrk9_0.jpg",
"id": "06<sanitized>ab",
"ip": "<sanitized>",
"lat": "<sanitized>",
"local_key": "b<sanitized>c",
"lon": "<sanitized>",
"model": "SM-SO301/306",
"name": "Printer Strip",
"online": true,
"owner_id": "<sanitized>",
"product_id": "of0VDuFcWsBTfzWt",
"product_name": "Smart Power Strip",
"status": [
{
"code": "switch_1",
"value": false
},
{
"code": "switch_2",
"value": false
},
{
"code": "switch_3",
"value": true
},
{
"code": "switch_4",
"value": true
},
{
"code": "switch_usb1",
"value": true
}
],
"sub": false,
"time_zone": "-08:00",
"uid": "<sanitized>",
"update_time": 1658734356,
"uuid": "<sanitized>"
}
}
}
Again, the 1st one added works while adding the second one fails with the "Connection to device succeeded but no datapoints found, please try again." error unless I manually add DPIDs
This is still happening after updating from 5.1.0-beta0 to 5.1.0 release tag.
I was seeing similar errors. A YAML reload didn't fix it however a full restart of the HA did 🤷♂️
The problem
A device added via Local Tuya is not showing up in the HA device list and Local Tuya reports an error that the device already exists when trying to manually re-add it.
Environment
Steps to reproduce
DP dump
Provide Home Assistant traceback/logs
^^^ Last error repeated several times with identical output
Additional information
This same device DOES work via the cloud-based Tuya integration well, and as mentioned is identical to the 1st power strip added in the first few log entries.
Ideally, I'd just like to find the errant device and remove it entirely so I can try to re-add it after an HA/LocalTuya restart.