Hacker News new | past | comments | ask | show | jobs | submit login
Run your home on a Raspberry Pi (changelog.com)
76 points by mateusfreira on May 15, 2022 | hide | past | favorite | 85 comments



I'm planning to buy a house and making it "smart". Does anyone know any resource that can guide me?

Something like garage door that opens with a tap on my phone, music that follows me room to room, door camera that can be viewed from TV ("alt-tab" while watching Netflix), lights controlled by voice, smart mirrors.

Can be a blog, a forum, or a book, but it should be holistic—I don't want it to end up like a Goldberg machine.


God, don't use Homeassistant if you actually value your time. I've ranted and raved here on HN about it before. It's a hobby project where the devs only care about using the latest and greatest methods and tools for the sake of padding their resumes. They will often re-write things for no reason, release things into the UI as placeholders, and don't care how many end user installs break. You will spend massive amounts of time keeping up. Case in point - they removed Python 3.7 support in late 2020. 3.7 is not EoL until mid 2023, and was the default version in Buster, the Raspbian release at the time. We all had "fun" compiling Python from source.

Just get a Hubitat and be done with it.


They're also hostile to distributions packaging them: https://news.ycombinator.com/item?id=27505277


Holy crap! Home Assistant is such an interesting project, and I was seriously considering it for the home I'm relocating in probably this summer, but that thread almost makes me want to avoid it straight.


Thank you, I completely missed that. I am not surprised at that attitude given how badly run of a project HA is.


I agree about all HA critics BUT what can you suggest? OpenHub is even worse, behind HA I can't find anything with a ready-made WebUI and ModBUS/MQTT pre-coocked support...

I use it since a bit more than an Year, pip-installed and kept updated on my homeserver, for p.v. (Victron + Fronius + Giavazzi + ... all ModBUS/tcp or MQTT), it's config is obscene YAML, but with org-mode (org-babel + noweb) is manageable, logging is obscene but work OOB enough, automation is obscene but work enough, if logic is not much complex it's doable, the WebUI is nice...

I know I can write something myself, Mosquitto is FLOSS, ModBUS FLOSS libs are there for various languages, but that's not so nice for a simple domestic use case like just seeing how a small p.v. plant works, control the VMC/heat pump and hot water...

Just to play with sensors and crappy wireless switches is even LESS motivating...

IME IoT is crap in general, mostly because too many have no use-case for it so it's sold just to play, not to seriously use and profit from it, also because it's mostly designed by electronic engineers not IT techies, and we all know how ee are bad software side, many other reasons but well... HA so far for me was/is the leas worse pre-made/almost ready to deploy stuff I found. Surely I do not care at all at their suggested deploy with docker, HA cloud etc, just plain pip, but nothing have stopped me so far...


Sounds like Home Assistant is aggressive about keeping up to date. That’s a good thing!


Breaking user installs is not aggressively keeping up to date. Have a blank map in the UI that didn’t work for years is not aggressively keeping up to date. Rearchitecting major components three times in five years is not aggressively keeping up to date. Creating, recommending, then removing an install method all within about 3 years is not aggressively keeping up to date. Having four different ways to configure things is not aggressively keeping up to date.

It’s having no discipline nor foresight and instead throwing shit against the wall to see what sticks.


I bought a "conbee" (basically a USB Zigbee dongle) and after setting up their DeConz software and detecting all my devices (IKEA, Philips, Lidl) I never bothered with Home assistant. Or should I say, I started to, but gave up because it was a pain in the neck and anything it offered beyond what DeConz did, wasn't worth the hassle. I always meant to go back and have another go, but over a year later I simply don't have the motivation.


Were you doing a supervisor install or something? I didn't even notice the python upgrade. I do occasionally get some breakage when I upgrade versions, but it hasn't been very often that I would even consider using something else.


Venv on core. Yes it’s the “expert” install. Yes Docker would be easier. However you can’t guarantee Docker will be supported in the future. They created then dropped Hassbian like a hot potato. In fact there are already signs Docker is falling out of grace in favor of HassOS.


That is specifically called out by the ha team as an unsupported and not recommended type of install. So I think it's a bit of bad form to be complaining that your specific unsupported install isn't well supported (and on a free software, even worse).


It's everywhere in their documentation.

https://www.home-assistant.io/installation/ https://www.home-assistant.io/installation/raspberrypi#insta...

It's not "unsupported" if they tell you how to do it. In other forums, devs have also promised that core will "always" be an option.

It was also the only installation method just a few years ago. Then they experimented with Hassbian/HassOS/Docker, etc. Shit, I remember they had a VDI option less than two years ago. That was FIVE simultaneous installation methods they supported. They shouldn't have let it get that bad to begin with, and pruning just goes to my original point that they keep changing things because they never have any discipline in the project.


I just turn off automatic updates and look at change logs to see if it's worth it to upgrade. I also primarily use HA as dashboard and sensor fusion, it only runs a couple automations directly.

Is Hubitat actually better?


Hubitat’s UI looks like it came from the early 2000s. There’s a small learning curve to get used to its philosophy, but it’s pretty consistent. Once you get it, it’s stupidly easy.

I mean for your case, as a dashboard, HA might be better because the Hubitat UI is pretty ugly.


> Just get a Hubitat and be done with it.

Am I right in concluding this appears to be another closed-source brick which is likely to implode in a few years, as they always do?


I have used Hubitat to control lighting, shades, and locks in my home since 2018. There is no reliance on outside services or an internet connection. If the company ceases to exist my device will continue to work at least as good as it currently works today. However, there are many third party drivers written so it is conceivable development could even continue.

You CAN interface with other outside services if that's your jam, but at that point relying on Hubitat continuing to exist is no different than relying on those other services to exist.


No because there’s no reliance on a cloud service. There’s cloud features, but there’s alternatives and workarounds that they don’t (can’t, really) block and even suggest if you don’t want to pay.



For those already in Apple’s walled garden, I’d also recommend:

https://old.reddit.com/r/HomeKit/

https://old.reddit.com/r/homebridge/


I've been using Homebridge and I'm currently in the process of switching over to Home Assistant. Homebridge has been very useful for what it does, but it's also very limited. I haven't fully committed to it yet but it's already looking like Home Assistant can replace 100% of what I'm using Homebridge for while offering a lot more options.

At this point I would recommend starting with Home Assistant instead of Homebridge even if you just care about HomeKit support.


Mind if I ask what made you decide to switch? I spun up a Homebridge instance as a stop-gap to get a few smart devices into HomeKit with the assumption that I would need to graduate to HomeAssistant down the road, but I haven't yet run into any automations I couldn't accomplish with a Homebridge plugin.

That said, I agree with you. If someone is starting from scratch, HomeAssistant is likely a better long-term solution, albeit a bit more daunting to set up initially.


My initial motivation is twofold:

1. I'm trying to add some better automation than what HomeKit directly supports. I've been experimenting with Node-RED, but having Node-RED talk to Homebridge is terrible. I don't know how much of this problem is on Node-RED's side versus on Homebridge's, but Node-RED keeps losing a bunch of my Homebridge devices randomly and getting them back later, meaning my automations are flaky. Also Node-RED itself just bothers me, it makes a bunch of odd choices, especially around how to deal with persisting values across events, the inability to have multiple projects running at the same time, the inability to hide nodes in a subflow without simultaneously turning that subflow into basically a reusable template that shows up in the sidebar, etc.

2. My wife is really interested in trying out Home Assistant for its dashboard capabilities. She wants to stick an iPad on the wall as a permanent home automation interface, but every app for HomeKit that we've looked at has various problems and none of them are sufficiently customizable. She kept seeing people talk about using Home Assistant for this specifically as it has very customizable mobile-friendly dashboards.

After digging in to it, I would agree that Home Assistant is a bit more daunting to set up, although they're pushing more and more into "configure everything through the UI" and so there's less of a need to go editing YAML¹. Home Assistant also has autodiscovery of a lot of local devices which is neat. Not everything is perfect though. I am trying to figure out right now how to expose my Lutron Caseta pico remotes to HomeKit via Home Assistant² and I may end up just skipping that and just exposing separate MQTT device triggers if I need to ask HomeKit to do something.

As it is, at this point I would say that just doing an initial setup for "I want to expose stuff to HomeKit" is actually pretty easy if you don't care about the rest of Home Assistant functionality. Just run Home Assistant, add the HomeKit integration, add integrations for the devices you care about, and then configure the HomeKit integration to make sure it's exposing what you want (it should expose most of the right stuff by default though). Then you can ignore dashboards and automations and everything else. Officially-supported Home Assistant installs also have access to something called HACS which is basically a frontend for installing custom 3rd-party components³, so most custom stuff is indexed there already.

¹I'm actually running this via NixOS right now and trying to put everything into YAML that I can to preserve as much of declarative configuration as I can, but I may give up on that given how many integrations simply don't even support configuring in YAML anymore. If you are setting it up from scratch it's probably best to go through the officially-supported install methods, such as running the Home Assistant OS in a VM or in Docker.

²I've got it done through Homebridge already but I want to retire that. Home Assistant has a built-in Lutron Caseta integration, and a built-in HomeKit integration, but if I ask HomeKit to expose my 4-button pico remote then HomeKit sees an 8-button stateless programmable switch where the first 4 buttons are triggered on "press" and the next 4 are triggered on "release". There appears to be a 3rd-party custom "Lutron Pro" integration with a fork available on the community forums that adds double-press and long-press support to its exposed remotes, but I haven't decided to actually go with that yet as I don't really want multiple Lutron Caseta integrations running (and the built-in one can expose motion sensors as it uses the undocumented LEAP protocol whereas the custom one can't). At this point I'm thinking of piping my pico remote events through MQTT because the HomeKit integration requires a device trigger for stateless programmable switches and I don't see any way to make a custom device trigger without either MQTT or writing an entire custom component from scratch.

³I don't have this myself as it's only available on officially-supported installs, of which NixOS is not one, but people referencing it in the forums makes it sound like it's really convenient.


Appreciate the detailed response.

Given your use case the switch definitely makes sense. I wasn’t even aware node-red could interface with HomeBridge.

It sounds like HomeAssistant has made some significant quality of life improvements since I gave it a test drive. I’ll give it a second look.

And you’re lucky your wife shares your interest in home automation! “I saw this cool wall mounted HomeAssistant dashboard…” isn’t something I can imagine my wife saying, haha.


> I wasn’t even aware node-red could interface with HomeBridge.

It's actually kind of horrifying. There's a Node-RED module that uses the hap-node-client library, which is designed to talk to the hap-nodejs library that powers Homebridge. Which means Node-RED ends up talking the HomeKit Accessory Protocol to Homebridge as though it were HomeKit itself.


Is this the plot to a dystopian novel?


Troy Hunt did a short series on using Home Assistant

https://www.troyhunt.com/iot-unravelled-part-1-its-a-mess-bu...


> The learning curve is steep, it has a bunch of rough edges (it's still not reached a v1 as of the time of writing), you end up living in YAML and by any reasonable measure, it's only usable by geeks who are happy living in a world unfamiliar to most mere mortals.

FWIW this isn't true anymore. Most stuff is configured through the UI now (there's even a bunch of integrations that don't even support YAML configuration, just UI configuration). There's still a learning curve to be sure, and there's still functionality that does require editing YAML to handle, but my impression with setting it up now is that it's actually pretty easy to get off and running with just the UI.


Tons of great general suggestions here. But I want to chime in for the Tailwind garage door opener. It's very obviously built by engineers and for engineers. Install is harder than other options, but rock solid, zero maintenance unlike others and it can do automatic garage door opening and closing totally self contained by detecting your phone + car Bluetooth. I was absolutely blown away by it compared to the MyQ which is usually touted as the best and is so locked down because they signed a deal with Amazon as to be totally useless.


I personally know a high-end residential architect (who has worked on several billionaire FAANG homes) if you would like their contact (There are several high-end architecture companies that focus specifically on home tech (yeah, but to a level that one isn't typically familiar with)


Home Assistant as your main controller. Then just make sure it get devices that work over local standards like Zigbee or Zwave and not proprietary protocols.


Just wait for the brain chips.


Even better: buy an old office desktop from about 10 years ago, upgrade the ram and storage (if you feel like it) and install Proxmox. Now you can run as many servers as you want, faster, probably cheaper, and with much less hardware.


It would be worth measuring the power usage/efficiency. I run a home server that runs quite a few things on it and the power usage is around 225 watts at idle. At my electric rates, that amounts to around $45/month in electricity alone.

225 watts is a bit high for most small servers, but mine seems to be rather high due to the fact that I have about 18 SATA HDDs connected to it for file server capabilities.

A Raspberry Pi 4 consumes around 5 watts running at full bore, 2-3W at idle. Of course, it also couldn't handle what I am doing or I would use it.

In fact, my Home Assistant is running on a small mini-itx Intel celeron box dedicated to that because the PI was a bit too slow for my needs. But I run quite a bit of automation stuff on my Home Assistant instance. It draws around 25 watts at idle.


Pre-pandemic, I picked up a fanless NUC style computer for ~$200. Takes a SSD and runs under 15 watts. I do not know if that pricing is still attainable today, but is my recommendation for someone looking for a tiny home server.


Quieter and better power efficiency too?


Probably better power use than a bunch of PIs, but no, not than one or two, and not quieter. The one I bought is basically silent, though, with the stock cooler. Just hard to compete with fanless.


I thought RPis were extremely power efficient. Is that wrong?


They only draw about 5 watts under heavy usage, 2-3w at idle. Though I'm not sure how that compares on a watt per CPU cycle comparison.


Sometimes it's not about power efficiency, but repurposing hardware you already have instead of buying new.


This is exactly what I did. I have an HP EliteDesk 800 G3 Mini sitting on a shelf in my basement running HomeAssistant and a stack of other software that the technology in my house more or less relies on.


I did this too and it's nice.

I have a vm for macos. I have containers for git, dav, nextcloud, etc.

only thing I would love is something like docker to build containers from one dockerfile.


I went halfway to creating a VM for MacOS, but apparently if you sign in to anything in that state, you can get your account closed. :/

Could be great as a test/dev box though.

EDIT: Just run Portainer in an unprivileged LXC container. That's what I do. Isolation, native performance, plus a point-and click web manager for Docker containers. It's absolutely delightful!


What can you do with Proxmox that you can't do with `kubectl apply -f blah-pod.yaml` or whatever?


Proxmox supports virtual machines and is a web-based frontend to KVM/QEMU.

Kubernetes is a scheduler for containerized workloads.


Kubernetes can have a web-based frontend and the pods it can run are similar to virtual machines, no?


I was one of those guys that hosted nearly everything on a bunch of Pis. While it was fun initially, I eventually got frustrated. Yeah, self-hosting stuff is fun'n games. But sadly things do break, SD cards fail, hardware dies and backups do not work.

Personally, I am only hosting a few important services locally. These services are one hundred percent automated and can be deployed in minutes. For everything else I pay someone else to host it or I got rid of it entirely.

That does not mean that it isn't a great hobby. I just found myself investing may too much time for a small benefit. Also, I think that I did not learn anything new by preparing the sixth Pi or running some Playbook/Dockerfile/Installer that someone else has written


In my experience on a pi - SD cards don't fail, they get corrupted.

one solution is to use an OS that isn't constantly writing to the SD card, like openwrt. I have a pi running openwrt and it is rock solid. The filesystem only gets written in very specific cases, for example there are no logs writing to the sd card continuously.

Another solution is to set up an overlay filesystem for raspbian

And you could use a USB drive like a samsung fit instead - that has been very solid for me.


In my experience, i have only had 1 corrupted SD card yet - after running about 5 Pis any given time for a few years now, starting with a 2b iirc...

Running HA, Pi-Hole, OpenVPN, solaranzeige.de, piVCCU, piCorePlayer, BirdNET-Pi, OctoPi/Klipper (2x), Pi1541 etc...

No. single. failure. yet.

The corrupted SD card had me baffled for a while as randomly some binaries would get corrupted (like php, which would throw random errors, files of a Grafana install would end up in lost+found) - the cause?

Me, using a spare Apple iPhone charger (1A) to power the Pi - haven't had an adequate power supply around at that time..

As a rule, i use 5V PS with at least 2.5A with the Pis and (almost) never had issues like the Raspys complaining with that rainbow colored box (or "vcgencmd get_throttled")...

So, yes, getting a good power supply (well, one that can supply 2.5A++ - if these are really good (as in "noise free") is another matter, which i've discovered with my BirdNET-Pi now) is key for the longevity of your SD card!


> SD cards fail

I came here to say the same thing. I'm in the process of migrating to an SSD because I've had two SD failures. I picked up a Samsung 850 250GB for $25 on eBay and need to buy a USB cable for ~$25. So it's a little more expensive than just buying an SD card, but comparable to buying a few SD cards!


> need to buy a USB cable

Hmm...

Replacing the perils of an SD card with the perils of relying on a USB cable connection ?

Anybody who's been in IT long enough will know inadvertent USB disconnects happen.


A Raspberry Pi sitting cupboard silently chugging along has a high chance of SD failure, but little chance of inadvertant disconnects. That's a fine tradeoff I'd say.


I have a few Pi's like that. I've literally zip-tied the drive onto the Pi's case.


I agree. Setting them up in your spare time is fun. But they tend to break out with your spare time. Even so with the non-self hosted stuff.


For me a RPi lasts about a year on average, while an SD card lasts about a month.


SD cards definitely fail but USB ssd is rock solid from personal experience.


The only issue now is, where the fuck can you buy a raspberrypi now?!


A sizable percentage of all of the Pi devices made likely are sitting unused in boxes in closets around the world. The resale value isn't high enough to motivate many people to go find them and sell them to those who would put them into productive use.


https://rpilocator.com/ (there are twitter and telegram bots to provide alerts)

I managed to get one from Adafruit last week. They restock ~weekly, typically Wednesdays, and sell out within a few minutes of the notification going out.


I don't get how they can sell out so quickly. Why won't stores simply raise the price in order to reach parity between supply and demand?


The official suppliers are required to sell at MSRP. People buy and then resell at higher prices so you can usually find them on amazon and eBay for double or more the MSRP.


... because they're not douchebags?


Supply and demand balancing doesn't make you a douchebag.


Because the Raspberry Pi Foundation typically negotiates agreements with its resellers stating that they won't sell above MSRP.


Good alternative is getting used Chromeboxes or Intel NUCs on eBay for $30-ish each.


Yeah and even an outdated atom box with a decent SSD way outperforms a pi when running something like Home Assistant. While using about the same power (5W or so).

It's a much better option if you don't need the GPIOs that the pi offers (I do so I do use one, but with an SSD over USB)


What are good models to search for? I think my rpi or SD card just bit the dust, so looking for a new mini home server.


Take a look at https://mrchromebox.tech, particularly the "Supported Devices" page for models that can be upgraded to a firmware allowing the install of other OSes. Chromeboxes and Chromebooks by default prevent the user from installing and running anything except ChromeOS, which is a lot less powerful than Linux and others, but thankfully that limitation can be worked around. I've repurposed a good number of them, mainly Asus and HP ones, by following the instructions at that site, and never encountered any problems.

I also have all my Raspberries collecting dust after I swapped the last working one running Kodi with a Asus CN62 Chromebox: the performance difference is huge.


It depends also on whether you need a real name brand Raspberry Pi or whether you can use any equivalent computer. For instance, pine64 makes significantly nicer hardware in the same price range and is actually in stock.


I'd pay Pine64 50% markup if they'd just deliver to my damn country.

Every now and them, I check their store, just itching to buys stuff and build on top, but no delivery for me.

Any other similarly supported/open alternatives you'd recommend?



I bought a raspberry pi 4 in Canada from pishop.ca a few weeks ago


I was surprised to find pi's are going for > $100 on amazon.

I think the nuc-like boxes might be competitive, but I wonder if they aren't inflated too.


ebay?


It's probably been mentioned before, but if you want something that is:

* A fair bit more grunty than a Pi

* Fairly power efficient

* x86

* More of a standard computer

You should consider picking up what Servethehome has coined the TinyMiniMicro nodes. They're the kind of computers you typically find strapped to the back of a monitor in a doctors office and usually are fairly power efficient machines. I, for example, have a Lenovo m710q - which has an Intel 6500t (a quad core CPU), 16gb of ram, and a 512GB SSD, which I paid around 200USD for, that is significantly easier to manage than a Pi (since it's 'just' a computer) and sucks back around 10w of power at idle (which is roughly triple a Single Pi 4) - but still in the realm of negligible. It actually replaced a Pi 4 for my self hosted home stuff, and it was a fantastic choice that I do not regret.

Lots of this type of computer are available in all sorts of configurations, and the more 'standard' nature of the machine opens up a lot of possibilities the Pi either makes more difficult, or impossible. For example, my node hosts a bunch of services for me, but it also acts as a Steam In Home Streaming machine that I have connected to my living room television, which allows me to stream games from my desktop to the TV fairly effortlessly.


How about things like old Macbooks?


Why not! I'm not particularly familiar with Macbooks personally, but If it can run what you need it to run, then it's an absolutely fine use for one! I'd consider removing the battery and running without it for safety reasons, but I'm not certain if you can do that with Macbooks - and besides, a laptop with a battery installed could be considered a home server with a UPS :P

The only more specific advice I have is to stick to stuff 7th Generation or newer on the Intel side if you plan on a media center use case, since 7th Gen intel stuff is when they introduced x265 hardware accelerated decoding/encoding into the GPU found on those CPUs, which is a great help. I love repurposing EOL hardware for this kind of use case, since it's imo a better solution than buying yet more electronics, and it also saves something from the e-waste trash heap.


Thanks for sharing the show! We’re working on a transcript, which should be posted in a day or two.

You can get notified of when it posts here: https://changelog.com/podcast/489#transcript


The one thing I don't really get is why, pi's everywhere? Most of the times an esp32 will be more than enough for a few sensors. No need to be running a full OS and the added benefit they are actually available right now to buy.


Ive encountered this sentiment a lot from my hardware engineering friends, I dont know if its a side effect of the job or something, but they tend to value the sort of "efficiency of exactly the right chip / protocol / whatever" over the "versatility / community / perceived technical quality " around the same. Sort of like a callback to Betamax VS VHS.

- Hydrogen fuel cells are a better technology than batteries - Zigbee is a better wireless protocol than wifi - you dont need a RPi, an ATTiny and some transistors would work fine

sure, but wifi is being improved for tons of use cases and Zigbee only really has the one use case just now, getting started writing code for x86 with a full OS is much simpler than for a microcontroller etc etc

ultimately the network effect / whatever kick in and the popular stuff usually ends up winning IMHO


Pi is standard, extremely well supported, has GPIO and most people are familiar with running a container and gluing python compared to writing C (I know about micropython, but Joe PythonLearner doesn't).


Does anyone have any experience with https://www.indigodomo.com/ ?

I've always had it bookmarked, but never had the time to think about it or to do anything more than a random Pi for homebridge for a few Z-wave switches I have.


My home is made out of drywall. Hasn't crashed yet.


Tbh the only thing Im waiting for to make a move on smart-home thingy is.. a good voice assistant.

Alexa, Siri etc just dont cut it and are not private assistants.

I want Jarvis for personal use.


It's possible to make one for yourself using Python.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: