core: Eufy Component of core causing error message.
The problem
I have been receiving this error across multiple versions of HA. Some versions of HA (the first March 2024 version for instance) cause all of the devices in the Eufy integration to no longer be recognized. Restoring to a previous version of HA fixes this. This error, however, has been consistent, even when the Eufy devices are properly recognized.
Logger: homeassistant.setup Source: setup.py:333 First occurred: 2:32:57 AM (1 occurrences) Last logged: 2:32:57 AM
Error during setup of component eufy Traceback (most recent call last): File “/usr/src/homeassistant/homeassistant/setup.py”, line 333, in _async_setup_component result = await task ^^^^^^^^^^ File “/usr/local/lib/python3.12/concurrent/futures/thread.py”, line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/usr/src/homeassistant/homeassistant/components/eufy/init.py”, line 61, in setup data = lakeside.get_devices( ^^^^^^^^^^^^^^^^^^^^^ File “/usr/local/lib/python3.12/site-packages/lakeside/init.py”, line 39, in get_devices token = r.json()[‘access_token’] ~~~~~~~~^^^^^^^^^^^^^^^^ KeyError: ‘access_token’
According to fuatakgun](https://github.com/fuatakgun, the issue “issue is coming from eufy component of core not eufy security custom component”.
It seems every other iteration of HA causes Eufy to lose the devices.
What version of Home Assistant Core has the issue?
2024.2.5
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Eufy
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?
2024-03-07 19:56:02.278 ERROR (MainThread) [homeassistant.setup] Error during setup of component eufy
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 390, in _async_setup_component
result = await task
^^^^^^^^^^
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/eufy/__init__.py", line 61, in setup
data = lakeside.get_devices(
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/lakeside/__init__.py", line 39, in get_devices
token = r.json()['access_token']
~~~~~~~~^^^^^^^^^^^^^^^^
KeyError: 'access_token'
Additional information
No response
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 14
- Comments: 16
Issue still present with latest HA version (2024.08.0). First time installation means no devices are discovered.
Naked installation via configuration.yaml:
leads to the error.
I have the same issue on Home Assistant version 2025.1.0;
Logger: homeassistant.setup Source: setup.py:416 First occurred: January 3, 2025 at 23:51:43 (1 occurrences) Last logged: January 3, 2025 at 23:51:43
Error during setup of component eufy Traceback (most recent call last): File “/usr/src/homeassistant/homeassistant/setup.py”, line 416, in _async_setup_component result = await task ^^^^^^^^^^ File “/usr/local/lib/python3.13/concurrent/futures/thread.py”, line 59, in run result = self.fn(*self.args, **self.kwargs) File “/usr/src/homeassistant/homeassistant/components/eufy/init.py”, line 62, in setup data = lakeside.get_devices( config[DOMAIN][CONF_USERNAME], config[DOMAIN][CONF_PASSWORD] ) File “/usr/local/lib/python3.13/site-packages/lakeside/init.py”, line 39, in get_devices token = r.json()[‘access_token’] ~~~~~~~~^^^^^^^^^^^^^^^^ KeyError: ‘access_token’
Issue Remains:
Logger: homeassistant.setup Source: setup.py:416 First occurred: 8:05:02 PM (1 occurrences) Last logged: 8:05:02 PM
Error during setup of component eufy Traceback (most recent call last): File “/usr/src/homeassistant/homeassistant/setup.py”, line 416, in _async_setup_component result = await task ^^^^^^^^^^ File “/usr/local/lib/python3.12/concurrent/futures/thread.py”, line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/usr/src/homeassistant/homeassistant/components/eufy/init.py”, line 62, in setup data = lakeside.get_devices( ^^^^^^^^^^^^^^^^^^^^^ File “/usr/local/lib/python3.12/site-packages/lakeside/init.py”, line 39, in get_devices token = r.json()[‘access_token’] ~~~~~~~~^^^^^^^^^^^^^^^^ KeyError: ‘access_token’
Core 2024.8.3 Supervisor 2024.08.0 Operating System 13.1 Frontend 20240809.0
Yeah, looks like they require the ‘Category’ header now.
Adding the -H “category: Anything” tag to the curl instruction from the documentation returns a valid json containing the access_token, however I cannot get to any of my devices.
I don’t know if it helps but I switched to this solution: https://github.com/bropat/hassio-eufy-security-ws. I’m new to HA so I don’t know if this integration is as good as the “original” one.
Issue remains, tried something else and attempted using curl to pull local access tokens as shown in the integration page and received {“res_code”:500,“message”:“Service is temporarily unavailable. Please try again later.”}