maxym
November 16, 2021, 3:28pm
1
I have 2 Withings matts configured through core withings integration.
Recently I noticed HA asks from time to time for reconfiguration of one of them (never both).
Right now history tab shows everything is OK:
Both devices being reported as Clear (not unavailable)
Obviously logs are crear:
But at the same time HA requires reconfiguration (see how many hours ago and compare to last report time shown above:
And clicking on the link I’m being moved to Integration page:
Can you see that red card, then working withing integration represented by the last card?
To sum up: why HA requires to reconfigure/reauthorize the device so often (recently once a week or so) ? Is it normal?
3 Likes
Getting annoyed by the same… every week at least
JurajNyiri
(Juraj Nyíri)
February 17, 2022, 9:45am
3
Same here, this seems to be happening every few days.
I’m getting the same issue and found the below, looks like its being worked on.
opened 03:53PM - 01 Nov 20 UTC
integration: withings
<!-- READ THIS FIRST:
- If you need additional help with this template, pleas… e refer to https://www.home-assistant.io/help/reporting_issues/
- Make sure you are running the latest version of Home Assistant before reporting an issue: https://github.com/home-assistant/core/releases
- Do not report issues for integrations if you are using custom components or integrations.
- Provide as many details as possible. Paste logs, configuration samples and code into the backticks.
DO NOT DELETE ANY TEXT from this template! Otherwise, your issue may be closed without comment.
-->
## The problem
<!--
Describe the issue you are experiencing here to communicate to the
maintainers. Tell us what you were trying to do and what happened.
-->
I need to reauthenticate withings a few times a day. Is that an expected behavior?
## Environment
<!--
Provide details about the versions you are using, which helps us to reproduce
and find the issue quicker. Version information is found in the
Home Assistant frontend: Configuration -> Info.
-->
- Home Assistant Core release with the issue: 0.117.1
- Last working Home Assistant Core release (if known):
- Operating environment (OS/Container/Supervised/Core): Core
- Integration causing this issue: withings
- Link to integration documentation on our website: https://www.home-assistant.io/integrations/withings/
## Problem-relevant `configuration.yaml`
<!--
An example configuration that caused the problem for you. Fill this out even
if it seems unimportant to you. Please be sure to remove personal information
like passwords, private URLs and other credentials.
-->
```yaml
withings:
client_id: !secret withings_client_id
client_secret: !secret withings_client_secret
```
## Traceback/Error logs
<!--
If you come across any trace or error logs, please provide them.
-->
```txt
2020-11-01 10:12:24 ERROR (MainThread) [homeassistant.components.withings] Unexpected error fetching poll_data_update_coordinator data: 'dict' object has no attribute 'context'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/withings/common.py", line 734, in async_get_all_data
return await self._do_retry(self._async_get_all_data)
File "/usr/src/homeassistant/homeassistant/components/withings/common.py", line 654, in _do_retry
raise exception
File "/usr/src/homeassistant/homeassistant/components/withings/common.py", line 647, in _do_retry
return await func()
File "/usr/src/homeassistant/homeassistant/components/withings/common.py", line 770, in _async_get_all_data
**await self.async_get_measures(),
File "/usr/src/homeassistant/homeassistant/components/withings/common.py", line 778, in async_get_measures
response = await self._hass.async_add_executor_job(self._api.measure_get_meas)
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.8/site-packages/withings_api/__init__.py", line 159, in measure_get_meas
self.request(path=self.PATH_MEASURE, params=params)
File "/usr/local/lib/python3.8/site-packages/withings_api/__init__.py", line 81, in request
return response_body_or_raise(
File "/usr/local/lib/python3.8/site-packages/withings_api/common.py", line 894, in response_body_or_raise
raise AuthFailedException(status=status)
withings_api.common.AuthFailedException: Error code 401
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 144, in async_refresh
self.data = await self._async_update_data()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 132, in _async_update_data
return await self.update_method()
File "/usr/src/homeassistant/homeassistant/components/withings/common.py", line 747, in async_get_all_data
flow = next(
File "/usr/src/homeassistant/homeassistant/components/withings/common.py", line 751, in <genexpr>
if flow.context == context
AttributeError: 'dict' object has no attribute 'context'
```
## Additional information
Here are the screenshots of how i temporarily workaround this problem:
![image](https://user-images.githubusercontent.com/11849583/97807583-f1426d80-1c61-11eb-9d1c-2074d9c919ef.png)
![image](https://user-images.githubusercontent.com/11849583/97807614-0fa86900-1c62-11eb-9dfb-9340f9ccbd44.png)
![image](https://user-images.githubusercontent.com/11849583/97807633-349cdc00-1c62-11eb-8602-768bd330e0b8.png)
![image](https://user-images.githubusercontent.com/11849583/97807666-5d24d600-1c62-11eb-9a8d-35719a96b547.png)
![image](https://user-images.githubusercontent.com/11849583/97807645-49796f80-1c62-11eb-9607-b2b693f4d475.png)
![image](https://user-images.githubusercontent.com/11849583/97807678-6d3cb580-1c62-11eb-9ec1-159a250ba9fb.png)
![image](https://user-images.githubusercontent.com/11849583/97807691-86ddfd00-1c62-11eb-8092-9a576db8c916.png)
But as said, this needs to be done a few times a day.
Regards
Richard