Presence Detection in My House
One of the key features of my home automation server setup is multi-device presence detection. By enabling many devices to infer your presence or absence, a surprisingly accurate view is enabled. After all, you would not want your Security Alarm to go off when you are sleeping, simply because you failed to walk by your Nest Thermostat every hour...Implementation
So how is this strategy implemented? Well, I use an "enhanced" wasp-in-the-box algorithm, coupled with multiple sensors - mostly Bluetooth devices (like phones, Fitbit sensors, and key tags), as well as X10 window and door sensors.
But, the power of a server is that we are not limited to these devices - for example, if someone turns on a light through the web interface or by talking to the Google Home locally, you know that someone is home. By combining these capabilities, a very comprehensive view of presence is enabled.
Wasp-in-the-box
Wasp-in-the-box, simply stated is:1. If an outside door opens, assume everyone is away
2. If you detect someone in the house, set them to home
It is the "detect someone" that provides the power of this capability. All of the tiny single-board computers I use for my server have built-in Bluetooth; all of our personal devices have it also. I use l2ping on the server to periodically "ping" each of the Bluetooth devices in our house - our Android phones, a Tile Bluetooth key tag attached to the car keys, and a Fitbit, on someones wrist - as well as pinging when key events happen (like a door opening).
The key here is to only use Bluetooth to confirm that you are home - if a personal device is not on, it will not respond to a ping - but you could still be in the house. Whereas, if a door opens, you are pretty sure that someone has either entered or left - so it is a very good time to check.
The only downside of using Bluetooth as part of this capability is that it is slow (in computer terms) - I use a 2-second timeout before I give up looking, so there is a very small window where you don't know the status of a device.
Finally, if a door opens (and you were home before), and you cannot find any of your Fitbit, your key Tag, or your phone, and there is no motion detected in the house, then you can be pretty confident that the person is away - so it is time to run the Rules Checker (to turn on the House Alarm and turn down the thermostat, for example).
At the same time, there are many methods to determine if someone is home - the X10 motion sensor, the use of the web interface, an infrared remote being used to turn on the TV or stereo... in fact, if ANY device is used (manually), you know someone is home - this simple rule (in the Rules Checker) is used to update the presence status.
That is the power of multi-device detection - it all adds up. Over the past year since I've had this capability in place, it has been wrong very few times - and it is much more effective than yelling "Hey Honey, are you home?" when you walk in the door...