Live data from Hacker News

Run Your Home on a Raspberry Pi

pragprog.com

31–40 of 276 posts

Re: Run Your Home on a Raspberry Pi

#31

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…

Does 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?

IME: 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.

Re: Run Your Home on a Raspberry Pi

#32
post #11
post #7

I have to ask others, have people had good luck with this? I have tried to do this multiple times, with multiple models of Pi and every time after 6ish months it just seems to completely stop working. I can't get it to boot even off of a new sd card. Am I doing something wrong or does the hardware really not want to be run consistently in this manner? I have since decided to just run some home automation VM's on my m…

Have had the same problems, though it's always the Pi chewing up the SD card, a new card solves it. These guides really need a warning saying "If you find this useful, switch to using a server that doesn't rely on an SD card after ~6 months" The Pi is fantastic for getting a taste of self-hosting / home automation as it's so cheap but by no means should it be relied on. I moved our Home Assistant install to a docker…

I have my PI running off a USB-SSD instead. It works very well, though initial set up can be a bit of a hassle.

Re: Run Your Home on a Raspberry Pi

#33

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…

Does 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?

For 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-assista...

Re: Run Your Home on a Raspberry Pi

#35
post #7

I have to ask others, have people had good luck with this? I have tried to do this multiple times, with multiple models of Pi and every time after 6ish months it just seems to completely stop working. I can't get it to boot even off of a new sd card. Am I doing something wrong or does the hardware really not want to be run consistently in this manner? I have since decided to just run some home automation VM's on my m…

It might be the Pi wearing out the SD card. The Raspberry Pi Compute Module 4 [1] actually has a PCIe Gen 2 x1 socket.

Jeff Geerling (who's active on HN) has actually gotten SATA working [2] through the Compute Module 4 and the Compute Module 4 IO Board [3].

If you go his route you could potentially set up a Pi with more durable storage. Although, if you watch Jeff's video its a PITA getting SATA working as he had to recompile the kernel with SATA support. Also its pretty hard to get the Compute Module 4 and the IO board at the moment.

[1]: https://www.raspberrypi.com/products/compute-module-4-io-boa...

[2]: https://www.youtube.com/watch?v=ZSx1BRwz1bs

[3]: https://www.raspberrypi.com/products/compute-module-4/

Re: Run Your Home on a Raspberry Pi

#36
post #27

Earlier quoted context omitted.

How 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.

I 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 ov…

>> 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.

Re: Run Your Home on a Raspberry Pi

#37
post #27

Earlier quoted context omitted.

How 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.

I 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 ov…

> 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.

Wow, the future is truly here folks!

Re: Run Your Home on a Raspberry Pi

#38

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…

Same. 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.

Re: Run Your Home on a Raspberry Pi

#39
I still have this dream that some day everyone will have a little stack of SBCs running home services from tracking energy use to running pinhole to running persistent game servers (eg, Minecraft).

Every year you pop out the oldest one and pop in a newer one and speed the whole thing up.

Re: Run Your Home on a Raspberry Pi

#40

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…

How 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.

if you flash openwrt/ddwrt to your router, you can create an isolated subnet with its own DHCP server and enter your own firewall rules (iptables) blocking all traffic from your local subnet to your IOT subnet. You can then bind that to a wifi ssid (the guest one). Its kind of a PITA to setup, but it works great once you get it. Netgear Nighthawk routers have worked great for me in the past.

Don't forget to set up a reverse proxy with ssl and automatic cert renewsl, even in your home network. Wifi can be hacked with trivial ease. Caddy or nginx/certbot will do you well there. If you also run a pi-hole you can have the pi on your local network pass ssl checks by overriding some DNS entries.

Post reply on HN