Skip to main content

myAir smart home integration, free and open source

myAir integration for Gladys Assistant

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

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.

Configuration settings​

These are the settings myAir asks for in its configuration screen in Gladys.

SettingTypeRequiredDescription
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 regionselectYes
myAir emailstringYes
PasswordsecretYes
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

How to install myAir in Gladys​

  1. In Gladys, open Integrations: myAir appears in the catalog, next to the native integrations, with a community badge.
  2. Click Install. Gladys pulls the Docker image (ghcr.io/vincentbesseau/gladys-resmed-myair:1.0.0), starts it in a sandbox isolated from the core, and generates the integration's interface (devices, discovery and configuration).
  3. Open the Configuration screen of the integration, fill in the settings, and save.
  4. You can also install it directly from its repository URL: https://github.com/vincentBesseau/gladys-resmed-myair.

myAir requires Gladys >=5.2.0. The catalog inside Gladys refreshes every hour, so a new version becomes available at most one hour after its release.

Not running Gladys yet? It is free and open source: follow the installation guide to get started.

About external integrations​

myAir is an external integration: a community integration packaged as a Docker container and published on GitHub, that Gladys installs in one click and runs in a sandbox isolated from its core. It is published and maintained by vincentBesseau, not by the Gladys core team.

Subscribe to the Gladys Assistant newsletter

A few emails per month about new releases and project news. Sent by Pierre-Gilles Leymarie, founder of the project. Unsubscribe anytime 🙂