This component will set up the following platforms.
Platform | Description |
---|---|
sensor |
Show info from the myAir API. |
Unless you have a good reason not to, you probably want to install this component via HACS(Home Assistant Community Store)
- Ensure that HACS is installed.
- Navigate to HACS -> Integrations
- Open the three-dot menu and select 'Custom Repositories'
- Put 'https://github.com/prestomation/resmed_myair_sensors/' into the 'Repository' textbox.
- Select 'Integration' as the category
- Press 'Add'.
- Find the ResMed integration in the HACS integration list and install it
- Restart Home Assistant.
- Add a configuration for the integration in the standard integration UI in Home Assistant.
You probably do not want to do this! Use the HACS method above unless you have a very good reason why you are installing manually
If you do need to install manually, you will know how this is done. You can install from source or use the latest release.
This integration creates sensors from your myAir CPAP date like AHI Events/hr, Usage Minutes, Mask On/Off count, Mask Leak%. There is also a 'Last Sleep Data Recorded' to tell you the last date that myAir has recorded. This can be used to, say, notify you of your scores when they are updated in myAir in the morning.
By the nature of CPAP date, sensors will only update once per day(assuming your CPAP is used every day). For this reason, the integration only polls every 30 minutes. A service exists for each config that will force update if you want to automate the sync after you wake up.
The following sensors are supported in all regions:
- CPAP AHI Events Per Hour
- CPAP Usage Minutes
- CPAP Mask On/Off Count
- CPAP Current Data Date
- This is the last date currently being displayed by the other sensors
- CPAP Mask Leak %
- CPAP Total myAir Score
- CPAP Sleep Data Last Collected
- This is the datetime the CPAP uploaded the most recent data. This is only supported in the Americas
- Most Recent Sleep Date
- This is the most recent date for which data is available. This will match Current Data Date if you use your CPAP every day. An automation that triggers when these two sensors are different will signal that you have missed a night
Each config entry for this integration will create a service called resmed_myair.force_poll_{username}
that will force an update from myAir.
This integration was reversed engineered from the myAir website. There are no guarentees that this will continue to work, as this is up to the whims of ResMed. Please DO NOT rely on this for any health-related matters.
This integration currently only connects to the Americas and Europe. If you are in Asia, please open an issue and offer yourself as a test subject.
This integration does not work if you selected France as your country during myAir registration! In France, ResMed enforces two-factor email-based authentication which is not yet supported by the integration.
You may workaround this issue by:
- Unregistering your device from your French myAir account
- Register a new account in a European country that is not France
- Register your device with your new account
- Wait until your first night(and the myAir website shows your data) before creating a configuration for this integration
If you want to contribute to this please read the Contribution guidelines
If you want to support the development of this component, please don't donate to me but instead donate to the Home Assistant development team.