ResMed CPAP Sensor integration in HACS

Do you mind sharing what types of automations you had? I have a couple based on a power sensor its plugged into to kick things off when I go to bed/wake up but could use some fresh ideas.

I don’t mind sharing but I’m not sure how much use you would get out of a lot of it.

Most of it was used when I first started using it and was trying to get used to wearing it at night.

The requirement for the insurance to pay for it was that it had to be used for > 4 hours a day for so many days a month in 3 months. and all of that was a rolling time frame.

so in order to ensure I met the requirements I tried to make sure I used it for at least 4 hours and 15 minutes every night.

There was no way that I was going to get up and check my watch in the middle of the night to see how long I had it running so I came up with the idea to turn on a dim LED light ( I used the LED indicator on a spare zigbee outlet that I hadn’t purposed for anything else yet) that I could see at night that turned on when I turned on a “master control” switch signaling I started running it and then it would turn off 4 hours and 15 minutes later. That way if the light was off I new I had met the minimum requirements and I could take it off it was bothering my sleep too much.

Then I had a system that I could use to increase the timer for the LED indicator by a set amount every few nights so I could force myself to keep it on longer so I would start getting better benefits by wearing it longer.

eventually I got to the point I didn’t need the crutch and could wear it most of the night.

Then the other twist in the system is that I work a rotating shift so I initially needed a way to have the indicator work both during the day when I was sleeping from night shift and at night sleeping for day shift. I needed a light to be bright enough to see during the day but dim enough to use at night

So I had a dimmable lamp for the day time and the indicator system would transition between the dimmable light and the LED depending on the sun postition.

But again eventually I got away from using that system once I got more used to wearing the mask for longer periods.

The most useful automation I had was a sleep movement counter to tell me how much I was tossing & turnng at night so I could compare the nights I used the mask to the nights I didn’t to try to get some indication if I was actually resting better using the mask.

That automation is the only one I still actually use.

I had such a minor apnea it ended up not really helping at all and after a year of use I stopped using it. But since I fully own the machine now (those things are expensive without the insurance covering a portion of it!) I still have it if I think I may actually need it in the future.

After all of that if you still think you might find anything useful here is the link to the github repo for the package:

1 Like

Good ideas to get through the hoops insurance gas for these. I struggled at first and this would have certainly helped know if I had hit the minimum use for the night. Thank you for sharing!

2 Likes

Can I suggest an improvement? You should register a service that allows the integration to be forced to refresh. I know if my CPAP machine is running or not based on its plug, so it would be nice to be able to force an immediate refresh when it turns off so that I can delay the stats on my dashboard. Others may want to compare the time to their compliance requirement if the CPAP turns off and do something if the time hasn’t been met.

1 Like

@prestomation

Just came across this. Tried to set it up, but my login keeps failing. I’m in Australia if that makes a difference. I log on at https://myair2.resmed.com/.

If you need help to setup something up, or diagnose, please let me know.

Hi cjsimmons, Sorry to hear you’re having troubles. Could you open an issue on github so we can track this?

Please include a HAR file from your browser from after you login and refresh the dashboard. This will help me figure out what’s going wrong

Instructions:
To address this I need a HAR file for the MyAccount Profile

  1. Login to myAir
  2. Open the developer console in your browser.
  3. Open the page that contain your scores
  4. Export a HAR file
  5. Send this HAR file to me or attach it on the github issue.
    For step 4, here are some instructions for Chrome: Capture web session traffic - Google Ad Manager Help

Be careful to NOT enter your password when you have the network tab open. This may end up including your myAir password in the har file which we want to avoid. Login first and then open the developer console, open the page, and capture the HAR file.

Also, when the login fails, you should see an error in your Home Assistant Logs(Configuration → Settings → Logs tab). You should see a red section with the words resmed_myair. Please copy the whole section and paste them in the issue as well.

Done. I’ve PM’d you the HAR file. Hope I’ve done it right.

1 Like

Thanks! I’ve pushed a fix that I hope will fix your issue.

The fix didn’t work. I’ve updated new error log on the Github issue.

Latest update is working now!!! Great stuff!!!

Now… to find a card for this…

What do you mean by a card? For dashboarding the data? I’m always interested to hear how users of this end up using the data in HA.

yeah, a card or something on the HA dashboard.

I have a custom card already for my dashboard so I just wrote a section in JavaScript that displays some of the data and colorizes it’s based on whether it’s over the compliance threshold, etc. I’m happy to send you the js for that part if you want to add a custom card to the repo.

1 Like

Cool! I think sharing it here could be a great start.

Hello there
i’m trying to use this integration but receive an unknow error while trying to add it
i’m using the EU region
i’ve made a github issue and i have a HAR file if it can help

same error message here - i think it has to do with the 2fa now with the code sent by email… i used to work over here but stopped working.

This looks great! Alternatively, have you heard of OSCAR? It’s an open source application that can pull sensor data from a ResMed CPAP. It can access data that isn’t visible from the MyAir app/site.

I don’t know the details about it as I just discovered it (and this post) when I was looking for ways to pull data from the CPAP and then integrate it into HA somehow. But I’ve never used Python extensively so it’s a major hurdle for me.

dont you need the SD card data for that - as in - the data ingestion is always manual ?

edit: we prolly need to hook something like USB Flexibele Verlengkabel Extender Adapter Converter Sd kaart Vrouwelijke SDHC Kaartlezer voor MP3 GPS Mobiele Telefoon 54/70 CM|Data Cables| - AliExpress to a nodemcu/esp32/rpi … to auto adjust/read data.

No idea. As I said, I just discovered it. But that would defintiely be a big hurdle. I just find that, while nice, the data MyAir shares isn’t very detailed.

Yes, you have to pull the SD card and put it into the machine you have Oscar installed on. Great package. I pull data every couple/few weeks unless there’s something odd that makes me want to look at the previous night.