Zum Hauptinhalt springen

myAir Smart-Home-Integration, kostenlos und Open Source

myAir-Integration für Gladys Assistant

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

Info

Die Dokumentation dieser Integration wird von ihrem Autor geschrieben und ist bisher nur auf Englisch verfügbar.

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.

Konfigurationseinstellungen​

Diese Einstellungen fragt myAir in seinem Konfigurationsbildschirm in Gladys ab.

EinstellungTypPflichtfeldBeschreibung
Connect your ResMed myAir accountsectionNeinThis 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 regionselectJa
myAir emailstringJa
PasswordsecretJa
Verification code (sent by email)sectionNeinAfter 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 maintenancesectionNeinTrack 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)numberNein
Mask filter interval (days, 0 = off)numberNein

So installierst du myAir in Gladys​

  1. Öffne in Gladys Integrationen: myAir erscheint im Katalog neben den nativen Integrationen, mit einem Community-Badge.
  2. Klicke auf Installieren. Gladys lädt das Docker-Image (ghcr.io/vincentbesseau/gladys-resmed-myair:1.0.0) herunter, startet es in einer vom Kern isolierten Sandbox und erzeugt die Oberfläche der Integration (Geräte, Erkennung und Konfiguration).
  3. Öffne den Bildschirm Konfiguration der Integration, fülle die Einstellungen aus und speichere.
  4. Du kannst sie auch direkt über die URL ihres Repositorys installieren: https://github.com/vincentBesseau/gladys-resmed-myair.

myAir benötigt Gladys >=5.2.0. Der Katalog in Gladys wird stündlich aktualisiert, eine neue Version ist also spätestens eine Stunde nach ihrer Veröffentlichung verfügbar.

Du nutzt Gladys noch nicht? Es ist kostenlos und Open Source: folge der Installationsanleitung, um loszulegen.

Über externe Integrationen​

myAir ist eine externe Integration: eine Community-Integration, die als Docker-Container verpackt und auf GitHub veröffentlicht wird. Gladys installiert sie mit einem Klick und führt sie in einer vom Kern isolierten Sandbox aus. Sie wird von vincentBesseau veröffentlicht und gepflegt, nicht vom Gladys-Kernteam.

Abonniere den Newsletter von Gladys Assistant

Ein paar E-Mails im Monat zu neuen Releases und Neuigkeiten aus dem Projekt. Verschickt von Pierre-Gilles Leymarie, dem Gründer des Projekts. Jederzeit abbestellbar 🙂