[UPDATED] HTTP Presence Sensor

IMPORTANT UPDATE: HTTP Presence Sensor can now be installed from Hubitat Package Manager. This is the best way to make sure you keep up-to-date with bug fixes and new features.


In your code on line 63, your showing that wifi is checked every minute.
runIn(2, refresh)

I'm not a programmer, but I'd like it to run every 5 minutes. Can I just change it to
runEvery5Minute(refresh) and do I have to change
runIn(2, refresh)

Also, in the logs, is it showing when the Wi-Fi was pinged and if there wasn't a change you won't see (on) ?

Yes there is a command for running every 5 minutes. Note there is an ‘s’ in minutes.


1 Like

For anyone using this HTTP Presence Sensor with my app Combined Presence, I have just release V2.0 of Combined Presence. The best way to get the update is to install via Hubitat Package Manager, but you can also install directly from GitHub.

It should be fully backwards compatible and not break any existing combiner instances.

The most important update is the new "Standard Combiner". This instance has the optimal logic for detecting presence of a person using multiple geofencing and wifi-based presence sensors. You don't have to think about the boolean operations involved. It just does it the best way based on the performance characteristics of the different sensor types.


1 Like

Can i use this app in my android phone ? :wink:
if yes. How ?
thanks for help.

Try this driver instead:

Despite the name, it works for most android users as well.

The instructions for setup are in the first post (just like in this thread :wink:).


Is there an analogous driver for HTTPS?

Devices that present a 'legacy' authentication prompt are not being detected correctly:


Happy to share information from Firefox's Web Developer feature but not sure what's needed to fix this.

My initial thought is that any endpoint with an auth prompt is not a good candidate for using this driver. That said, maybe it should be a good candidate? But I don't have any extra devices suitable for testing this. If you modify the code and can make it work, please send me a pull request and I'll incorporate it.

This Driver works great, but not on all devices.
I have been working on presence sensors so I can detect when power is down. The problem I´m facing is that it detects some devices, but it´s not detecting two Raspberry Pi´s on my network.
If I ping both of them, they are detected, but the driver does not detect them.
Any ideas?

I am trying to use this for an avr I have that seems to drop offline. When it drops offline a power cycle fixes it. But the driver is reporting not present when it is online. The avr has a webpage at its IP i am pointing the driver to on port 80. Anything I could be doing wrong, or is this the wrong application for the driver?


Try web pinger. I think it might work for you, it's in HPM.

THANK YOU! That's exactly what I was looking for! Seems to be working as I was hoping

Just a note. I have an onkyo tx-nr575 and it doesn’t actually drop off line (in my case) but the telnet connection just gets screwed up for some reason.

I noticed it I hit “initialize” on the driver page it brings it back. I haven’t debugged further and frankly I don’t know if I am capable to do so. I tried automating the initialize to once a day and it wasn’t enough, so for now, every time my time of day mode changes, it hits the reinitiallize command. It’s kept it connected for the last 3 weeks or so.

This may sound really stupid, but how do I figure or what end point to use?

I just started using this tool and am getting this error in the log

> error org.codehaus.groovy.runtime.metaclass.MissingMethodExceptionNoStack: No signature of method: user_driver_joelwetzel_HTTP_Presence_Sensor_1664.logsOff() is applicable for argument types: () values: []
> Possible solutions: log(java.lang.Object), notify() (method logsOff)

Were you using another driver with this device before? Error should affect the driver but can be annoying.

Can you please update this driver to include HTTP 403 forbidden as a good response?

Unfortunately, my work responsibilities are not allowing me any time to work on my Hubitat code right now. If you want to update this on your own hub, it would be on line 93 of this file: Hubitat-HTTP-Presence-Sensor/httpPresenceSensor.groovy at master · joelwetzel/Hubitat-HTTP-Presence-Sensor · GitHub

if(response.getStatus() == 200 || response.getStatus() == 403) {

1 Like