13 ms·
Home Assistant[1] is the best approach I've found for this. It's pretty amazing but has a pretty steep learning curve (although they're getting better and bette
by kkielhofner 5y ago
Home Assistant[1] is the best approach I've found for this. It's pretty amazing but has a pretty steep learning curve (although they're getting better and better at this). The real power of HA is the rich integration ecosystem[2], the Community Store[3], and that it runs locally (more reliable and much faster for things like motion sensors, etc).
It expresses everything from every integration as an entity in various device classes so as long as some random tech is supported by an integration you can group them seamlessly. For example - I have Z-wave based motion detectors but I can control Hue lights and Wemo switches for motion detection - but only if I'm home as reported by the zone feature in their iOS companion application.
Their supervisor/docker based install for Raspberry Pi is pretty slick[4]. Write an image to disk as you usually would and you get a bare-bones OS with Home Assistant running in docker. Then there are additional docker-based add-ons you can install for stuff like MQTT, Z-Wave, Let's Encrypt, SSH access, nginx, and more. All managed in the web ui. Pretty cool.
[1] https://www.home-assistant.io/ https://www.home-assistant.io/
[2] https://www.home-assistant.io/integrations/ https://www.home-assistant.io/integrations/
[3] https://hacs.xyz/ https://hacs.xyz/
[4] https://www.home-assistant.io/installation/raspberrypi https://www.home-assistant.io/installation/raspberrypi
- iamspoilt 5y agoI spend my last weekend setting up Home Assistant using VMWare on my spare machine. To say that it has been very rewarding is understatement. I am completely blown away by the possibilities that it enables. For instance, I have all my unsupported devices magically supported in HomeKit via the HomeKit Bridge integration in HA.
- slothtrop 5y agoI'm aiming to use a supervised installation to free up the pi for other tasks, but concerned about performance. Will be booting from SATA to help to this end, and to avoid degradation from writing to microSD often (this may be the case when I start recording security footage)
- Nextgrid 5y agoI haven't had any issues just using the stock image on an SD card - it seems to be fast enough. YMMV especially if you plan to run other things on the Pi, though in this case I'd recommend going for a mini-PC instead and just installing a standard Linux distribution on it.
- slothtrop 5y agoI see. Really it was just going to be something like pihole which is supposedly light. Maybe better not to use the supervised if this is focused on running HA? In the future I'll consider the mini-PC, thanks. This will have to do for now.
- vorpalhex 5y agoYou will probably not have a great experience running cctv from a pi. You may want something a bit beefier unless your cams are low res, mostly due to transcode/copying costs. In terms of disk, you want multiple disks as either raid/zfs/btrfs/lvm. It will probably be better to do this on a separate machine and mount it via nfs. For your boot volume, you can also use a usb thumb drive to help avoid sd card fatigue.
- contravariant 5y agoDoes anyone know how Home Assistant compares to node-red? As far as I can tell Home Assistant is better at building a dashboard of things, but node-red is better at actually automating specific actions (unless you want to grapple with HA's YAML based scripting language). Is this about right? Is it possible to combine Home Assistant and node-red, or has Home Assistant outgrown the need for something like node-red?
- Semaphor 5y agoIME: For simple automations, HA UI is far easier. For complex ones, if you want a GUI, node-red, if you want to handwrite scripts, HA. If you don’t care it really depends, in some cases coding them is easier, in some cases node-red is easier. But then this is about Node-Red integrated into HA.
- OJFord 5y agoIt is possible, and a few years ago seemed quite a trend (just going by /r/homeassistant spectating) - https://github.com/hassio-addons/addon-node-red https://github.com/hassio-addons/addon-node-red - but I gather HA's own automation scripting has at least visualisation if not GUI programming now.
- avel 5y agoThey are not comparable because node-red is a generic low-code programming tool while HA is home automation software. If you mean how they compare when you plug in node-red to HA and use it for automations, rather than use HA's "native" automations... I believe the consensus is that node-red is more user-friendly in that way, and because it can plug to other things on its own it can provide more flexibility. On the other hand, HA has recently worked on the UI of their automations, and it is already pretty good for simple flows. In the end both of these approaches are great, each with its own pros and cons.
- entropie 5y agoFor me node-red is more of an addition to homeassistant. There is node-red-contrib-home-assistant-websocket [1] to let node-red speak with homeassistant, you can watch state changes etc. I use ha for like two years now and at the start there was no inbuild automation-backend like it is now so we did everything with node-red. https://flows.nodered.org/node/node-red-contrib-home-assistant-websocket https://flows.nodered.org/node/node-red-contrib-home-assista...
- iandanforth 5y agoHow do you handle network security? I wouldn't trust an IoT device on the same network as any of my family's computers or phones for example.
- alufers 5y agoI personally just flash everything possible with open-source software. All my light switches and Wi-Fi lightbulbs run Tasmota, which I password protect and semi- regularly update. The one odball is my Gree AC unit, which is on a separate WiFi network and subnet (I just run hostapd on my RPi since it's close-by). But it's more to protect it from the outside, not the other way, because it's controlled with JSON sent over UDP, and if you send a malformed packet the microcontroller inside crashes. When this happens and the compressor is engaged it will freeze up, possibly destroying itself and start flooding the floor, because the condensation pump won't turn on.
- jve 5y agoHow did you find that out? You mean random UDP packet can destroy AC? /me having a Gree unit that is to be installed
- alufers 5y agoBefore I got a Raspberry Pi with home assistant, I was trying to write a simple client for this protocol in C so I could host it on my OpenWRT router. Of course my client bugged and sent some random junk which caused the unit to completely lock up, it displayed 88 on it;s display and didn't respond to the IR remote. After this I had to reset it via the circuit breaker. If I recall correctly, the data was encrypted using a static AES key, and I think the unit checked if the data decrypted correctly, but don't quote me on that.
- artificialLimbs 5y ago>> When this happens and the compressor is engaged it will freeze up, possibly destroying itself and start flooding the floor, because the condensation pump won't turn on. Do not buy Gree. Check.
- davemtl 5y agoI recently set-up HA on a Raspberry Pi, integrating my lights, security system and other devices. You're right about it having a steep learning curve but once it's up and running it's pretty much set and forget. With HA I'm able to use my Hue switches to toggle a TP-Link Kasa smart power outlet. It also has the added benefit of only requiring ONE application on my phone instead of nine.
- xxpor 5y agoI'd also suggest to everyone looking into HA to take the time to learn Node-RED. After running HA for a year and a half, but only ever creating basic integrations, NR has really unlocked the power of HA for me. Part of it is the tutorials for NR explained the internal data model of HA in a way that I finally get it. Plus just ergonomically, I find NR MUCH easier to deal with than HA's native automation UI.
- acidburnNSA 5y agoSame. I've been a huge Home Assistant fan and minor contributor for many years. My house is among the smartest houses I've ever heard of. HVAC control, security system, air quality monitoring, multi-site IT systems monitoring, lighting controls (including LED strips that update to the right color scheme for the next holiday), whole-house networked audio (including streaming off-site if connected to the VPN), on and on. All self-hosted, on-prem, zero cloud, coordinated by Home Assistant. Offsite notifications via email, offsite control and monitoring via my Openwrt router's VPN server.
- bredren 5y agoHave your written up your implementation? What type of air quality sensors have you used and how are they integrated into the home’s behavior?
- lostmsu 5y ago+1 for the air quality sensors question. I only found 1 for CO2 levels, and it is not connected. And even that one costed $120.
- tga 5y agoTuya Zigbee air quality sensors on AliExpress start around $20. I can't speak to their accuracy, but they are supported by Zigbee2MQTT and provide a CO2 reading. https://www.zigbee2mqtt.io/devices/TS0601_air_quality_sensor.html https://www.zigbee2mqtt.io/devices/TS0601_air_quality_sensor...
- acidburnNSA 5y agoAnswered here: https://partofthething.com/thoughts/weather-and-air-quality-monitoring-station-with-esp8266-and-home-assistant/ https://partofthething.com/thoughts/weather-and-air-quality-...
- acidburnNSA 5y agoI have done a bunch of writeups, in this category [1] The weather station post in particular with the sensors is here [2] [1] https://partofthething.com/thoughts/category/electronics-and-physics/home-automation/ https://partofthething.com/thoughts/category/electronics-and... [2] https://partofthething.com/thoughts/weather-and-air-quality-monitoring-station-with-esp8266-and-home-assistant/ https://partofthething.com/thoughts/weather-and-air-quality-...
- phreeza 5y agoDoes anyone have some experience to share with integrating home assistant with Homematic devices? I'm stuck with those for controlling my heating but really dislike the interface.
- Inversechi 5y agoThey have a really welcoming community from my experience. Try either their forum or discord.
- scottlamb 5y agoI'm still figuring out Home Assistant. I love that it has a real ecosystem and that it seems to have a decent HTTP/WebSocket API (that I just started playing with). Some things I don't love: * A lot of the integrations seem half-baked or to not quite fit the generic Lovelace cards. I think to some extent this is an inherent problem in supporting a lot of devices that have crappy, non-standardized APIs. Example: if I bump up the low temp on my Venstar thermostat on the Home Assistant dashboard, Home Assistant will immediately set it back. If I dig through logs, I see the thermostat complained that in auto mode (heating or cooling as needed), the low set point and the high set point have to be (at least) six degrees apart. When I adjust the thermostat through its own touch screen, the high set point automatically raises to meet that constraint. Home Assistant should do the same. I've been meaning to look into fixing it myself, but there seem to be weird things like this on every integration. * You need multiple automation rules to do almost anything. I think it's common to want the state of one thing to match another (for example, garage door open => sticky notification on my phone, person in driveway after sunset within last 5 minutes or switch on => driveway light on). You need a rule in their YAML DSL to for the off->on transition and another for the on->off. It'd be nice to set a rule that defines a level rather than an edge and have it internally do the transformation. It'd also be nice to define the actions of a notification's buttons inline, rather than as a separate automation. * The companion Android app's notifications seem to be flaky. At least, they're sometimes slow. I think they can be delivered out of order and possibly are lossy, which aggravates the problem with not having something that just sets the state reliably. I assume it's pretty hopeless to have it reliably be in the right state if your phone was off when a notification was supposed to be delivered or Home Assistant was down on state transition or the like. * Some things seem to be only checked at startup, so my house has race conditions after power outages. For example, if Home Assistant starts up more quickly than my Yamaha AV receiver (+ network switch + DHCP server), I can't control my home theater setup until I restart Home Assistant.
- dheera 5y agoI also hate that you have to install it as an OS or VM to be fully featured. If you use the docker version it is crippled with no "supervisor" mode. Also every now and then a light or switch will go greyed out in HA, their official apps still work, and I have to restart HA to be able to use it in HA again. Pretty annoying when you get home after a long day, soaked in rain, fumbling in the dark to turn on lights and now you have to fumble more to restart the damn server before you can use your lights.
- billfor 5y agoIf you don't have any need for bleeding edge devices, Openhab still works on a rpi4 as an alternative to HA. I like that I can just install it as an apt package onto an existing rpi with other things and java just does its stuff, rather than dedicating the entire rpi4 to it or running in a container.
- scottlamb 5y ago> I like that I can just install it as an apt package onto an existing rpi with other things and java just does its stuff, rather than dedicating the entire rpi4 to it or running in a container. If you try Home Assistant again, you'll probably like Home Assistant Core. No separate OS or container needed, just a Python virtual environment. That's how I have it installed. I have to do the updates and backups manually (rather than it self-updating automatically / through the UI) but I find that preferable to dealing with an extra machine, VM, or container.
- mr_person 5y ago+1 for OpenHab. I have tried HA several times, but always cone back to OH for its super simple ui and app layout editors. Apt install is also nice. Also, plugging in a half-decent zigbee controller usb dongle and receive native zigbee controls in the system, no need for a bridge like mqtt
- wyager 5y agoI had a terrible experience with Home Assistant. Slow, buggy, unreasonably difficult to implement non-trivial automations. My heuristic since then has been to minimize the amount of node.js in my home automation codebase and this has worked wonders for its reliability and usability; currently the only component I still have that's node-based is zigbee2mqtt, which (possibly not) incidentally gives me more issues than any other component. The best approach I've found has been to have (in isolated jails/containers) zigbee2mqtt dealing with zigbee network stuff (you must use CC2652 based coordinators and routers for any kind of reliability), mosquitto acting as an MQTT broker, and a custom program (write it in whatever you like) talking to mosquitto, with Pushover for push notifications.
- kkielhofner 5y agoI'm not understanding how node.js relates to Home Assistant (written in python)?
- wyager 5y agoI've had mixed experiences with python (mosquitto is fine for example) but more uniformly bad experiences with node stuff. I would vastly prefer all of this crap to be written in Rust or Haskell or OCaml or anything oriented towards correctness. It's relatively very important that the code which runs your home works correctly.
- bmurphy1976 5y agoI don't speak for the op, but the current recommended z-wave integration is via a sidecar javascript service: https://www.home-assistant.io/integrations/zwave_js/ https://www.home-assistant.io/integrations/zwave_js/ One of HA's selling points for me originally was that everything was written in Python. It's frustrating that I am now faced with pulling a javascript service into the mix. Most of my devices are z-wave and I'm still running on the legacy integration and dreading this migration.
- bonzini 5y agoI do the same for the automation part (mosquitto+zigbee2mqtt+custom scripts), but I do have Home Assistant for GUI and logging. For example I have a card in Home Assistant that shows whether any system at home doesn't ping. Here is an example of an automation script, turning a zigbee plug on/off depending on solar roof output: https://gist.githubusercontent.com/bonzini/c705bdd47fd5cd16a72028cf9c086312/raw/f464c9144883649d5f435c951be15d3dd1baf04b/presa.sh https://gist.githubusercontent.com/bonzini/c705bdd47fd5cd16a...
- late_groomer 5y agoHome Assistant has been nothing short of amazing. I started out just wanting to control my Christmas lights back in early December; tried going the HomeKit with HomeBridge route, only to realize I needed an iHub or some other (i) device on my network to have it work remotely. It was a bad experience even while on my network, luckily stumbled upon Home Assistant looking for better options a week or so into the journey. Now I'm controlling everything, even watching my security cameras, through HA. The one caveat in my experience has been trying to run Pi-Hole on the same server as HA Supervised or using Adguard Home. Trying to run HA and PiH, even though they were both in docker containers, caused the Pi 3B+ to freeze every few hours. HA makes it clear running anything else is a bad idea, and that proved correct. I deleted PiH and tried the Adguard Home addon for my DNS for awhile, it was really slick and had a lot of features, but I found myself missing the PiH for several reasons. For one, it really sucked to be tinkering with HA while other people on the network were on the web; every time I needed to restart HA (which was often setting up the cameras), I'd get constant groaning and moaning about the internet being out. I also found it harder to control white/black lists; adding individual sites here and there was not as simple as it is in PiH. It also lacked the simple "disable for X minutes/seconds" feature I used so much. I ended up installing just PiH on the Pi 3B+ and grabbing a cheap Chromebox off ebay to run HA. All the things I was doing on HA really pushed the Pi at times and I read one too many stories about SD cards dying from heavy use. Now everything is zippy and I feel safer with HA installed on the internal M.2 SSD.
- sam345 5y agoI've had luck running HA and node red on a pi 3 but with 250gb SSD drive, responsive and reliable. I think that's the bottleneck. You can't use SD card. Also must use AC adapters specifically for pi, usually slightly above 5 volts and 2 amps I think. Also pinhole must be on separate device I agree with that.
- late_groomer 5y agoYep, I could have made it a better situation with some extra addition$ (I always put my Pi on a quality AC adapter from the start, those constant command line voltage nag warnings had their intended effect), but the cost of the SSD + another Pi is actually more than a used SFF device with a substantially more powerful Intel processor that comes with a M.2 SSD. It's amazing what you can get for < $50 these days. Great time to be alive for us tinkerers!
- aivisol 5y ago+1 for Home Assistant. Have it running on RPi4 for almost two years already without single glitch. It has tons of integrations, and besides that you can always build your own Arduino modules to connect with it over MQTT if you have your special use case. Web UI is really nice, you can even access and edit config files with it without going ssh. Android/IOS app also works pretty well.
- m0ngr31 5y agoI setup Home Assistant to be able to talk to my solar inverters and see my battery voltage without walking out into the garage (over modbus). Since then I started adding in door sensors and my thermostat. I just need to find a way to see how much propane I'm using and I'll be set.
- Macha 5y agoThey've also been pretty hostile to OS packagers trying to let you run it without dedicating an entire device to it, most publicly NixOS but they indicated they planned to insist the same against Fedora and Gentoo too: https://github.com/NixOS/nixpkgs/pull/126326 https://github.com/NixOS/nixpkgs/pull/126326 That behaviour kind of makes it hard to trust that it won't lead to the next Marak situation.
- asveikau 5y agoI run it in a VM and don't mind it; it's got the updater, it feels pretty self contained. I even do USB passthrough to give it access to my z-wave stick.
- kkielhofner 5y agoFor what it's worth frenck does not represent Home Assistant and the first sentence of his profile is "Slightly assholic at first sight"... That said you have a point but in my usage of Home Assistant almost since birth when it was a single pip install command I can tell you the sheer functionality, integrations, etc make getting it fully running a nightmare. Not to mention from their perspective actually supporting it almost impossible. Maybe this speaks to a wider problem but I'm very happy to install it with docker on the distro and hardware of my choice and have everything more-or-less just work. I referenced the operating system approach here because it's the quickest and easiest path to get up and running on a Raspberry Pi and therefore relevant to the article.
- bpye 5y agoThis kind of pushed me away from HA. I've ended up using integrations built using hc [0] to bridge devices to HomeKit, either existing or ones I've built, and then using Promtheus to collect metrics. It's not something that 'just works', but I feel much happier with how it works than HA. [0] - https://github.com/brutella/hc https://github.com/brutella/hc
- bmicraft 5y agoI've been running homeassistant installed by pip3 for years now (before they even had a os) and that has always worked fine.
- paulmd 5y agoI've really wanted to get into this to some extent but it's such a complex (and expensive!) topic that I really would like some distilled knowledge from someone who's been through it and figured out what works and what doesn't, the pitfalls, etc. This is probably a good place to ask - does anyone know of a reliable guide (or ideally blog) to get started? Or maybe would be a good topic for a future HN submission. My personal focus would be on cloud-free/self-hosted systems. Looping through the cloud as a convenience is fine but I don't really want to rely on cloudshit 100% for the operation of my house. Also I've heard really good things about the Lutreon stuff? Not open, and not cheap, but it works, and I've heard the z-wave stuff isn't always 100%.
- belthasar 5y agoI’ve used Home Assistant on a Pi 3B+ for about a year now. My main objective is like yours, I want as few devices as possible connected to the internet and generally only buy devices that have a local API (local polling in HA terms). I do pay for Nabu Casa, HA’s cloud service for convenient access to everything but nothing I use requires it. This also help support a project that I really enjoy using and rely on. I have most devices connected to an old wireless router that is completely disconnected from the internet. The raspberry pi is connected to my main network through ethernet and is connected to my “smart network” over wifi. I like to think of the HA instance as a two way mirror since it can reach the internet and see the devices but the devices themselves can’t phone home or access the internet in anyway. For bulbs, light switches, and smart plugs I generally stick with TP-Link Kasa. The local API works great with HA though I believe they are removing this in future firmware updates [0]. This appears to be for the UK only but I’m not 100% sure on that. I purchased a plug a few months ago that still works. My thermostat is a Venstar color touch with the local API. I have it connected to the internet but I could disconnect it and everything would still work how I want. You can flash Wyze v2 cameras with the official RTSP firmware to view them locally. You lose some of the features of the Wyze cams but I think this is a fine trade off. While this works with the Pi, streaming video taxes it a lot. It isn’t a perfect experience by any means. I also use Zigbee devices instead of Z-Wave (no real reason other than the first device I wanted was Zigbee). I have a Sonoff Zigbee bridge flashed with Tasmota that allows me to use any compliant (or quasi compliant in the case of Xiaomi Aqara) plug, motion sensor, temp sensor, etc across brands. The Zigbee bridge is also has access to the internet because it needs to connect to an NTP server. This means that these devices work fine when the internet goes out but if for some reason the hub gets power cycled while having an internet outage they stop working. You can get Zigbee antennas that connect directly to the Pi but I avoided this because the USB ports can cause interference. You can fix this by getting a USB cable extender. Feel free to ask any other questions about my setup. [0] https://alerts.home-assistant.io/#tplink.markdown https://alerts.home-assistant.io/#tplink.markdown
- rcarmo 5y agoI gave up on it solely because of the GUI. It's confusing as heck and very far from Apple's Home app, which is the preferred UX of the CFO (Chief Family Officer), even for fairly complex automations. So I just used homebridge for everything, with a smattering of Node-RED for (very few) device shims (it is _very_ easy to do MQTT handling with it). Also, I now have zero YAML to maintain, which is also a boon. Kudos, though, for Home Assistant auto-discovery, which I use with my Tasmota-reflashed devices (there is a homebridge plugin that transparently adds them to HomeKit as soon as they're set up).
- gregable 5y agoFor folks here I strongly recommend installing the appdaemon integration and just writing python scripts. The downside is there is a good bit of learning curve and time investment just to get the hello world going (turn on a light at sunset?). Once you are there, you can write shared libraries, abstract away whatever you want, have legit tests, and just do anything you would normally want in your coding environment (vscode, auto-formatters, source control, etc). Obviously not the right recommendation for a consumer system, but if you are like me and feel more comfortable with a programming language, it's the way to go.
- rcarmo 5y agoI can do that with homebridge-mqtt (I just stopped doing it in Python because Node-RED did what I needed and gave me a dead easy chart for temperature sensors).
- ornornor 5y agoFully agree. Interested about the tests though. I’m not a professional python developer but would love automated tests for my appdaemon code. How did you set it up, and how do you run the tests?
- gregable 5y agoI used https://pypi.org/project/appdaemon-testing/ https://pypi.org/project/appdaemon-testing/. You can write a simple test file which does things like sets a device state, then asserts that services were called or whatnot. It doesn't test that the service calls are correctly written, just that they were made. So, very useful for unit testing syntax / logic, but not a full end-to-end integration test solution. Still, with python being an interpreted language, this is super useful. I don't want to have to wait for it actually to be sunset to determine I have a syntax error in that branch of the code, for example. I don't actually have the tests running on the HA device. I have them on my desktop where I develop the appdaemon scripts, and then I copy only the scripts over to HA. I'm sure there are multiple ways to do it.
- ornornor 5y agoNot to mention that, with the help of appdaemon[0], you can write Python code to implement all the logic you can dream of. I found this much more powerful than the base GUI, and much more expressive (and less clunky) than Nodered or the yaml automations. [0]: https://appdaemon.readthedocs.io/en/latest/ https://appdaemon.readthedocs.io/en/latest/
- joshu 5y agoDo I really need to do Home Assistant Operating System? It stresses me out that this is not just some packages I can install.
- sam345 5y agoNo. Install Raspbian light, docker, docker compose, and HA docker container. Use an SSD drive for boot and official pi ac power.
- joshu 5y agoi have a NUC i plan to dedicate. i seem to recall that there were some features missing from the installs that were not managed (or whatever the Whole OS thing was called?