core: Withings webhook for in_bed state not working
The problem
After setting up the new use_webhook: true YAML value and trying to get the in_bed state of my Withings Sleep, it’s not working, and I’m getting an error in the logs that look related.
Environment
- Home Assistant Core release with the issue: 0.112.0
- Last working Home Assistant Core release (if known): N/A
- Operating environment (OS/Container/Supervised/Core): OS
- Integration causing this issue: Withings
- Link to integration documentation on our website:
Problem-relevant configuration.yaml
withings:
client_id: redacted
client_secret: redacted
use_webhook: true
Traceback/Error logs
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 136, in async_refresh
self.data = await self._async_update_data()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 124, in _async_update_data
return await self.update_method()
File "/usr/src/homeassistant/homeassistant/components/withings/common.py", line 652, in async_subscribe_webhook
return await self._do_retry(self._async_subscribe_webhook)
File "/usr/src/homeassistant/homeassistant/components/withings/common.py", line 648, in _do_retry
raise exception
File "/usr/src/homeassistant/homeassistant/components/withings/common.py", line 641, in _do_retry
return await func()
File "/usr/src/homeassistant/homeassistant/components/withings/common.py", line 699, in _async_subscribe_webhook
self._api.notify_subscribe, self._webhook_config.url, appli
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.7/site-packages/withings_api/__init__.py", line 285, in notify_subscribe
self.request(path=self.PATH_NOTIFY, params=params)
File "/usr/local/lib/python3.7/site-packages/withings_api/__init__.py", line 82, in request
self._request(method=method, path=path, params=params)
File "/usr/local/lib/python3.7/site-packages/withings_api/common.py", line 896, in response_body_or_raise
raise InvalidParamsException(status=status)
withings_api.common.InvalidParamsException: Error code 293
Additional information
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 6
- Comments: 48 (9 by maintainers)
Just a reminder that after restarting home assistant and/or re-configuring the integration, the bed sensor will show “Unavailable” until it is sat upon – if all else is configured correctly and the stars are aligned.
The non-bed sensors have never worked for me… ever
My in_bed sensor is not working at all any more and I am getting the same error within the logs. Uninstalling and reinstalling the integration didn’t help. I’m running HA with Nabu Casa cloud.
Ah, that’s got it working!
I’ve set my external URL to Nabu Casa, left my internal URL as my remote.subdomain.com:8123.
Resetup my Withings integration and it now all seems to be working!
done the above and still doesnt work now i get this error “Retrying setup: ‘Arrow’ object has no attribute ‘int_timestamp’”
Yeah - sat, layed down on, or otherwise put pressure on. That’s been my experience so far. Alternatively you could go with an IFTTT webhook via the Withings plugin for IFTTT. It works, but I didn’t like the lag or noise I got from it.
Just did the exact same thing; webhook_url was using the local IP address and only after manually setting the external/internal addresses did the config change to use my nabu casa address. Nevertheless, the sensor is still displaying as unavailable and now the logs don’t show any errors. Does anyone have any tips on what to check?
Seems I have a similar problem. Shouldn’t the subscription URL be nabu casa, and not my local IP? I have no local domain name. Just using Nabu Casa and default, raw IP to access HA.
I set my Withings dev app callback to the fully qualified, external Nabu Casa callback URL.
You should create a separate issue for that @DiederikvandenB
Is there anything that needs to be provided to fix the issue, perhaps, @vangorra could have a look?