There's a huge update on Github that I wanted to document for everyone. Here are the major updates:
Notifications
- There are two types of notifications you can turn on:
- Send notification when the output sensor changes state.
- Send notification if the inputs are inconsistent for a long period. (Useful for debugging or knowing if a presence sensor has gotten "stuck".)
- Notifications can be sent out two ways:
- To a notification device (such as the new Hubitat app w/ push notifications)
- To a phone number via SMS
Advanced Bindings
Since the beginning, Combined Presence has used a simple Boolean-OR to combine the inputs into an output. If ANY of the inputs were present, the output would be present. If ALL of the inputs were not present, then the output would be not present.
However, depending on the reliability and false-positives/false-negatives of your input sensors, there were situations where the Boolean-OR did not produce great results.
Here's the example of my house. I use 3 sensors:
- A virtual presence sensor driven by HomeKit geofencing
- A virtual presence sensor driven by Alexa geofencing, for detecting me a few hundred feet from the house
- A wifi-based presence sensor, to ensure that I am detected at close range
The boolean-OR would be great if these input sensors were all perfect. But they're not.
The wifi sensor sometimes gives false negatives, due to the phone going to sleep. That's actually not a problem for a boolean-OR, as long as the geofencing sensors are accurate.
But I discovered that occasionally either the Alexa sensor or the HomeKit sensor would get "stuck". They wouldn't detect changes for a day or two. I assume it has something to do with my phone preserving battery, but I don't really know. What I do know is that if one geofencing sensor is stuck and the other isn't, there should be a way to deal with that.
That's why I created new Advanced Bindings for Combined Presence. It's a new, more powerful combiner.
Fair warning: You don't need to be able to "write" boolean logic to use the Advanced Binding, but it will help if you can "read" boolean ideas and understand their implications.
Here's a screenshot of my combiner, configured to work with the behavior of my 3 sensors:
Basically, if it thinks I'm away, and then any of the 3 inputs arrive, it decides that I have arrived.
If it thinks I'm present, and then either of the geofencing sensors departs, it decides that I have departed. So it will be ok if one of the geofencing sensors gets "stuck". It also won't falsely depart just because the wifi went to sleep. And it won't get stuck on "present" if the wifi sensor takes a while to detect that I've left.
This is just one possible configuration. If your sensors have a different combination of behaviors, you may want to configure it differently. (You can even configure it to behave exactly like the simple binding, though I don't know why you would. But the simple binding is basically a subset of the advanced binding.)
Last, I'd like to show a dashboard I created to help understand how my sensors and combiners are behaving:
You can see that me and my wife each have 3 sensors. Those are combined by Advanced Combined Presence to get an overall presence value for me, and an overall presence value for her. Then, it uses a simple boolean-OR on those to decide if anyone is home at all. The dashboard shows the cascading behavior of the combiners.
I hope you find this valuable as I have.