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.75k stars 28.91k forks source link

SmartLife will not re-authenticate #112677

Open addboy58 opened 3 months ago

addboy58 commented 3 months ago

The problem

Cannot get the SmartLife integration to re-authenticate. Unable yo use 10 devices.

What version of Home Assistant Core has the issue?

2024.3.0

What was the last working version of Home Assistant Core?

2024.3.0

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Smartlife

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

mib1185 commented 3 months ago

do you mean the Tuya integration? Further there is not much to analyse in your report, no logs or what has been done before or steps to reproduce?

addboy58 commented 3 months ago

I’m trying to figure out how to try authorize the smart life app now. I moved everything to that app but it needs to re-authorize before the next update which will take a month. Thx Dave Sent from my iPhone

On Mar 9, 2024, at 4:11 PM, Michael @.***> wrote:



do you mean the Tuyahttps://www.home-assistant.io/integrations/tuya/ integration? Further there is not much to analyse in your report, no logs or what has been done before or steps to reproduce?

— Reply to this email directly, view it on GitHubhttps://github.com/home-assistant/core/issues/112677#issuecomment-1986981557, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFVED77KI5ELCSRYRM4BDULYXN3GXAVCNFSM6AAAAABEMH3RJKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBWHE4DCNJVG4. You are receiving this because you authored the thread.Message ID: @.***>

JDBalogh commented 3 months ago

According to https://github.com/tuya/tuya-smart-life : "This project has now officially been integrated into the Home Assistant official project core repository, corresponding to version 2024.2." AKA: you no longer need the Tuya "authorize" function. Just use Home Assistant.

addboy58 commented 3 months ago

Well over half of my devices are not available after authorizing two devices in the Tuya integration. They all worked befor that. Sent from my iPad

On Mar 10, 2024, at 8:33 PM, JDBalogh @.***> wrote:



According to https://github.com/tuya/tuya-smart-life : "This project has now officially been integrated into the Home Assistant official project core repository, corresponding to version 2024.2." AKA: you no longer need the Tuya "authorize" function. Just use Home Assistant.

— Reply to this email directly, view it on GitHubhttps://github.com/home-assistant/core/issues/112677#issuecomment-1987436804, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFVED74UKFJ73IAIGWVKK3DYXUCV5AVCNFSM6AAAAABEMH3RJKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBXGQZTMOBQGQ. You are receiving this because you authored the thread.Message ID: @.***>

issue-triage-workflows[bot] commented 3 weeks ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

jd3073 commented 3 weeks ago

After HA update:

seeing these errors and SmartLife hub disconnects every few hours, losing access to all SmartLife entities. Entering User Code as new SmartLife HUB re-enables all entities, until error repeats. Appreciate any insight on how to resolve.

Logger: homeassistant.config_entries Source: config_entries.py:858 First occurred: 3:12:23 AM (1 occurrences) Last logged: 3:12:23 AM

Error calling entry remove callback "######" for smartlife Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 858, in async_remove await component.async_remove_entry(hass, self) File "/config/custom_components/smartlife/init.py", line 197, in async_remove_entry await hass.async_add_executor_job(hass_data.manager.unload) 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 218, in unload self.user_repository.unload(self.terminal_id) File "/usr/local/lib/python3.12/site-packages/tuya_sharing/user.py", line 40, in unload self.api.post("/v1.0/m/token/terminal/expire", 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

Logger: tuya_sharing Source: /usr/local/lib/python3.12/site-packages/tuya_sharing/customerapi.py:160 First occurred: 3:02:17 AM (4 occurrences) Last logged: 3:12:23 AM

net work error = network error:(1010) token is expired

Logger: homeassistant.backports.enum Source: helpers/deprecation.py:197 First occurred: 3:02:12 AM (2 occurrences) Last logged: 3:11:52 AM

StrEnum was used from smartlife, this is a deprecated alias which will be removed in HA Core 2025.5. Use enum.StrEnum instead, please report it to the author of the 'smartlife' custom integration

Logger: homeassistant.config_entries Source: config_entries.py:594 First occurred: 3:02:17 AM (2 occurrences) Last logged: 3:10:53 AM

Error setting up entry "#######" for smartlife 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

mib1185 commented 3 weeks ago

Hi @jd3073 custom_components/smartlife is a custom component, which is not maintained by the HA core project. Please report your issue to the maintainer or in the source repository of this custom component. Thx 👍

jd3073 commented 3 weeks ago

Hi @jd3073 custom_components/smartlife is a custom component, which is not maintained by the HA core project. Please report your issue to the maintainer or in the source repository of this custom component. Thx 👍

Got it - thank you! Somewhere along the lines I misinterpreted SmartLife was added to core, guessing this comment is incorrect or perhaps because it's beta?

According to https://github.com/tuya/tuya-smart-life : "This project has now officially been integrated into the Home Assistant official project core repository, corresponding to version 2024.2." AKA: you no longer need the Tuya "authorize" function. Just use Home Assistant.

mib1185 commented 3 weeks ago

ok, but than I think no you first need to migrate to the HA core integrated Tuya integration 🤔

home-assistant[bot] commented 3 weeks ago

Hey there @tuya, @zlinoliver, @frenck, mind taking a look at this issue as it has been labeled with an integration (tuya) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `tuya` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign tuya` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


tuya documentation tuya source (message by IssueLinks)