I found a way to stop removing the mask through smarthome magic: flash my lights if I take off the mask.
Parts:
1. Smarthome coordinator - HomeAssistant/AppDaemon (runs on my desktop)
2. Prescense sensor - e.g. Aqara FP2
3. Smart light - e.g. Phillips Hue
4. Smart Plug/Power Meter - e.g. Kasa ESP25P4
5. Claude Code to write the logic
.....
The alarm goes off if all of the following are true:
1. it's in sleep period (11pm-6am)
2. i am in bed
3. i have been in the bed for at least 3 minutes
4. i have worn the cpap (wattage > 10w for 3 minutes during sleep period)
....
I can't get around this system at all without walking across the house to my desktop, at which point I'd be too awake to be stupid enough to remove the mask.
Bonus CPAP nerdery: Wireless data collection into homeassistant using a Toshiba W04 SD Card/Wifi Transmitter.
I think I, ironically, sleep to deeply fir that to work for me, but it's not a bad idea at all!
loading story #48245712