So with a list of everything I wanted to do with my new system I started with something at the core. I wanted the system to know when people were at home and when they were away. Fortunately in my house there is only my wife and myself so not too much to track. Looking at the options for presence detection in HomeAssistant gave me many options.....

 

ha presence

.....given my desire to be low cost, one stands out as my ideal. Since my WiFi system at home is based on DD-WRT and HomeAssistant contains an interface it gives a nice possibility. Both my wife and I carry mobile phones attached to the home WiFi also my car attaches to the Wfi when in range. The HomeAssistant DD-WRT component allows you to track the presence of devices on your WiFi network.

Installing the component

Like everything in HomeAssistant this is simply a case of adding the right information to the config file and restarting HomeAssistant. Step by step for adding this to HASSbian (see installation article for what this is) is below.....

Step 1

Open the config file @ /home/homeassistant/.homeassistant/configuration.yaml and add example to the end of the file

dd wrt presence

Step 2

Add the router IP, Username & Password

Step 3

Restart HomeAssistant by selecting 'services'....

restart 1

....homeassistant, restart. Then click 'Call service'

restart 2

Step 4

The previous steps will enable the service and start detecting your WiFi connected devices. However this is not not ideal since it will show EVERY device connected to your WiFi and we only want the two phones and the car to be shown.

What is tracked is held in a file @ /home/homeassistant/.homeassistant/known_devices.yaml

Open this file and change the 'track: true' to 'track: no' for each device you want to hide.

NOTE: It is possible to rename devices and how a specific picture. These options are part of the known_devices.yaml file and you can read more HERE

Finally

When you have the setup completed the presence of a device (and therefore the person/car) can be seen on the HomeAssistant UI

pioneerx presence

This presence information can be used in automation and scripts. For example my system has a script that turns lights on at 45mins BEFORE sunset but ONLY if someone is at home.