I have googled around looking for a trick to let openHAB know the difference between a dead phone and a disconnected one. There seem like countless ways to notify your phone if openHAB does something but so far I have found no mention of the reverse. One of the many reasons I’ve adopted openHAB was to centralize user detection and remove the need for the Tasker task I use to use for wifi detection. On occasion if I had too many apps open it could take up to 3 minutes for my phone to clue in that it had connected to my wifi before it turned the lights on.
The PC I’m running openHAB on is a media server and has tones of over head so it pinging my phone works like a dream for presence detection, with the added bonus that I can now add anyone as a guest with presence detection just by adding a line to my items file! Only hiccup is I kill my phone 50% of the time by about 8 or 9pm. Atm this hasn’t caused an issue as my partner is usually home but I do fore see a time I’m home alone and my phone dies which will result in the lights turning off on me after 5min. If I ran to a charger this may be enough time but because I run xposed and a few other root tweaks my phone actually takes almost 5min to boot and if I actually drained it to 0% she needs an extra 5min to get up to 10%-15% otherwise just the boot up will kill it again haha.
So I am looking for any method at all, I’m guessing using something like Tasker on android to have my phone send a text notification to openHAB any time it hits say 5% and is connected to my local wifi. That way I could make a rule that would leave that phones presence value set to ON if openHAB received 5% notification in the last hour before it disconnected. Any idea or method is appreciated my android is rooted so their should be options and I’m only worried about it for my own phone I don’t mind if its to complicated to setup for guests or requires root.
Fingers Crossed someone has an idea I’m a bit surprised this was never thought of to be honest! Thanks either way to any suggestions.