Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication #13

Open
Sir-Udo opened this issue Jul 22, 2024 · 2 comments
Open

Authentication #13

Sir-Udo opened this issue Jul 22, 2024 · 2 comments

Comments

@Sir-Udo
Copy link

Sir-Udo commented Jul 22, 2024

Hi,

for a few weeks now, every time I restart HA, I've been asked to re-authenticate myself in Smartlife. Can this be fixed?
I heard it was similar at TUYA, they probably fixed it at Tuya. Thanks Udo

@ndg63276
Copy link
Owner

This code just sends your credentials to Smartlife, and stores the token they send back as a cookie. If Smartlife says the token is no longer valid, there's nothing I can do about that, apart from asking you to re-authenticate.

If you see any useful messages in the dev console, let me know.

@Sir-Udo
Copy link
Author

Sir-Udo commented Aug 1, 2024

Recently, every time I restart Home Assistant, I have to re-authenticate myself with the app in Smartlive.
I think it's the same problem Tuya had recently. Can you please see if you can fix something?

Protokolldetails (FEHLER)
Logger: homeassistant.config_entries
Quelle: config_entries.py:586
Erstmals aufgetreten: 08:21:15 (1 Vorkommnisse)
Zuletzt protokolliert: 08:21:15

Error setting up entry [email protected] for smartlife
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 586, 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants