Withings sleep monitor. Is anyone still working on an integration

It works for me now as well (after removing and readding the Integration - Details see above).

Mine is still unavailable.

Are there specific steps needed?

I just tried to remove and readd it work no luck.

I suppose the state will be unavailable until you trigger change of its state. So after reconfiguring just sit down on bed for a while

1 Like

Oh ok I understand ty

OK, so I kept my withings settings as is in the config yaml file, and I deleted the integration, then re-added the integration, and I’m still unable to update in_bed sensor.

Took a look at the logs and:

2020-09-19 12:54:34 ERROR (MainThread) [homeassistant.components.withings] Unexpected error fetching subscription_update_coordinator data: Error code 293
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 143, in async_refresh
    self.data = await self._async_update_data()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 131, in _async_update_data
    return await self.update_method()
  File "/usr/src/homeassistant/homeassistant/components/withings/common.py", line 657, in async_subscribe_webhook
    return await self._do_retry(self._async_subscribe_webhook)
  File "/usr/src/homeassistant/homeassistant/components/withings/common.py", line 653, in _do_retry
    raise exception
  File "/usr/src/homeassistant/homeassistant/components/withings/common.py", line 646, in _do_retry
    return await func()
  File "/usr/src/homeassistant/homeassistant/components/withings/common.py", line 703, in _async_subscribe_webhook
    await self._hass.async_add_executor_job(
  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 285, in notify_subscribe
    self.request(path=self.PATH_NOTIFY, 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 896, in response_body_or_raise
    raise InvalidParamsException(status=status)
withings_api.common.InvalidParamsException: Error code 293

OK. I think I finally resolved this.

If you are using Nabu Casa and this isn’t working for you, make sure of the following:

  1. After you set the web_hook, secret, etc, delete the integration and re-add.
  2. Under Configuration/General, make sure that the External URL is set to your Nabu Casa URL.

Both of those steps got this working for me.

Reference: https://github.com/home-assistant/core/issues/37290

I was able to use my two Withings sleep pad’s by setting up the yaml accordingly and added the Withings-integration from the integrations menu. I’m not using Nabu Casa, so I just used my external IP-address using nginx.
The registered link @ Withings-account is e.g: https://yourown.duckdns.org/auth/external/callback

One of both pads wasn’t updating when sitting on bed. I’ve done a factory reset, re-added the intregration and started over. Now both are working like a charm.

how accurate are these for bed presence detection?

pretty accurate. But mat depends on its positioning. I have about 30cm mattress laying on the sensor and have no problems.
Regarding reaction time hue lamp turns off after 10 to 60 secs (rarely single minutes)

1 Like

I’ve has the same experience. Usually reports in bed quickly, as well as out of bed. 10-30 seconds, usually closer to 10

1 Like

HI @stephano90
im trying to do the same. Can you share youw withings set up please?
Do you have both pads under one withings account and specify 2 different people in there?
Or do you have separate withings account for each person?

@alexbell You can add multiple users (and thus pads) in one Withings-account. Once you have done this, you can begin the setup in Home Assistant. This is easy, since there is an integration for it.

Start searching for Withings in the integration menu from Home assistant, login with your Withings-account and then need to specify the user you want to add. Since you also have two pads, you need to run this process twice.

just be aware if those two devices are registered to two withings account

During adding devices to integration, after confirming the first one, user stays logged in withings portal. Attempt to register next device will use the same account.

Not sure, but possibly login survives browser restart. so you have to logout from withings user page manually prior to adding second device.

Withings keeps asking me to refresh integration for one or both users every so often. Probably every two weeks or so. Does anyone know how this can be fixed at all?

Hey guys,

Trying to add the integration, but getting this error.

500 Internal Server Error

Im using IIS proxy, but I still get the same error even if I change it to the local address as specified in the integration doco

Anyone seen this?

Ok, Ive got it working. But it won’t trigger on or off for the test automation I have set up.

Also does not appear as a device that can trigger a routine in Alexa.

How are people using this to trigger automations and or routines in Alexa?

Thanks :slight_smile:

Maybe not related with the integration (could be though). Did you ever hear about possibility of intercepting a communication between sleep mat and withings cloud?
Ive read that someone succeeded with another withings device.

Thank god for this guy :slight_smile:

For anyone struggling with how this should work

alias: Morning Wake Up Music
description: ''
trigger:
  - platform: state
    entity_id: calendar.wakeup
    to: 'on'
condition:
  - condition: state
    entity_id: binary_sensor.withings_in_bed_reeds_bed
    state: 'on'
action:
  - service: media_player.volume_set
    data:
      volume_level: '0.10'
    entity_id: media_player.echo_dot_master_bedroom
  - service: script.play_music_master_bedroom
    data: {}
  - delay: '00:01:00'
  - service: media_player.volume_set
    data:
      volume_level: '0.20'
    entity_id: media_player.echo_dot_master_bedroom
  - delay: '00:05:00'
  - condition: state
    entity_id: binary_sensor.withings_in_bed_reeds_bed
    state: 'on'
  - service: script.alexa_speak_wake_up
    data: {}
mode: single

I’m interested if anyone tried to set up an alarm using the sleep cycles, so you can set the alarm to wake you up when your sleepcycle is over. If not by Whitings product, is there any other way to do this?

Not possible with sleep cycles. IN fact I bought 2 mats for that reason. But then we figured out, that sleep phases available in Withings api are not suitable for real-time-like usage. And it’s not about delay but about data quality.