I’ve been using Local Tuya for over a year to control a number of lights and switches and it’s worked well for the most part. A problem I’ve been having lately is that every few days all my Tuya lights become unavailable for a few seconds and then the integration stops working. The problem persists until I restart Home Assistant which fixes it for a few days until we repeat the process. Has anyone else run into this?
Mine does this occasionally when the network gets flaky (reasonably often because of stupid 2.4Ghz wifi)
What does your log say?
It looks like the log rolled over since the last occurrence. The next time it happens, I’ll check the logs and update this post.
It happened again this morning and I see this in the logs:
2023-09-13 06:53:04.394 WARNING (MainThread) [custom_components.localtuya.common] [ebf...g61] Disconnected - waiting for discovery broadcast
2023-09-13 06:53:04.395 WARNING (MainThread) [custom_components.localtuya.common] [ebd...erz] Disconnected - waiting for discovery broadcast
2023-09-13 06:53:04.396 WARNING (MainThread) [custom_components.localtuya.common] [ebe...lxg] Disconnected - waiting for discovery broadcast
2023-09-13 06:53:04.397 WARNING (MainThread) [custom_components.localtuya.common] [eb5...uvu] Disconnected - waiting for discovery broadcast
2023-09-13 06:53:04.398 WARNING (MainThread) [custom_components.localtuya.common] [eba...po4] Disconnected - waiting for discovery broadcast
2023-09-13 06:53:04.399 WARNING (MainThread) [custom_components.localtuya.common] [eb6...hr2] Disconnected - waiting for discovery broadcast
2023-09-13 06:53:04.399 WARNING (MainThread) [custom_components.localtuya.common] [ebb...vfh] Disconnected - waiting for discovery broadcast
2023-09-13 06:53:04.400 WARNING (MainThread) [custom_components.localtuya.common] [eb6...lpj] Disconnected - waiting for discovery broadcast
2023-09-13 06:53:04.401 WARNING (MainThread) [custom_components.localtuya.common] [eb0...sqb] Disconnected - waiting for discovery broadcast
2023-09-13 06:53:04.402 WARNING (MainThread) [custom_components.localtuya.common] [eb3...8xi] Disconnected - waiting for discovery broadcast
2023-09-13 06:53:04.403 WARNING (MainThread) [custom_components.localtuya.common] [eb8...jig] Disconnected - waiting for discovery broadcast
2023-09-13 06:53:04.720 WARNING (MainThread) [custom_components.localtuya.common] [eb7...1ai] Disconnected - waiting for discovery broadcast
2023-09-13 06:53:05.443 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/config/custom_components/localtuya/__init__.py", line 279, in setup_entities
hass.data[DOMAIN][TUYA_DEVICES][dev_id].async_connect()
KeyError: 'ebfd9a3978adb30f00mg61'
2023-09-13 06:53:06.447 ERROR (MainThread) [homeassistant.components.light] Platform localtuya does not generate unique IDs. ID local_ebfd9a3978adb30f00mg61_1 already exists - ignoring light.living_room_light_1
2023-09-13 06:53:06.474 ERROR (MainThread) [homeassistant.components.light] Platform localtuya does not generate unique IDs. ID local_ebdfad86ae978717724erz_1 already exists - ignoring light.living_room_light_2
2023-09-13 06:53:06.475 ERROR (MainThread) [homeassistant.components.light] Platform localtuya does not generate unique IDs. ID local_ebec23cd0311353e7allxg_20 already exists - ignoring light.kitchen_light_4
2023-09-13 06:53:06.476 ERROR (MainThread) [homeassistant.components.light] Platform localtuya does not generate unique IDs. ID local_eb59d5493b58eda57a2uvu_20 already exists - ignoring light.kitchen_light_2
2023-09-13 06:53:06.476 ERROR (MainThread) [homeassistant.components.light] Platform localtuya does not generate unique IDs. ID local_eba80558eff49317a2zpo4_20 already exists - ignoring light.kitchen_light_5
2023-09-13 06:53:06.477 ERROR (MainThread) [homeassistant.components.light] Platform localtuya does not generate unique IDs. ID local_eb65b134eea33f6aeflhr2_20 already exists - ignoring light.kitchen_light_3
2023-09-13 06:53:06.477 ERROR (MainThread) [homeassistant.components.light] Platform localtuya does not generate unique IDs. ID local_ebb5edcaedd4f8cac55vfh_1 already exists - ignoring light.basement_office_switch
2023-09-13 06:53:06.478 ERROR (MainThread) [homeassistant.components.light] Platform localtuya does not generate unique IDs. ID local_eb6aa0d2dcc8cb2d5ezlpj_1 already exists - ignoring light.basement_living_room_switch
2023-09-13 06:53:06.479 ERROR (MainThread) [homeassistant.components.light] Platform localtuya does not generate unique IDs. ID local_eb001548e53bb7ca58osqb_1 already exists - ignoring light.basement_kitchen_switch
2023-09-13 06:53:06.479 ERROR (MainThread) [homeassistant.components.light] Platform localtuya does not generate unique IDs. ID local_eb7d1fe7e3325a05b3lbcx_20 already exists - ignoring light.kitchen_island_light_1
2023-09-13 06:53:06.480 ERROR (MainThread) [homeassistant.components.light] Platform localtuya does not generate unique IDs. ID local_eb79ae99bdced53952v1ai_20 already exists - ignoring light.kitchen_island_light_2
2023-09-13 06:53:06.480 ERROR (MainThread) [homeassistant.components.light] Platform localtuya does not generate unique IDs. ID local_eb39d32d264772e985a8xi_1 already exists - ignoring light.basement_hallway_switch
2023-09-13 06:53:06.481 ERROR (MainThread) [homeassistant.components.light] Platform localtuya does not generate unique IDs. ID local_eb8a127b551080bb14ejig_20 already exists - ignoring light.kitchen_light_1
2023-09-13 06:53:07.381 WARNING (MainThread) [custom_components.localtuya.common] [eb7...bcx] Failed to connect to 192.168.86.73: [Errno 113] Connect call failed ('192.168.86.73', 6668)
I ended up switching from LocalTuya to the Tuya Local HACS integration and I’m not seeing the issue anymore.
I am having some challenges with localtuya(LT) and want to switch over to tuyalocal(TL). I am having some problems…would you be of assistance? I have extracted all the datapoints/id’s/local keys etc from the IoT platform but I can’t seem to get the correct information entered when I try to open the TL integration. Did you run into any issues? I have deleted a device from LT in case you cannot have the same device between the two integrations but I cannot get it loaded into TL?
Any help or guidance would be appreciated!
Any updates on it? I’m having the exact same issue
I think this thread is no longer being monitored. I have switched over to “tuya local” and seems to be working better without all the log errors.
how did you find your keys? I was going through the docs but i am not sure how they were able to get the wizard going with the lines of code
I had two different methods, I had the “local-tuya” integration installed and gathered them through add device, this shows the device id, ip address, local key and device version. I then copied the info from LT and added to the “TUYA-LOCAL” ingeration. Or you can go through the tuya developer app to grab the key.
haha funny you responded. I actually set up Tuya Local 2 days ago and just got it fully setup.