We're not gonna focus on online tracking today but the physical aspect; home precence detection though device tracking. I will mostly focus at home automation and logging, not the creepy stuff.
Why would you do this?!
- You got smart devices and want to control functions at home depending on if you're home or if someone else at your house. Such as climate control, turning off unecessary devices and making sure nobody is kidnapping any devices without you knowing.
- You got a friend you really dislike, so you want to turn down the temperature, play scary sounds, flash red lights, turn on your scented oil diffuser to trigger their allergies. The possibilites are endless!
- It's a simple step to improving your OPSEC if you're working from home.
- It makes you more conscious about how you may be tracked by other entities.
Sounds complicated! Who is this for?
- Everyone who's a bit tech savvy.
- Really it's not that hard to do.
Home automation (Home Assistant)
So everyone who's ever been a bit interested in DIY home automation has heard about Home Assistant. Home Assistant is a smart home software solution which intergrates against literally thousands of services, sensors and devices. You can install it on several platforms, but the most used is a Raspberry Pi which is a single board computer which costs below 50 USD / 50 Euro / 350 NOK.
I won't cover how to set up Home Assistant/Hassio (or HA for short) in this tutorial as it's so well covered online but let's assume you've set it up. So from this point on forward, I will assume you've got a Hassio installed.
Type of trackers
As an example for some type of trackers that exists
Stationary trackers
This is devices which has a fixed location, examples of such trackers are:
- Radio trackers: Such a BLE/Bluetooth and Wifi (such as your router). It's possible to set up other forms of radio trackers to track any signal that is broadcasting but that's outside of the scope for this tutorial.
- Sensors: Such as magnetic sensors (often installed on doors), motion sensors, cameras,
Service trackers
Service trackers are trackers that go through a service to get information. A few examples are:
- iCloud: If you got an iPhone and got "Find my iPhone" turned on. Then Apple will do their best to track your iPhone. You can extract this information through the iCloud integration.
- Your car: Most modern cars got some type of tracking, of which it's possible to use access their service to gain location data.
- A security camera: There's a ton of both local and cloud based security cameras, everything from frontdoor cameras to standalone cameras that now has motion tracking or even face recognition. This information can often be integrated into HA.
A few examples and tricks on how to do tracking
WIFI/Router - You got admin access
If you got admin access, it's possible to check if a new device is connecting to your router. This is pretty easy to do and there's often a router integration accessible in HA to do exactly this.
WIFI/Router - You don't have admin access
Through network scanning you can scan all the connected devices on the local network (using a tool for example Nmap, which is available in HA). Those devices will in most cases (unless they've disabled ICMP) report back their MAC address, an idenifier for that device. This address can be faked but it's fair to assume that most of them don't when they're connected to the Wifi local network. If someone is to steal a connected device, you would see this if you keep tabs on if a device responds.
Hotspots and other networks
You can check other networks which are broadcasting in the vicinity. For example if you often turn on your hotspot on your phone. This could be detected and the signal information together with location can registered for later recognition. In fact this is something Google cars are doing when they're taking images for Google maps. iPhones are also actively doing this and reporting it back to Apple, this is the basis on how their AirTags work without mobile service. It's also something almost all phones to do to get better GPS accuracy.
Gas sensors
You can probably figure out how to do this with a few different gas sensors but the one I will take as an example is a CO2 sensor. If you got a sensor indoors the gas density will often remain stable. Even if you got ventilation it's pretty easy to detect an increase in CO2 density if someone (human or animal) is in a room for a few minutes. An example of this can be using an Airthings sensor (which also measures has a sensor for a lot of other things) which has a pretty accurate CO2 sensor of which HA can pull BLE/Bluetooth data from every 5 minutes to check the density.
Light sensors/switches
Someone flipped a light switch? Yeah someone is at home. If you use switches connected to the lights you could track whenever a switch is flipped. You could also use a light sensor to read the ambient light in places which has a bit more "stable" light settings. An automation could then be trigged i.e if someone is using flashlights in your house when the lights are off and it's doesn't correlate with other external sources like sun from windows.
GPS app trackers
This will be a small mention since I already described with using iCloud to track your iPhone. But it can also be noted that a lot of third party applications also do this.
Capacity field sensors
Those are DIY since barely any of them exist as a complete commercial package. But there exists "motion" sensors that can detect presence even though walls or in . Those sensors continually check the ambient capactive field in the air and if someone enters within the range it's "disturbed" and will be triggered.
Radiant temperature sensors
One more DIY solution as these sensors are pretty interesting. Radiant temperature sensors are not the "typical" motion sensors that you often think about. The "normal" type sends out infrared beams to see if something "break" the beam based upon an average (which is why it won't trigger if you move really slowly as the "average"). The radiant temperature sensors instead measure recieved infrared radiation, by doing this in combination with a normal ambient temperature sensor you could fairly accurately measure if a person has entered a room and when they left - even if a person has stayed in that room for a prolonged duration.
Bluetooth/BLE trackers
Everything seems to have bluetooth/BLE nowadays, despite how insecure it is. Bluetooth actively broadcasts it's signal when turned on. This way you can figure out if your earpods, wireless speaker, phone, tracking tags, car or whatever else is in the vicitnity of a stationary bluetooth/BLE reciever (which the Raspberry Pi 4 has). Or you could track all devices that are within range, that way you could assign known devices and get a notification of when a device which is not known enters the range. BLE also supports range detection.
Got any more ideas?
Please leave those in the comments!
Thanks for reading!