Saltar al contenido principal

Integración domótica myAir, gratuita y de código abierto

Integración myAir para Gladys Assistant

Read your ResMed CPAP sleep data (usage, AHI, mask leak, score) from the myAir cloud.

info

La documentación de esta integración la escribe su autor y, por ahora, solo está disponible en inglés.

This integration reads the nightly therapy data of your ResMed CPAP machine (AirSense, AirCurve…) from the ResMed myAir cloud — the same account used by the myAir app and website.

It is read-only: it never changes any setting on your machine. It creates one "CPAP" device with, for the most recent night, the following sensors:

SensorDescriptionUnit
UsageHow long the machine was usedhours
AHIApnea-Hypopnea Indexevents/h
Mask leakLeak level (leakPercentile)L/min
myAir scoreOverall score for the night/100
Mask on/off countHow many times the mask was put on—

⚠️ Unofficial API. ResMed publishes no API. This integration reproduces how the myAir website works (Okta authentication + GraphQL API). ResMed can change it without notice; if it breaks, check the reference Home Assistant component.

Requirements​

  • An active myAir account linked to a ResMed machine that syncs its data.
  • Your account region:
    • Europe → myair.resmed.eu
    • North America → myair.resmed.com

Configuration​

  1. In Gladys, open the ResMed myAir integration.
  2. Pick your myAir region.
  3. Enter the email and password of your myAir account.
  4. Save.

Verification code (two-factor authentication)​

On the first connection, ResMed emails you a one-time verification code. The connection status asks for it:

  1. Check your inbox.
  2. Use the "Enter verification code" action and type the code you received.

The device is then remembered: you should not be asked for a code again. If the remembered device ever expires, the status will prompt you to use the "Reconnect" action to get a fresh code.

Available actions​

  • Enter verification code — finishes the connection after you receive the emailed code.
  • Reconnect (send a new code) — forces a fresh login; emails a code if needed.
  • Test connection — checks that account access works.
  • Refresh sleep data now — fetches the latest data immediately.
  • Disconnect — removes the stored tokens.

Filter maintenance (reminders)​

The integration can track filter wear and remind you when to replace them:

  1. In Configuration, set a replacement interval in days for the device filter and/or the mask filter (0 disables tracking). Default: 30 days.
  2. A "Filter life" sensor (%) is created for each enabled filter — it counts down from 100% to 0% over the interval.
  3. Create a scene triggered by that sensor (e.g. when "Device filter life" ≤ 10% → send me a notification). That is your reminder.
  4. Each time you change one, run the "Mark a filter as replaced" action (pick the filter): its life resets to 100%.

The countdown is in calendar days since the last replacement.

Dashboard widget​

The integration provides a "Last night" widget for your dashboards (editor → + → "Last night"). It shows the four latest-night metrics (usage, AHI, mask leak, score) as color-coded tiles (green / amber / red by threshold). With no recent data, it shows a clear empty state.

Update frequency​

ResMed machines only sync their data about once a day. The integration polls the cloud hourly to pick up the latest night as soon as it appears, so it is normal for the values to change only once a day.

Parámetros de configuración​

Estos son los parámetros que myAir te pide en su pantalla de configuración en Gladys.

ParámetroTipoObligatorioDescripción
Connect your ResMed myAir accountsectionNoThis integration reads the nightly therapy data your ResMed CPAP machine (AirSense, AirCurve...) reports to the myAir cloud - the same account used by the myAir app and website. It is READ-ONLY (it never changes any setting on your machine) and everything goes through ResMed's cloud: no local network access. This is an UNOFFICIAL, reverse-engineered API: ResMed can change it without notice. The data is updated once a day, when your machine syncs.
myAir regionselectSí
myAir emailstringSí
PasswordsecretSí
Verification code (sent by email)sectionNoAfter saving, ResMed emails you a one-time verification code. The connection status below will ask for it: use the "Enter verification code" action to finish connecting. This device is then remembered, so you should not be asked again unless the remembered device expires - in which case use the "Reconnect" action to receive a fresh code.
Filter maintenancesectionNoTrack when to replace your filters. Set a replacement interval in days (0 disables tracking). A "Filter life" sensor (%) is created for each enabled filter: trigger a scene on it (e.g. life below 10%) to be reminded. Use the "Mark a filter as replaced" action each time you change one.
Device filter interval (days, 0 = off)numberNo
Mask filter interval (days, 0 = off)numberNo

Cómo instalar myAir en Gladys​

  1. En Gladys, abre Integraciones: myAir aparece en el catálogo junto a las integraciones nativas, con una insignia de comunidad.
  2. Haz clic en Instalar. Gladys descarga la imagen Docker (ghcr.io/vincentbesseau/gladys-resmed-myair:1.0.0), la ejecuta en un entorno aislado del núcleo y genera la interfaz de la integración (dispositivos, descubrimiento y configuración).
  3. Abre la pantalla de Configuración de la integración, rellena los parámetros y guarda.
  4. También puedes instalarla directamente desde la URL de su repositorio: https://github.com/vincentBesseau/gladys-resmed-myair.

myAir requiere Gladys >=5.2.0. El catálogo de Gladys se actualiza cada hora, así que una nueva versión está disponible como máximo una hora después de publicarse.

¿Todavía no usas Gladys? Es gratuito y de código abierto: sigue la guía de instalación para empezar.

Sobre las integraciones externas​

myAir es una integración externa: una integración comunitaria empaquetada como contenedor Docker y publicada en GitHub. Gladys la instala con un clic y la ejecuta en un entorno aislado del núcleo. La publica y mantiene vincentBesseau, no el equipo principal de Gladys.

Suscríbete a la newsletter de Gladys Assistant

Unos pocos correos al mes sobre nuevas versiones y novedades del proyecto. Enviados por Pierre-Gilles Leymarie, fundador del proyecto. Puedes darte de baja cuando quieras 🙂