Actually the [UPDATED] HTTP Presence Sensor driver does work for my particular case, since my printer has an HTTP server and responds with an HTTP 200. Fortunately it also has a setting to restore its prior on/off state after a power outage.
A ping test would be good for devices that respond to pings. I think you'd have to use sendHubCommand() with an appropriately configured HubAction object. Getting too tired or else I'd take a stab at it.
Thanks for posting your solution, it's working great for me.
Nice, I didn't realise this device was available - it doesn't work for any of my IP devices (no idea why) but I'll add it as an option to the instructions.
Did you specify a valid URL? The iPhone driver wanted an IP address; this driver wants a complete url, e.g. http://10.0.0.5 (or https if appropriate).
If that's not the case, then in the settings for the virtual device you set up as the presence sensor, turn on Enable Debug Debug Logging. Then go to the Log page and see what shows up. You should get a log entry every minute. If your device doesn't return an HTTP 200, it will register as non-present.
Ok I tested it against one of my wired mesh Routers and the HTTP Presence detector works great - much better than the iPhone detector for this purpose (it got auto-blocked after a couple of pings to a router).
I've updated the Instructions to use the HTTP Presence Sensor only - it's definitely better than the iPhone Presence sensor for this purpose as it works with more device types.
Just as an aside; I've plugged my C7 and battery backup into my Power meter and boy is this thing efficient!!! It positively sips power - on average it's drawing 1.6 watts with the occasional spikes up to 3.8 watts when the battery has been drained a bit and is being charged.
At 1.6 watts (0.01A), that's only 0.0096 kWh's of energy used in 6 hours! Even at the worst case of 3.8 watts power draw (0.022 A), that is only using 0.0228 kWh's of energy in the same time frame!
No wonder a 3,500 mAh battery can run for 6+ hours without issue!
Just wanted to note that I haven't seen reference to the Noisy Power Filtering & Surge Suppression that you get from larger UPS boxes. Is that actually inherent in these little packs?
This question likely belongs over in the primary thread talking about these.
Out of curiosity, let's say that the 6 hour delay is met and you hub shuts itself down. Then 15 minutes later the power is restored, but your UPS never ran out of battery power. What restarts your hub?
also i tested a lot of wifi switches and many do not turn back on after power outage..
i recommand kasa or tplink that do.. and above that can set a schedule to turn on every few hours even if that fails.. i have a house always empty 1300 miles away so am very carefull to try and not have to take emergency trips to reboot crap.
This maybe far fetched and not even work. So in the other thread about this mini-ups, someone discovered a 2 cell version, which did not work because there was a blip on switching from wall to battery power, just over 1 second and long enough to crash the hub.
So because I'm cheap, and like to make use of stuff I already have, I came up with this. Hope it works
Yureeka, It works. Going on 20 hours with my Hub on dual battery backup.
With the variable quality of chinese battery packs, maybe this is a bad idea...."My Hubitat ran for 24 on battery before being consumed in the resultant fire, which killed all my automations" I'm joking, but you can never be too careful with lithium cells.
I compared my working board to the link above, the Aliex photos match 100% with my working unit...but you know about aliex and descriptions, although they are good about disputes