Switch Home Assistant to Use PostgreSQL Instead of SQLite

I wanted to switch my new Home Assistant (HA) installation to write data to PostgreSQL instead of SQLite for a variety of reasons. Here’s how I did it. Here’s why I decided to switch: Resilience. If you’re running Home Assistant on a Raspberry Pi’s SD card, the constant churn of history updates will eventually destroy the card. The more entities you have, the faster HA will grind your SD card to failure. Writing all that to another server that is writing to a real SSD or spinning disk eliminates that problem. Convenience. I can back up the postgres database without having to stop HA. I don’t even have to run the backup on the HA server. Speed. Using a real database will speed up history display, especially once you have a large number of entities. ...

November 5, 2022 · 5 min · 864 words · Me

Use Pagerduty With Home Assistant

I wanted my Home Assistant to be able to send me alerts when Bad Things are detected like water on my basement floor. I’m an SRE, and have been using PagerDuty for years, so I decided to set up a personal PagerDuty account and connect it to my Home Assistant. ...

September 17, 2022 · 5 min · 894 words · Me

Home Assistant Printer Power Management

I’ve got an old HP laser printer in my basement. We barely print 10 pages a month between the two of us, so we only turn it on when we’re going to print. That’s a hassle though, because inevitably we forget to shut it off sometimes and it stays on overnight or even for days, and while it has a powersave mode, the 4050N is so old that even that burns a good amount of power. Enter Home Assistant. ...

February 13, 2021 · 7 min · 1461 words · Me

Home Assistant Notifications via Twilio SMS

Sending notifications from Home Assistant via Twilio SMS I got a post published at work about How to Receive Alerts from Home Assistant with Twilio SMS, so I won’t replicate it here. TL;DR - It is super easy to send SMS messages via Twilio SMS with curl. Update: I wrote another article, Use PagerDuty with Home Assistant this time for using PagerDuty which allows automatically de-duping notifications. ...

January 17, 2021 · 1 min · 67 words · Me

Add Plex to Home Assistant

Adding the Plex integration to Home Assistant is pretty straightforward with the exception of finding your Plex token. Find Your Plex token: Sign into your Plex.tv account Browse to one of the media files (TV episode, movie) on your connected server. You’ll need a Plex pass for this. Select Get info Click View XML Ignore the XML. Look in the URL to the XML page - you’ll see Plex-Token\=XYZZY. That’s the token you’ll need. Set up the Plex Home Assistant Integration Once you have the token, ...

November 8, 2020 · 1 min · 114 words · Me