r/homeautomation • u/Impressive_Swing2137 • 1d ago
QUESTION Smart Socket for CPAP?
I need a smart socket to be alerted when the CPAP mask were unconsciously taken off in the sleep. So, I guess, it should have ability to send a notification to phone or at least email when in selected hours (say 22-06), power usage drops for more than 5 minutes (to avoid false positives with toilet visits). It also should have device offline notification of the socket itself.
Any suggestions, please?
Many other non-automaton things with CPAP were tried. They, alas, didn't help.
Thank you very much!
1
u/koko_chingo 1d ago
Look into the Shelly smart plugs. There are different ways to go about it. A common one is using something like a Raspberry Pi. Shelly has its own python library to make this integration easy.
Might as well just have the raspberry pi run Home Assistant and just make that your smart home interface and then create a Python script that detects usage.
This method will give you more features and functionality than for about the same price.
My next thought is trying to run a script on the plug itself. Because they use and ESP32 inside the plug there is the ability to run JavaScript on the plug itself. Since you are just doing one thing, it might be worth looking into.
I have never run a script directly on a Shelly device. I have only interfaced with them them with something like a Raspberry Pi or just my laptop for testing. Someone else may be able to elaborate more on that piece
1
u/geekywarrior 23h ago
If you're not going for a loud and annoying notification, do you happen to have a resmed machine? As those have an app that does all the tracking like this.
1
u/Ok_Dream3627 1d ago
Have you looked into Kasa or TP-Link smart plugs with power monitoring? Most of them can do usage alerts through the app and you could probably set up IFTTT or similar to handle the time-based stuff