Skip to main content

๐Ÿ  You (might) NEED Home Assistant

ยท 9 min read
Michael Osborne
Software Engineer

You probably just don't know it yet.

What I use Home Assistant for. Hint: you can use it for way more than just home automation. By the end of this article you will hopefully be convinced to give it a try.

WHYโ€‹

In case you don't know, Home Assistant is software that allows you to automate and track things in you life far easier, free-er, and simpler (low/no code) than other methods. If you're like me, I had mutliple apps on my phone, some paid, to automate or track different things like how much water I drink, control the TV, and multiple "Smart Home" device apps like Philips Hue.

Home Assistants primary purpose is for home automation. Stuff like turn on lights after 6pm, turn on the heater when it gets cold, etc. But, the generic tools they created for if-this-then-that home automating and the amount of integrations supported officially and unofficially (through Home Assistant Community Store or HACS) create a wide range possibilities.

I originally got into Home Assistant just to see if I could turn on and off smart lights, now I use it to help track and visualize personal and health goals and to reduce the amount of things I need to keep track of or think about every day.

There is a catch

You need a way to host it at home. Home Assistant sells boxes (i.e. Home Assistant Green) but they're a little pricey, I would recommend just going with a raspberry pi 5 (then you can host multiple things) or repurposing an old computer/laptop into a server computer running something like Unraid

I am running Home Assistant on my Unraid server computer.

WHATโ€‹

In no particular order, this is a list of what I have used Home Assistant for, some of these warrant (and may get) full write-ups of their own

Home Presence Trackingโ€‹

home presence tracking dashboard
Home presence tracking dashboard

Turning off our phones MAC address randomization on the home wifi network allows me to track when a phone is or isn't connected to the network

This data can be used for all kinds of things:

  • If I'm out, knowing my girlfriend got home safely
  • Make actionable goals to leave the apartment more
  • Provide a reference point if there are any events we're trying to figure out the time of, this has helped so many times in random situations like knowing how long somethings been in the oven we forgot to put the timer on because we know roughly when someone got home etc.

TV Controlโ€‹

tv control dashboard
TV Control Widget

My dog ate my TV remote, Home Assistant automatically picks up smart TVs on the network and provides enough controls to get by.

Dog Potty Training and Feeding Trackingโ€‹

dog dashboard
Dog Dashboard
doorway dog tracker device
Doorway dog tracker device
my desk dog tracker device
My desk
girlfriends desk dog tracker device
Girlfriend's desk

We got a ~1 year old dog that wasn't potty trained and we needed to make sure we took her out every 2-3 hours. Managing this on home assistant was way easier than building a custom app, especially with the Home Assistant mobile app which makes it easy to click the buttons.

I have this set up to play a sound on all google home devices 2 hours after we took her out to remind us to take her out again. I also have the doorway device set up to easily press buttons and reset the timers when you get in from taking her out.

All the devices are SSD1306 displays hooked up to a Raspberry Pi Pico W running micropython.

This will definitely get a full write-up because it has been the most useful.

Energy Drink Trackingโ€‹

energy drink dashboard
Energy drink dashboard

I used Home Assistant to get myself to stop drinking energy drinks and to switch over to caffeine pills, I found forcing myself to simply press this button every time I had an energy drink had a big effect on making me change my behaviour and stop having them as much.

Exercise Trackingโ€‹

exercise dashboard
Exercise dashboard

Similar to energy drink tracking, I found entering in the number of these I do and knowing its getting recorded historically to have a positive effect. I also can easily see if I've been slacking.

Room Temp, CO2 level, and Humidityโ€‹

room temp dashboard
Room temp/CO2/humidity dashboard
room temp dashboard
Room temp/CO2/humidity device

I use a SCD41 hooked up to a Raspberry Pi Pico W to measure CO2 levels in my poorly ventilated office, and it also reads temperature and humidity and uses Home Assistants API to send the sensor readings. I read an article during COVID that said when working from home CO2 levels can get very high and can lead to feeling sluggish or tired so I try to keep it low with fans or by moving around the apartment when its high.

Historical Weather Trackingโ€‹

historical weather tracking
Historical weather dashboard

I use the OpenWeatherMap integration to record historical weather. I find this useful to see how much rainfall there was, what the wind speed is like, and what the temperature is (and if its trending up or down) to prepare before going out to run or bike.

Health Trackingโ€‹

garmin connect dashboard
Garmin connect dashboard
grafana health dashboard
Grafana health dashboard

Using the Garmin connect integration (from HACS) and the Fitbit integration for my Aria smart scale, all my activity is automatically recorded. I have Home Assistant hooked up to Influx DB and then run Grafana to make powerful dashboards from the data, like the above health dashboard to see how my weight, calorie burn, and minutes active is trending.

3D Printer trackingโ€‹

3d printer dashboard
3D printer dashboard

I was previously using a different app to remotely view and control my 2 MK3S+ 3D printers, but with Home Assistant I can do all of that and more with the OctoPrint integration.

HOWโ€‹

There a plenty of good guides online to set up these types of automations and tracking, so for how I did this I'm going to focus on the higher level concepts to point you in the right direction to find guides.

Some notes on the main things I use to drive everything and the lessons learned:

Helpers and Automationsโ€‹

helpers view
My helpers

The 2 mains things I use are helpers under Settings -> Devices & services -> Helpers Automations under Settings -> Automations & scenes. The helpers Counter and Input button are the 2 main ones, and then you can set up an Automation to increase a Counter when an Input button is pressed, or increase a counter when something else happens.

You can also, through the Home Assistant API, change and get the value of Helpers, which allows you to use Home Assistant like an application backend that already has robust visualization support built in.

HACSโ€‹

Home Assistant has a ton of official integrations, but to shove even more data in and track it I highly recommend installing Home Assistant Community Store or HACS which enables browsing and installing user-made integrations.

InfluxDB and Grafanaโ€‹

Home Assistant, by default, only stores 10 days of historical data for performance reasons. For this reason, I think InfluxDB (and the Home Assistant InfluxDB add-on to easily ship data to it) is a must. Once you have data flowing into InfluxDB, you can use something like Grafana to build longer term visualizations. Thats why I built my health dashboard in Grafana, because I want a longer term view of my health journey. Both InfluxDB and Grafana are available as convenient docker containers to easily set up.

Conclusionโ€‹

If I convinced you and you try Home Assistant, or I inspired you to do something cool, let me know!