Home Assistant OS Release 8
home-assistant.io
home-assistant.io
My smart home 2021: A Home Assistant love story - https://news.ycombinator.com/item?id=30349767 - Feb 2022 (200 comments)
Smoking a turkey with Prometheus, Home Assistant, and Grafana - https://news.ycombinator.com/item?id=29361741 - Nov 2021 (71 comments)
Home Assistant – open-source home automation - https://news.ycombinator.com/item?id=28544835 - Sept 2021 (177 comments)
Home Assistant iOS app adds local push notification support - https://news.ycombinator.com/item?id=27779453 - July 2021 (76 comments)
IoT Unravelled Part 1: It's a Mess but Then There's Home Assistant - https://news.ycombinator.com/item?id=25184763 - Nov 2020 (188 comments)
Open-Source Home Automation - https://news.ycombinator.com/item?id=21665125 - Nov 2019 (231 comments)
Home Assistant: Open-source home automation platform running on Python 3 - https://news.ycombinator.com/item?id=17826373 - Aug 2018 (196 comments)
Home Assistant is an open-source home automation platform running on Python 3 - https://news.ycombinator.com/item?id=15521743 - Oct 2017 (170 comments)
- to get the most out of it, it wants to be installed as an “OS” on a dedicated device (like a raspberry pi). Without doing this, you can’t install add ons from the store. I’m guessing this might be because the add-ons themselves are packaged with docker?
- I went ahead and did what they wanted, and dedicated an entire raspberry pi to home assistant. But from there, it seemed extremely GUI oriented… I had to install an add on just to see my config files! I know plenty of people have had success keeping their configs in version control, but that seems to be fighting the current.
So as a particularly advanced user, I don’t think Home Assistant is for me. Which is perfectly fine!
Does anyone have any recommendations on home automation software for people who write code for a living? The main thing I’m after is a decent library of supported devices that I don’t have to reverse engineer and write SDKs for myself. I’d also like to dump any/all sensor readings and switch states into Prometheus and view data with grafana.
They have moved to be UI based, which does seem to work much better for most users given how complex automations can get.
Usually you can do it yourself, because yes they are just docker containers. I don't use them myself as I don't find much use for most of them. The more important addon tool is HACS and that works in the stand alone docker container.
> But from there, it seemed extremely GUI oriented… I had to install an add on just to see my config files
Yes it's very GUI focused now, you can usually get to the basic yaml config in any screen though if you click through to manually configue that component. This was generally done because the yaml config method was a pain even for the tech literate... because yaml.
If you want proper code in HomeAssistant have a look at AppDaemon https://appdaemon.readthedocs.io/en/latest/HASS_TUTORIAL.htm... Makes it easy to use Python in HomeAssistant.
Alternatively there is Node-red https://nodered.org/ (js visual node programing automation) and huginn https://github.com/huginn/huginn (Python automation)
They will never offer as much integration as HA so I tend to find using HA as a dashboard/device integrator and then Node-red/AppDaemon for the actual automations to be more optimal.
I develop my own home automation components and use MQTT to interface with HA using its MQTT integration. This gives me the freedom to have fun developing sensors, presence detection, garage door openers, etc, all still with zero reliance on "cloud". And I still benefit from a single UX and integration point on HA, which to me is the biggest value.
I run HA on Docker and it's locked down as much as practical. For example, I use nginx reverse proxy and limit HA itself to 127.0.0.1:8123 -- I don't need/want anything automatically discovered on my network.
I also have no need for addons. That just seems like more headaches when upgrading HA.
Keeping things simple with HA has worked great.
- setup HASSOS as a VM in my proxmox (and passing the usb zigbee stick through)
- install HACS for extra addons
- install the VSCode addon (meh, I’d prefer vim)
- install zigbee2mqtt
- write all my automations with appdaemon
That last point lets me write everything as python code instead of point and click (nodered) or some weird and limited (to me) yaml. With appdaemon, anything python can do is possible and you get an api to HA for the automation part.
VSCode also gives you a terminal so you can use git etc.
If you prefer there is also the option of using ssh to edit your files directly, you can break out of the default HA shell over ssh with “exit”.
HA didn’t make much sense for me until I heard of appdaemon. Now it’s amazing for me.
Depending how sophisticated your needs are, if you write code, consider writing your own. With libraries handling most of your hardware integration, writing a home automation system is often primarily writing the glue between. (I didn't do this. I made mine much harder for myself, I speak directly to serial ports with hardware codes, it's also much buggier than other solutions.)
https://github.com/hassio-addons/addon-grafana
Yeah, if you want to have it 'just work', a dedicated Pi seems fine, though I'm considering moving it onto my NAS if I get a usb Zigbee stick (I have one sitting on the pi's gpio pins).
I know I ran the motioneye service on the nas (docker container) as the Pi was struggling a bit, and to have more room to write the files. If you are already familiar with docker, you can totally run the add ons yourself.
You can also write your own automations in python with HA https://appdaemon.readthedocs.io/en/latest/
And if you wanted, I think you can configure appdaemon to run without Home Assistant if you have something else running the MQTT service, so you could add the Zigbee2 add on (just a docker image https://www.zigbee2mqtt.io/) and interact with it directly.
Zigbee2Mqtt does a great job supporting lots of devices (IKEA stuff for example), so I think you might just want to get a zigbee stick and go nuts on the MQTT instance yourself. Shouldn't be too hard to log the MQTT events into your custom dashboards.
You might not even want AppDaemon if you want to just code up an event loop yourself...?
But I'm pretty happy with the gui/yaml home assistant experience, as I mostly want fairly simple and predictable automations, and the dashboard is good for the whole family to use as well.
I honestly don't do a ton of automations. The one really important one controls a hot water recirculating pump with a Shelly One set up as a temperature sensor. This is a small ruby program that uses MQTT to set the state of the zwave switch controlling the pump switch and directly talks to the Shelly for temperature readings. It talks to the HA API for settings but has reasonable fallbacks if things fall over.
Its written in Perl and a bit dated, but it's small and connects with everything I have. Plus it includes a MQTT server.
Probably one of the most well developed open source projects I've seen, both from core contributors finding a way to get paid for what they do every day with nabu casa as well as a large and thriving community.
Over the past two years there's been a ton of work put into making things more plug and play and GUI for folks, but all the technical wiring under the boards is still there for doing just about anything you want.
I have basically everything off the cloud, except for a few things I want on there. If you want everything off the cloud you'd be wise to do a bit of research and get a zigbee and or zwave stick.
Don't blame HASS for IoT providers that are routinely pushing up firmware that breaks anything that interfaces with their products without going through their cloud, but for most things there are things out there that work great without it.
With every monthly update, something breaks, stuff gets deprecated, then removed. I report those issues, but they get quickly closed without being resolved.
I take a similar approach to firmware upgrades for my IoT devices - I run them on a couple of separate vlans, so I feel okay only updating them every few months when I see the need (mostly custom builds of tasmota/esphome/etc.)
HA is not ready for grandma, but most technically inclined folks should be able to get a ton out of it after you get past the initial learning curve.
The add-on actually download the new version and checks my config file against it. When something breaks, you get the error message so you can fix what's not working (happens once or twice a year for me, usually a config change), and relaunch the add-on to test again.
Over all I am happy with it, but it is increasingly harder to find devices that are not cloud encumbered, even some things that have integrations with HA are basically HA interacting with the OEM cloud API, which not local control.
I prefer zigbee, but I fear the migration from Zigbee to "Matter" is going in the wrong direction, as Amazon and Google are really pushing cloud based control over Local Control...
They are reasonably priced, are built with local control as the primary feature and there's not even a hint of Silicon Valley/VC/"growth & engagement" smell.
> As a perk you retain the functionality of the existing light switch
This sounds super interesting, so both the control from shelly/HA and the physical light switch can be used?
Do you have any pictures/blog/something about how to set that up? I briefly looked into this in the past, but it seemed impossible with the existing wiring (only the live wire is behind the physical switch, no neutral).
Basically the switch becomes a simple boolean input to the Shelly - the actual module is always powered. This allows you to turn it on via the network and turn off at the switch if you wanted to, or completely detach the switch from the actual light and only use it as an input to your home automation controller (maybe you want to use it to toggle a different light than the one it's connected to?).
For no-neutral operation they sell bypass resistors that you can put in parallel with your light to pass through enough current to keep the Shelly powered on.
Matter re-uses the Zigbee Cluster library for actual device control. It can operate over any layer 1 and 2 solutions that support ipv6, but the blessed implementations seem to be Ethernet, Wifi, Thread, and Bluetooth.
It will remain local control, on Apple's insistence. Apple is pretty stubborn, in that the only cloud server allowed to be involved in its home automation systems is iCloud, which is basically only used to let Siri on your phone control your home when away from home.
Moving it to just standard wifi, Ethernet, etc will allow device manufacturers to lock out people like me
Others in the community seem excited for it however anytime you have Amazon, Google, and Apple all working together I can never see how that results in good things for users as each are open hostile to user control in various ways.
That's surprising+disappointing to hear. I wonder if there's some sort of list of devices that rely on this ? Would be good to avoid them.
Currently running an instance of deconz for all the zigbee essentials which is a lot less powerful but has been rock solid. I have a bunch of Go apps running on the living room Kubernetes, one that streams all events from Deconz and a few other sources to Kafka running on a Raspberry Pi and a few more that add automations that deconz can't do. I'd expected this to be flaky as hell, so the apps running there aren't critical, but it's been rock solid for over a year even though Kafka isn't even supposed to run on ARM.
He's had great success with the built in backup to google drive solution. He fragged the whole setup once without bothering to do any trouble shooting he just reinstalled the OS and applied the backup and was up and running in no time.
SD card was probably a major reason, but i didn’t want yet another thing hanging off a usb port.
Great work, all!
Now all the automations rely on a local MQTT server where my devices connects to an a ~300 lines python program, that communicates with the MQTT server and applies all the automations, and also exposes a simple REST API to do things with a simple `curl` if I need so. Everything (MQTT server and python script) runs on my home router that has OpenWRT on it. I find it simpler to express automations with code than with complex web interfaces or yaml configuration files that are as complex as a program.
Not sure why you are complaining about needing a Mossie - I assume that refers to Zwave2MQTT. Zwave actually works these days in HA, thanks to a lot of work in a very short period of time. At work I have 40 odd windows with Zwave detectors and it used to be a bit hit and miss. At home I have been doing very long term trials of Zwave underfloor heating controllers. I have 10 zones of electric underfloor heating and two of them are running Heltuns (v1) at the moment - three years so far. One of them has run away madly twice ie run at high current and hot but not since a firmware update. Strangely enough one of the old controllers ran hot too after a power outage, recently (investigation ongoing).
You describe handwritten Python programs whilst complaining about YAML configs elsewhere. How do you generalise your stuff?
For instance business people are drawn to products aimed at solving the "integration" problem between different enterprise products like a moth to a flame.
What's ironic is that the "integration problem" is much less of a problem than developing user interfaces or database application. From the viewpoint of a coder an "integration problem" is often ten lines of Python which can be completed in less time than it takes to wait for a salesperson to pick up the phone or that you could spend waiting for the documentation of an integration framework to load in your web browser. You generally avoid the devilish data modeling problems that turn up in applications work.
HA is the only service I am running now that isn't hooked into my SSO and it's a niggling frustration to say the least.
You can use this with Home Assistant's local IP auth (that just bypasses auth and assigns everything to a single HA user) so you don't have redundant auth mechanisms.
What I have been meaning to do is have my Auth provider fall back to basic password or something else for HomeAssistant logins, just need to figure out HOW to do that.
Not quite SSO, but at least the passwords and users a synced across, so that's nice.
Sure, I’ve automated everything I could, but humans are not predictable so I often need to adjust brightness or volume of some device.
I had some keyboard shortcuts in BetterTouchTool using the HA REST API but it felt too fragile. In the end I created my own app to make this easier, called Volum (https://lowtechguys.com/volum)
It gives you macOS keyboard shortcuts and a really simple UI on iOS and iPadOS to control your HA devices and it’s completely free if you want to try it.
I’ve also made a short unprofessional demo video here about it: https://youtu.be/nzz-xrEon7g
In the morning, depending on the weather, both of my floors set to heat, cool or heat/cool. The lights adjust to a cool temperature, fully on. Maybe the lawn gets watered, if it hasn't rained in a while and won't soon (I live in the PNW, so that one doesn't trigger often, haha). At sunset the lights adjust again, and finally most of them turn off at 9pm and the hvac system again adjusts, depending on the weather. The lights and shades in the media room adjust when the TV turns on. And a million other things that I won't bother to type out. But the point is, it all Just Happens, and I go to great lengths to keep it that way. If manual control is needed, just flip the switch or turn the thermostat.
But when I have guests and we need more light for a board game, or when the automation didn’t work as expected and lights are still off at sunset or the blinds got stuck at midpoint, or the heat is still too high and I’m already in bed etc. there’s a real need for fast and effortless manual control.
I’m now investing in Zigbee switches and knobs to have more physical means for controlling the home, but in my engineer mind, an app made more sense at the time.
I spend most of my time on my keyboard laptop anyway, why not use it for dimming the lights, or adjusting the speaker volume.
On iOS i just pull down the control centre from the clock and it shows my most 6 most used home assistant things (a few lights, temp and door lock). HomeKit Bridge, I think is the integration that provides that.
It provides essentially the same UI as your app, without any app needed, and allows for "hey siri, turn on the hallway light" too.
I also needed to control non-HA devices like standalone ESPHome lights/remotes, which Volum can do.
I also recently started using https://raycast.com which has a nice HA plugin
It's also insanely cumbersome to use things like circadian lighting at the moment, which I use extensively since my apartment doesn't that much sunlight. It requires editing a YAML file, which requires installing some editor plugin, which requires supervisor mode, which required a full reinstall as a VM because I'm an idiot and installed the docker version of HA at first. And then figuring out how the hell to get a VM to start at startup in headless mode. And then fumbling for hours with how to install HACS and other things.
But yeah, it's nice for open source standards.
The dashboard should be for setting larger scenes.
Example: If you want to watch a movie, you should either be able to say something to your digital assistant of choice or press a single physical/digital button. That automatically sets the lights correctly, closes any blinds and turns on all AV equipment needed.
I do have most of my house automated, but my pain point is in those rare moments when I need to do something that doesn’t fit anymore in my predicted automation.
I said it in a previous comment as well, but I’ll give some more personal examples here:
1. We have friends coming and we need more light for a board game
2. My wife wants to sew some new clothing creation and needs bright white lights for short periods of time
3. Sun is still very bright at sunset but HA already turned on the lights (I kinda like the sunset natural light, and want to enjoy it without artificial lighting. I have a light sensor for this situation but it’s hard to get it right)
4. I want to change volume of a speaker but I’m not using the device playing the music
5. I want to get the blinds higher/lower without getting out of bed
I’m not saying everyone needs my app, of course. I made it for myself, and just decided to share it with the world, in case there are other people sharing my pain points.The "correct" way is to set up everything in HA and then link it to the Apple ecosystem with the HA integration.
If you set your stuff on HomeKit first and then enable the HA integration ... you'll have two of everything and a headache. Ask me how I know :D
Automating anything based on "Sunset" or "Sunrise" is 100% useless as the time for both changes multiple minutes per day. Currently the sun will set at 22:28 and will rise again at 04:07. I don't want to control anything based on either =)
1 & 2 sound like something you should have a scene for. For #1: "Alexa, board game mode" and boom you've got enough light. And for #2 just slap on a cheap zigbee switch from Ikea next to the sowing table.
Well it’s hard to give enough context but none of those would work for me. We sometimes take our board games in the living room, other times on the balcony, sometimes even in the bedroom if the guests have a little child and they need to keep an eye on it. I would have to create a scene for all those things and end up with the same problem: too many button to choose from, doing what I want takes too much effort.
Calling Alexa in English as a Romanian is a sure way to get you some laughs and weird looks from those around you; not everyone is accustomed to voice controlled tech and some even feel uncomfortable around it.
I have a lot of those Zigbee switches, but Conbee has failed on me sometimes and I don’t want to see that type of frustration from my wife again. You know the type: “why can’t you just turn on the lights like a normal person?!”
When you have something in mind to do and the simple stuff stop working, the situation is very frustrating. I imagine it’s like when I want to add some features to my app, and Xcode decides to throw some impossible error that has no concrete solution and I have to do the “clear data voodoo” and restart until it starts working.
Open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts. Perfect to run on a Raspberry Pi or a local server”
Raspi is fine when you're still setting it up, but not worth the hassle when it breaks.
i5-6500T, 1TB of M.2 SSD, 16GB of ram and running a good two dozen Docker containers.
I'd say that's a better bang for the buck than a closet full of Raspberries struggling under the load :)
I know it isn't going to be pegging at 65W but if it's anywhere in the vicinity, it's cheaper to use AWS instead. I used to have a server that I used for Plex/HA, but in the end the energy cost was higher than a Netflix subscription. I could have upgraded it to more energy efficient hardware but it would have taken years to pay off.
It's a wonderful project but I wish they would be more careful about SD wear.
Luckily I was doing restic [1] backups daily to my Hetzner box, and my last HA backup was there, so I didn’t have to start from scratch. But it’s still annoying to have to buy another SD, flash it and find a way to restore the backup just to get your home running again.
A cursory google search revealed lots of blogposts, videos etc on doing exactly that.
Also, if you're using an Rpi, it's also because you like tinkering, so more tinkering could be seen as a bonus :)
Also, they are affordable, small, and low power, and an actually good SSD kinda messes that up.
*Air conditioning is hard to get permission for as a renter in Germany.
The latter part of your problem is a solved one. Weather forecasts and local conditions (from your own indoor/outdoor sensors) for the weather, heat capacity and permeability could be hardcoded or via helpers, cigarette smoke via air quality sensors. All of these can be integrated with Home Assistant.
All that is left is something to physically open/close the window, which should also be a solved problem.
I recently wrote about how to do a declarative model for automations, which I use throughout the house: http://peterhajas.com/blog/declarative_home_automation.html
If you want something that actually offers more capability then something like node-red is probably more useful, it allows scripting all kinds of custom behaviour over many different protocols. (although even then it's rare to find a real use for it, besides having fun hacking things together, though they make it easy to build your own UI for stuff, which is neat)
Here's an example: I have an AC unit which is either on or off. I don't want my AC running all the time, but I want it to turn on automatically if the temperature raises above a certain value. That functionality is not possible with my AC unit, but I can use HASS to automate it.
Here's another: I have an air purifier which has an intelligent 'automatic' mode, which is supposed to change the fan setting if it detects higher levels of particulate matter - and to be fair, it does, but only between one of three presets. In reality, the machine has a 'turbo' mode which can be manually activated and deactivated.
HASS allows me to automatically switch back to auto mode from turbo mode in case the PM2.5 rating goes back down to a good level (e.g.: 2).
One other thing it's great for is taking IoT products (like for example smart plug sockets) which depend on their own apps, and integrating them with HomeKit.
I have an iRobot vacuum. It has some settings, like it can automatically run when I leave the house. It also has a Siri shortcut so I can control it with my voice. But if I leave home early to go to work, I don't want it to run and disturb my wife. With HASS, I can bridge it to HomeKit, which can trigger it only if NOONE is home.
I could also use HASS and my security camera to only run the robot if there's no motion detected for a period of time and no-one is home, and it's after my wife finishes all her work calls at 5 but before bedtime, but haven't felt a need to go to that level of complexity (plus my cats set off the motion detector all the time!).
It also gives me the option to buy cheap alternatives and bring them to HomeKit, rather than depending on specific apps.
Given that I had a Raspberry Pi lying around anyway, it was an absolute no-brainer.
It really annoys me when I turn up the volume and my fan turns off, especially in winter when I want it on to stir up the air. So I set up an automation to check the fan setting and if it is off, turn it on.
So far I haven’t really figured out what else to do with it.
Such moves have only commercial reasons and normally in practice are commercial fails due to the inevitably low quality of the output. I still have to see ANY dedicated distro with a commercial success behind and without a large number of angry users.
Like, this is linux. Linux is the OS.
This is home assistant distro.
I personally think some of their leaders also have an over-reliance on gut reaction - have never once seen them admit to being wrong, even on multi year issues where context has changed. I think a useful litmus test for anybody in a position of power is "when did I last change my mind". If the answer is "never", either you're perfect or you need to think about how you've been making decisions.
Edit: Just went through the DNS thread. Good lord. Just their typical M.O. on breaking things in the past.
I did give in and actually had it running with Docker for some time. Eventually it just got real laggy and stopped responding to input or device state changes promptly. I had no idea why that would have been, and had no desire to wade through Docker manure to figure out how to debug it, so my setup just kind of fell by the wayside. Now when I think "home automation would be nice to have again", I envision just writing my own mqtt-native daemons some day.
It's not even about "having to support someone's setup" it's about basic best practices, practices other software implements relatively effortlessly.
Very much akin to Canonical's Snap ~/snap folder thousands of users are pleading them to move to a more normal location.
I agree Docker is the "least evil" option for HA which is why I gave it a shot. But I still got random breakage, even with their auto update auto everything solution. So I'd say it's more like they haven't done the work to make reliable software, and instead of letting others start to apply pressure so that work gets done, they've dug their heels in with the modern way of saying "works for me". Container images are basically the contemporary .EXE.
If I can be running Internet-facing postfix, powerdns, nginx, asterisk, etc through distro packages and have them stay updated, a home automation daemon that is exposed only to my own network can most certainly do the same. It's tedious work to get software packaged for wider audiences, but if Home Assistant wants to bill itself as one of the leading solutions for libre home automation, then it's work that needs to be done.
Point being that this incompatibility is active instead of passive, so this effort could be or could have been spent better.
As for the DNS issue that seems to be a technical or design issue, I don't see in that thread any bad behaviour on the part of the devs, unless I missed a post.
The whole thread brings back PTSD when I was running it. It is reminiscent of every major problem they've had.
> seems to be a technical or design issue
This is the exact issue. The head devs don't keep contributors in line or provide any guidance at all. People just submit things, there's no checks on "is this a good idea?" and into master it goes. Does anyone actually want this? Does it make sense on how it's implemented? Will it break anything?
Those are questions for later.
They did not originally allow this fallback behavior to be disabled because it should not have been needed, and would only result in those original bug reports returning.
However there was a problem in the original design for fallback, where it had an issue where DNS could get stuck always being routed to the fallback servers. Which means local DNS names won't resolve. While annoying, this is often reasonably easy to work around, as one can typically just assign static IPs to relevant local devices and use the IP addresses. They did eventually fix this, so that it cannot get stuck using the fallback as the primary, and local dns names work again.
Furthermore, they are now able to detect when locally configured DNS is broken in ways that break alpine containers, so they now offer a feature where you can turn off fallback DNS, but if you have broken local DNS your system will be flagged as unsupported, which means that the devs can summarily close your bug reports without investigating, unless you have reproduced the issue on a supported installation too.
Almost all my devices are flashed with tasmota or have mqtt in them.
Maybe there is a lot less hardware support, and certainly much worse google home support but the 30 devices I have around the house work fine. All family friendly. The light switches just work. The doorbell works and no one knows it goes via an RF bridge to a home made/written mqtt to mp3 player.