3 ms·
I've been doing a bunch of home automation work recently. Here are some observations I've made: 1. Most extant home automation software is totally unreliable g
by wyager 5y ago
I've been doing a bunch of home automation work recently. Here are some observations I've made:
1. Most extant home automation software is totally unreliable garbage. Buggy, slow, poorly designed. You want to reduce the amount of code you pull in as much as possible.
2. Raspberry pis are totally unreliable garbage. The hardware is just bad. There's no way to make them reliably operate for long periods of time without crashing, and there's no way to make them automatically recover from a crash (because the watchdog timer, or its driver, in the crappy broadcom chips they use is broken).
3. Most of this home automation software is optimized for users who don't know how to code at all, and is extremely poorly optimized for people who can write basic scripts or whatever.
4. Most of the radio protocols for wireless IoT devices are totally unreliable garbage.
After messing around with this on and off for a few years, the best setup I've found is:
1. Use a normal computer or server, not a raspberry pi. It doesn't need to be expensive or anything; just use a decent machine with an x86 processor. There are tons of great industrial PCs for cheap on ebay.
2. Use some kind of containerization setup for separating components. I strongly recommend using jails on FreeBSD, since you can treat jails as physically separate machines for networking/firewalling purposes (using vnets).
3. Make liberal use of VLANs to isolate IoT things from the internet and from each other.
4. Don't use any IoT devices that operate over WiFi. Ethernet is great, and dedicated wireless protocols (zigbee, z-wave, etc.) can be OK with a bunch of work.
5. If you want non-trivial automations, don't try to use some existing "user-friendly" or "low-code" or whatever home automation software. Just write a normal computer program that does the automations.
The specific stack I have for most of my automations in my current house is zigbee2mqtt running in one jail (this is by far the most problematic component), mosquitto running in another, and then my program which does the automations running in a third. My program can also do things like send me push messages via pushover.
I've managed to get a seemingly stable zigbee network with a not-totally-trivial number of devices (around 25 now) by using CC2652 radios and plenty of zigbee routers, and also turning off all lightbulbs before adding more devices to the network.
It's a shit show, and I can't really recommend getting into it right now unless you want to spend a bunch of time doing sysadmin tasks, or you only want very simple automations (in which case maybe use HomeKit or something).
- rcarmo 5y agoI would like to challenge that assertion that Pis are garbage. If you use a recent hardware revision you should not have any issues, mine have outlasted the ODROID I had running homebridge for a few years off an EMMC. Also, I git push my automation services to a server using https://github.com/piku https://github.com/piku, which isolates them in (simple) sandboxes. Zero issues for a long time now, and with Docker pull restrictions coming up soon, I can certainly put up with npm taking a while to update Node-RED...
- zrail 5y agoI agree with all of your recommendations. I use Home Assistant running in a VM on a normal machine as a sensor fusion platform and for dashboards. Every non-trivial thing is then an AppDaemon[1] app running in a separate VM on the same machine. I have zwave devices rather than zignee so I use zwavejs2mqtt on raspberry pi's in various locations around the house (soon to be replaced with tiny Atom machines).
- rmi0 5y agoI'm sorry but this is just BS. Raspberry Pi are not garbage. With good software, and by that I don't mean barely tested Java or Nodejs HomeKit wannabe services, Pis are rock solid. I'm into SDR (software defined radio.) I have written software which processes 8MB of samples per second, and runs for months without reboot. It means 90-100% CPU load, 100% of the time. Oh, and the same Pi also hosts AirPlay server and manages ~10 Arduino devices in spare cycles. Bad software can make any device useless.
- wyager 5y ago> With good software... Pis are rock solid. The hardware is crap. The broadcom chips they use are cheap pieces of crap. The watchdog timer doesn't work. They have a tendency to corrupt microsd cards. Power filtering is bad. Remember this? https://www.theverge.com/2015/2/10/8010457/raspberry-pi-2-crash-camera-flash https://www.theverge.com/2015/2/10/8010457/raspberry-pi-2-cr... There have been any number of issues, over and over again. Maybe they've improved some in the last couple of years but my time is too valuable to continue to waste dealing with these pieces of junk. > Bad software can make any device useless. Good software can't turn garbage into gold.