External integration - Withings

Hello everyone :waving_hand:

I’m introducing a new Withings external integration for Gladys. It retrieves data from your Withings scales, blood pressure monitors, watches, and Sleep Analyzers, making it usable in dashboards and scenes.

What it does

A « Withings health » device that groups your data:

  • weight and body composition (fat mass, muscles, bones, water, visceral fat);
  • blood pressure and pulse;
  • blood oxygen (SpO2), body temperature;
  • steps, distance, elevation, and calories for the day;
  • sleep from the last night (duration, deep/light/REM sleep, score, awakenings);
  • « in bed » status with a Sleep Analyzer.

The features adapt to what you actually measure: with just a blood pressure monitor, you won’t have twenty empty boxes for body composition.

Each measurement is recorded at its actual date: a weight synchronized an hour later is placed at the correct time in the history.

A device per Withings battery-powered device, with a « Low Battery » alert.

Scenes (Gladys 5.1+)

Triggers:

  • New Withings measurement (filterable: weight, blood pressure, temperature, oxygen
);
  • « In bed » / « Up » (Sleep Analyzer);
  • Night summary available;
  • Step goal reached (once a day, adjustable goal).

Actions:

  • Refresh Withings data;
  • Read the last Withings value (weight, blood pressure, sleep
), to use it in the rest of the scene.

Example: when a weight measurement arrives, send me « Weight: {{triggerEvent.data.weight}} kg ».

Dashboard widgets

  • Withings Health: live weight, steps, sleep, blood pressure, last measurement, battery status, and a « Refresh » button;
  • Weight Evolution: the curve over one week, one month, three months, or one year.

Real-time with Gladys Plus

  • Without Gladys Plus: Withings is read every 30 minutes (adjustable from 5 min to 24 h).
  • With Gladys Plus: Withings notifies Gladys as soon as data arrives, measurements are there in a few seconds. The « In bed » / « Up » events from the Sleep Analyzer only work with Gladys Plus.

What you need

  • Gladys 5.1 or newer;
  • a Withings account, with your devices synchronized in the Withings app;
  • a Withings developer application (free, takes 5 minutes to create on developer.withings.com). It provides the Client ID and Client secret to paste into Gladys.

Quick installation

  1. Create your application on developer.withings.com (type Public API integration).
  2. Paste the Client ID and Client secret into the integration configuration, then save.
  3. Click on Connect. The first time, Withings refuses the return address: this is normal. Click on Test the connection, copy the displayed URL, and add it to your Withings application.
  4. Click on Connect again. The devices appear in the Discovery tab.

The step-by-step documentation (FR, EN, DE, ES) is here: gladys-withings/docs/fr.md at main · prohand/gladys-withings · GitHub

Privacy

  • The data goes from the Withings cloud directly to your Gladys, via your developer application.
  • Gladys Plus only relays the « new data » notifications, without any measurements in them.
  • The Client secret and tokens are never displayed or written in the logs.

Links

This is a first version: your feedback is welcome, especially if you have devices I couldn’t test (Body Scan, ScanWatch, Thermo, BPM Core
). Don’t hesitate to share your scenes! :slightly_smiling_face: