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

Unexpected error fetching Tapo resource status data: Invalid authentication data #478

Closed
aIexus opened this issue Nov 30, 2023 · 1 comment

Comments

@aIexus
Copy link

aIexus commented Nov 30, 2023

Description

From time to time in HA Core Logs I see error: Unexpected error fetching Tapo resource status data: Invalid authentication data
But C200 camera is working after this error in normal mode.

Reproduction Steps

N/A

Expected behavior

No any errors

If applicable, add error logs.

2023-11-30 04:34:10.319 ERROR (MainThread) [custom_components.tapo_control] Unexpected error fetching Tapo resource status data: Invalid authentication data
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 290, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 246, in _async_update_data
return await self.update_method()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/tapo_control/init.py", line 458, in async_update_data
raise e
File "/config/custom_components/tapo_control/init.py", line 449, in async_update_data
updateDataForAllControllers[controller] = await getCamData(
^^^^^^^^^^^^^^^^^
File "/config/custom_components/tapo_control/utils.py", line 625, in getCamData
data = await hass.async_add_executor_job(controller.getMost)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pytapo/init.py", line 1814, in getMost
results = self.performRequest(requestData)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pytapo/init.py", line 616, in performRequest
self.refreshStok()
File "/usr/local/lib/python3.11/site-packages/pytapo/init.py", line 423, in refreshStok
raise Exception("Invalid authentication data")
Exception: Invalid authentication data

Device Firmware

1.3.9 Build 231019 Rel. 38052n(4555)

Integration Version

5.4.12

Using stream component

Yes

Does camera work via official integrations?

Yes

Camera has all attributes filled out in developer tools

Yes

HASS Environment

Raspberry Pi 4 Model B with Debian GNU/Linux 12 (bookworm)

Search for similar issues

Yes

Additional information

HA Core: 2023.11.3
Supervisor: 2023.11.6
Docker: 24.0.7

@JurajNyiri
Copy link
Owner

This is expected, sometimes camera responds with invalid auth data and we want to log the error. Integration retries later and if camera no longer sends that it keeps on working. If camera sends it too many times in a row, reauth request is issued to HA.

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