Here’s a few things that I learned recently. I thought I would just write them all up here instead of creating a separate post / blog post for each one.
Proximity integration
I just discovered the Proximity integration, which tells you how far away people are from home, and which direction they are traveling (towards home or away from home.) I think this should be a built-in feature as soon you set up zones, since it’s pretty useful. I’m going to use this turn off our heaters and heated floors when we’re really far away from home, but start to warm them up as we start to head back home.
You can send full English sentences to the media_player.play_media
service for Alexa Media Player
I was really struggling to get it to play a news podcast (Spotify didn’t work), until I finally figured out that I could just type what I say every morning: “Play the Global News Podcast”:
- service: media_player.play_media
data:
media_content_id: Play the Global News Podcast
media_content_type: custom
target:
entity_id: media_player.kitchen_echo
Use ESPresence to extend the range for your bluetooth temp/humidity sensors
I discovered this one by accident. I set up ESPresence on a bunch of ESP32s for presence detection, and it works really well! But then I realized that it also solved the bluetooth range problem I was having with some temp/humidity sensors. So now I don’t even need Home Assistant’s bluetooth integration, or the new bluetooth proxy feature. And I deleted the old passive BLE monitor integration I was using before. It’s all handled by ESPresence now.
It sends all the temp/humidity data from my ATC MiThermometers to MQTT, and now I have rock-solid coverage throughout my whole house. I just had to do a little bit of work to set them up for MQTT discovery, so I made a function in Node-RED that automatically fetches the data from the nearest room presence base station. You can read more about that here.
P.S. I spent a long time researching all the options for room presence detection, and ESPresense is by far the best option! Especially if you want to track any Apple products, such as iPhones and Apple Watches. I’m incredibly impressed with how well it works.
Use Watchman to get alerts for broken automations or scripts
I wish I had set up Watchman earlier, because it turns out that I had quite a few old automations and scripts that were no longer working. I also figured out how to convert my Node-RED flows from JSON to YAML, so now I have it checking all of my flows as well. It lets me know as soon as any of my entity IDs are missing or unavailable.
Use healthchecks.io to monitor Home Assistant and get alerts when it goes offline
The healthchecksio integration is great, and the service has a really generous free tier. I also set it up to monitor the Node-RED add-on, and to check that my backups are running regularly.
Use Home Assistant Google Drive Backup for off-site backups
You should definitely be taking regular backups and storing them in a cloud service. Home Assistant Google Drive Backup is a really great add-on.
Yesterday I upgraded the old 300GB hard-drive in my server to a new 1TB SSD. I didn’t even do any preparation beforehand or take any extra backups. I just turned off the server, swapped the hard-drive, installed Debian 11 from scratch, installed Home Assistant, and then restored the most recent backup from Google Drive. I was really impressed with how easy it was to get everything up and running again. I didn’t need to reauthenticate any apps, reconfigure any add-ons, change any DNS or SSL, or do anything else. It all just worked flawlessly and all my automations and Node-RED flows started running again without a hitch.
SSL for both remote and local access
I finally figured this out! The trick is to use the Adguard Home add-on to set up a DNS rewrite for your public domain name, so that it points to your local IP address.
(I found it way easier to do this in Adguard Home than in my Ubiquity UDM router.)
So then you can access your Home Assistant application remotely from a public IP (via DuckDNS, etc.), but you can also access it locally over SSL when you’re connected to your home WiFi.
I pay for the nabucasa remote service as well to support HA, but I still wanted local SSL so that it’s fast and secure. And also so that I can use the ESPHome USB serial flashing tool whenever I need it.
Here’s the add-ons I use for SSL / DNS:
- Duck DNS
- Let’s Encrypt (DNS integration with my Cloudflare account via an API key)
- NGINX Home Assistant SSL proxy
- Adguard Home (for DNS rewrites)
I also highly recommend the Tailscale add-on, which makes it super easy to set up a secure VPN with zero configuration. You can set up Tailscale on your phones as well, and then it really blurs the lines between local and remote.
I think that’s all from me. Let me know if you have any questions about any of the above.
Would love to hear if you’ve discovered any interesting add-ons or integrations recently, or if you’ve figured out how to do something cool. Please feel free to share!