You can do this with presence detection in your smart home

Smart equipment can add a lot of convenience to your life. You come home to a warm house and never step into a dark hall again. For this you need to know whether you are at home, because you do not want the lights to go out when you are at home. By means of presence detection, your smart home knows that you are at home.

The convenience of a smart home is twofold, on the one hand you can remotely view the status of your smart devices and control them via your smartphone. On the other hand, you can automate everything so that you have to operate equipment as little as possible yourself. Automation is useful, but for this your smart devices or your home automation system must know whether you are at home. It is not so handy if the light goes out while you are at home. But perhaps even more annoying: that all the lights come on for nothing and the heating is at 21 degrees when you are not at home. A smart home only really becomes smart when it is detected whether someone is home. This presence detection can take place in various ways. In this article we list the possibilities.

01 Geofence

Nowadays you always have a device with you that keeps track of your location: your smartphone. If you have an Android smartphone, go to the Timeline with your logged in Google account. An iPhone also keeps track of where you've been. You can disable this tracking from Google or Apple by the way, but the location history illustrates our point: your smartphone knows exactly where you are. Smartphones use various data to keep track of your location, the most important of which is the GPS receiver. But data about cell towers and wireless networks can also be used. Your location can be used to determine where you are and thus whether you are at home or not. Using GPS coordinates to determine if you are somewhere is called geofencing. This means virtually delineating a geographical location. Many smart products are equipped with geofencing. For example, Philips Hue supports geofencing and many smart thermostats are equipped with this option.

Perhaps unnecessarily, but to actually use geofencing, your smartphone obviously needs an active data connection. After all, your smartphone must be able to communicate your location.

02 Set up geofencing

Setting it up is usually very simple by indicating on a map where your house is and then drawing a circle around it. If you are within this circle, the system assumes that you are at home. That circle is usually a lot bigger than you might think, GPS is certainly not always accurate to the meter indoors. The disadvantage of a (too) large circle is that your system may mistakenly think that you are at home, for example if you are visiting someone who lives nearby, such as your neighbours. But a circle that is too small can cause you to be incorrectly detected as not at home. So it is a bit of trial and error to see which limit works best.

With geofencing it is preferable that everyone in the house installs the used geofencing application on the smartphone. Because when there are people in the house who are not followed, it can happen that equipment is switched off while there are indeed people at home. Another point to consider is privacy. You no longer have the option to disable the GPS receiver on your smartphone when using geofencing.

03 Geofencing in your own home automation system

Smart products such as a thermostat or lighting are often equipped with a presence detection that is based on geofencing. That works fine if you use those products separately, the own app is used to determine the location. But what if you link a product with your own home automation system? Sometimes it is possible to use the presence detection of a ready-made product such as a smart thermostat for your complete system after linking it with your own home automation system. You can then read out the absence status separately and use it as a basis for the presence status for your entire home automation system. If you don't have a smart product that you can use for geofencing, there are separate apps that you can use for geofencing, such as OwnTracks and Pilot. Some home automation systems also have their own app for this. The simple automation service IFTTT also supports geofencing. This way you can add location-based control directly to smart products with IFTTT support and your own home automation system. However, you can also link IFTTT to your own home automation system based on, for example, Home Assistant or Domoticz. To use IFTTT's location capabilities, you need the IFTTT app on your smartphone. After all, IFTTT needs to know where you are to enable geofencing. Some smart products or home automation systems have direct support for IFTTT. Do you have a homemade system based on Domoticz, for example? Then you can look at IFTTT Webhooks.

04 Motion sensors

Motion sensors are usually so-called PIR sensors that work on the basis of passive infrared detection. A Fresnel lens - recognizable as a sphere in the cheaper models - ensures that the detection angle of the sensor is increased. All kinds of smart products and home automation systems work with or can be expanded with motion sensors. For example, the Nest thermostat includes a PIR sensor that is used to determine if someone is home. Philips also has a motion sensor for Hue with which lighting in, for example, the hall can be switched on automatically.

If you want to use a home automation system for security as well as for home automation, you need motion sensors anyway. After all, you need a method to detect the presence of people in the house that are not equipped with something like a linked smartphone or bluetooth beacon. A motion sensor is a useful tool, especially if people often come into the house who do not have such things.

05 Movement per room

Another big advantage of a motion sensor is that you can easily detect a presence per room in the house. Handy if you walk through your house at night in the dark. The sensors are available for various wireless protocols and run on batteries, so you can place them anywhere. A disadvantage of a motion sensor is that it is, of course, sensitive to movement. If you don't move enough in a room because you're sitting on the couch, for example, the sensor won't detect you even if it's pointed at you. In practice it can therefore be difficult to use a motion sensor to automatically switch off the lighting after a certain period of time. If you're not careful, the light will go out because you haven't moved for too long. You can try to work around this by keeping the switch-off time wide, for example twenty minutes. The longer you set the switch-off time, the greater the chance that movement will be detected in the meantime. Another disadvantage of motion sensors is that, of course, the sensors cannot detect who exactly is at home.

05 Network (Wi-Fi)

Almost everyone has a smartphone and a wireless network. You can easily combine these two things in your own home automation system for presence detection. As soon as you connect your smartphone to your wireless home network, it can be detected by other network devices. It is usually checked whether the MAC address of a device is active in the home network. A second option is scanning by IP address. Via your router you ensure that a device always has the same IP address. It is best to do this with a dhcp reservation so that you do not have to change any settings on your smartphone.

The big advantage of presence detection via WiFi is that it is relatively easy to implement in your own home automation system. The Home Assistant home automation system can even directly read and process the list of existing devices from many routers. Elsewhere in this issue, we'll show you how to set this up. Domoticz and OpenHAB also offer similar possibilities to use network devices for presence detection.

Smartphone falls asleep

Presence detection based on your home network sounds good, but unfortunately it does not always work flawlessly in practice. Many smartphones go into sleep mode if you don't use them for a while, where they are no longer detected in that state. No detection means for your home automation system that you are not at home. The home automation software such as Home Assistant or Domoticz already partly takes this into account, for example by considering a device as absent only after it has not been detected for three minutes. You can extend that time with some experimentation. The disadvantage of this is that the presence detection is of course less accurate. In any case, depending on the detection method, it can take a while before it is detected that your smartphone is no longer connected to the network.

06 Bluetooth

Bluetooth is also a wireless technology that you can use for presence detection. You provide your home automation system with a bluetooth receiver, after which you can pick up bluetooth signals from, for example, your smartphone. We will discuss presence detection using bluetooth further later in this issue. We show you step by step how you can set up and use this yourself in combination with the home automation platform Home Assistant. Unfortunately, in practice it appears that the bluetooth of a smartphone is not always reliably detected. Alternatively, you can also detect a bluetooth beacon or wearable, something we do in the aforementioned workshop.

Bluetooth has a shorter range than WiFi. A disadvantage can therefore be that your bluetooth device is not detected in a part of your house. You can also convert that disadvantage into an advantage by providing your home automation system with multiple Bluetooth receivers in order to find out where someone is in the house.

Bluetooth beacons

Instead of relying on the bluetooth capabilities of your smartphone, you can also work with bluetooth beacons, also known as bluetooth tags. The beacons are based on the energy-efficient Bluetooth LE and use relatively little energy. This makes it perfectly possible to run a beacon on a button cell battery. The size can also be modest, you can buy various bluetooth keychains with a battery that lasts a few months. The beacons continuously transmit a unique number that can be picked up by the bluetooth receiver of your home automation system. The big advantage of bluetooth beacons is that you don't have to make sure that the bluetooth on your phone is turned on, the beacons always transmit their signal.

08 Combine

Whichever form of presence detection you choose, it will often turn out that it does not always work flawlessly. Fortunately, each form of presence detection has its own advantages and disadvantages. If you make your own home automation system based on open source software or if you have an extensive controller, you can combine different forms of presence detection. If you use a ready-made product such as one smart thermostat, then that is unfortunately not possible.

By combining different methods, you can work around these drawbacks. For example, combine geofencing with a motion sensor for an extra check whether no one has really left. Start with one form of presence detection, see what goes right and wrong, and then try to solve that by linking another form of presence detection to it.


Although a Google Home or Alexa does not immediately notice that you are home, you can call out a command as soon as you open the door to do things. You could set something yourself with which your home automation system gets the status present after a command. Not all systems have direct support for Google Home or Alexa, but you can often use the detour IFTTT, for example via Webhooks.

Recent Posts

$config[zx-auto] not found$config[zx-overlay] not found