home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
69.72k stars 28.87k forks source link

SmartLife (Tuya) needs User Code re-entered after every restart or update #119937

Open jd3073 opened 2 weeks ago

jd3073 commented 2 weeks ago

The problem

SmartLife Hub loses link after every HA update or restart, requiring end user to re-enter User Code from App, Scan and re-link otherwise all SmartLife entities are disabled. Don't recall exactly when this first happened, but fairly recent - in last 2-3 weeks. Solution is simple - relink, but hoping others experiencing same and it's not just something in my config?

What version of Home Assistant Core has the issue?

2024.6.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Core

Integration causing the issue

SmartLife (& Tuya)

Link to integration documentation on our website

No response

Diagnostics information

Smartlife-HA.rtf.zip

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Core
2024.6.3
Supervisor
2024.06.0
Operating System
12.4
Frontend
20240610.1

Additional information

All error messages/Logs are in the attached .zip file.

Edwin184 commented 1 week ago

I have the same problem as of core 2024.6.0 By the way, it did improve a little in 2024.6.0. Before I also hed to copy the automations (and remove the old) to get automations working again. With 2024.6.3 re-entering the user code and scanning the QR was enough.

githubdebit commented 1 week ago

Same problem here

dixnor commented 1 week ago

Same issue here, it seems to be related to the integration of the addin into home assistant core.

ReBoRnBG commented 1 week ago

Yeah... I have the same issue. After every HA or Core update I need to scan and add new hub. Entity's are the same, so there is no impact on automations.

heldernuno commented 1 week ago

Same issue... need to delete and add integration again after each HA restart

jd3073 commented 1 week ago

Thanks all for confirming - sounds like it's not my configuration but many experiencing the same issue.

wfa001 commented 1 week ago

Same issue here

Brett621 commented 1 week ago

Yeah... I have the same issue. After every HA or Core update I need to scan and add new hub. Entity's are the same, so there is no impact on automations.

Same problem as everyone. How are you able to get the entities to reload with the same ids? Mine appear but are all suffixed with None

djreg commented 1 week ago

Yeah... I have the same issue. After every HA or Core update I need to scan and add new hub. Entity's are the same, so there is no impact on automations.

Same problem as everyone. How are you able to get the entities to reload with the same ids? Mine appear but are all suffixed with None

when it first did it, I deleted hub then re-added and got "none" on mine. Now I add the new hub first before deleting and it is same config as before.

Brett621 commented 1 week ago

Thanks. I’ll give that a shot and report back.

Brett Beattie, CPA 678-770-4964

On Tue, Jun 25, 2024 at 8:57 AM djreg @.***> wrote:

Yeah... I have the same issue. After every HA or Core update I need to scan and add new hub. Entity's are the same, so there is no impact on automations.

Same problem as everyone. How are you able to get the entities to reload with the same ids? Mine appear but are all suffixed with None

when it first did it, I deleted hub then re-added and got "none" on mine. Now I add the new hub first before deleting and it is same config as before.

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/119937#issuecomment-2188866111, or unsubscribe https://github.com/notifications/unsubscribe-auth/BEV7O7M7GPGLJO3Y7JGFDSDZJFSKBAVCNFSM6AAAAABJQ4P7FSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBYHA3DMMJRGE . You are receiving this because you commented.Message ID: @.***>

dixnor commented 6 days ago

Debug enabled thows this error: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/smartlife/__init__.py", line 69, in async_setup_entry await hass.async_add_executor_job(smart_life_manager.report_version, __version__, smart_life_version, sharing_sdk) File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/tuya_sharing/manager.py", line 69, in report_version self.user_repository.user_version_report(ha_version, integration_version, sdk_version) File "/usr/local/lib/python3.12/site-packages/tuya_sharing/user.py", line 46, in user_version_report self.api.post("/v1.0/m/life/home-assistant/qrcode/versions", None, { File "/usr/local/lib/python3.12/site-packages/tuya_sharing/customerapi.py", line 192, in post return self.__request("POST", path, params, body) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/tuya_sharing/customerapi.py", line 121, in __request raise Exception(f"network error:({ret['code']}) {ret['msg']}") Exception: network error:(-9999999) sign invalid

Not sure if it is related to any ssl certificate on tuya api, but network request doesnt work.

zigl82 commented 1 day ago

same issue here. hub once verified by qr code is still not working after ha restart or core update. is anyone working on that issue?