Using a Lenovo USFF PC as a Home Assistant box
Continuing the theme of a smart home, I wanted to talk about my Home Assistant setup.
During the Christmas break, when time does not exist and boredom is common, I was browsing the website of a company that sells cheap post-lease computer parts. What got my attention was the sale of a Lenovo Ultra Small Form Factor (USFF) PC with the price of 120 PLN. That is around 30 eur, and around half the price of a Raspberry Pi 4b here. So I yolo’ed and bought it right away. A week later it arrived.
The full model name is Lenovo M625q. And it is indeed very smol. The closest thing I can compare it to would be a Playstation 1 (yes, I am old), and it’s still around half its size. The full specs are:
- AMD E@-9000e CPU 2C2T @ 1.5GHz, 6W (!) TDP
- 4GB of RAM in a single DDR4 SDIMM stick
- 32GB M2 SSD
- lots of I/O, USB, Display Port, audio
The RAM and SSD can be upgraded, the maximum RAM size it can handle is 16GB.
As for power and cooling, it uses an external PSU, and the cooling is fully passive, almost the whole motherboard is covered by a single large heatsink, which needs to be removed to access RAM and the SSD.
I was concerned that having just two slow cores on the CPU would be an issue, but for running just for a few services in a headless mode, I did not see any performance problems.
Lenovo M625q living under my book rack, with a Sonoff Zigbee dongle, and an external 2.5” drive.
Software
The PC came without an OS, so the first thing I did was to install Debian on it. The installation went without issues, I did not install any Desktop Environment as I am using it only in a headless mode. Next I installed the typical monitoring stack, Prometheus and Node Exporter, in order to have basic stats like temperature in my Grafana dashboard. Finally I went with installing Home Assistant.
Home Assistant provides several ways to be installed, the recommended one is to install the Home Assistant Operating System. I did not go this way, as I prefer to have a basic OS, and then go from it, installing the things I need. I also was not sure how much access and possibility to modify stuff I would have when running a custom OS. While running HA is the main aim of this PC, I also want to be able to install other stuff on it, like the just mentioned Prometheus, or Tailscale, or do NFS shares.
The HA installation as a service is called Home Assistant Supervised, and the installation process requires some knowledge of the Linux command line. Here is the full documentation on how to do it.
With HA being installed, I also installed Caddy to have a reverse proxy, so that I don’t need to provide the port number when accessing the HA web UI.
The Caddy reverse proxy config is super simple:
http://ha.local {
reverse_proxy :8123
}
BTW, I have a full post on using Caddy as a reverse proxy in a homelab.
Home Assistant integrations
First thing I did after the initial setup of HA, was to add all my ESPHome temperature/humidity/pressure sensors , which now I have three, each for one room in my flat. HA found and pair them right away, and what was left for me was to assign them to the Zones (bedroom, office, living room).
Next thing was adding the TUYA integration for my single TUYA WiFi smart light bulb. Also no issues, I had to find the TUYA integration in the integration list, and put the light bulb into pairing mode.
put the light bulb into pairing mode
Imagine saying such words to a person twenty years ago.
With that out of the way, came the big part: Zigbee. Zigbee is my new craze, I am still amazed how cheap and low power its devices can be, and as it is using its own protocol, Zigbee does not clutter WiFi. As I said in my previous post about smart sockets , for Zigbee you need a gateway, usually in the form a Zigbee USB dongle. I bought one and plugged into one of the oh-so-many USB ports on the Lenovo box.
Configuring ZHA (Zigbee Home Integration) was also a breeze. In overall I am amazed how simple the whole process is, things just work.
I also reused my IKEA Tradfri lightbulbs that I used to connect to a TRADFRI gateway, the old one looking like a white hockey puck. My wife is now happy that she turn off the bedroom floor lamp from her bed :)
I don’t have any automations set up yet, but once I get more Zigbee devices, I might start writing them. Maybe moving a detached house will be an inspiration to make some.
My HA overview dashboard. It’s in Polish but I’m sure you can guess what it what.
To sum up, I now have a dedicated Home Assistant box, that uses barely any power, is small enough to sit under a bottom shelf of my book rack, is completely silent, and can handle any number of external devices and sensors. I do not know yet its power usage, but I would say its irrelevant.
Lenovo USFF vs Raspberry Pi
Now let’s talk about the elephant pie in the room. Please don’t make pies from elephants.
What about a Rapsberry Pi? This question is even more relevant today, as the Pi 5 16GB was just released, so the Lenovo USFF and the Pi could be equal in terms of memory.
I could have used a Raspberry Pi for this. But I did not. I believe using a Pi for this specific usecase does not make sense. Of course Pis are great little devices, and they have their usecases, but this is not one of them.
Pis are perfect when you are really constrained in space and power. A great feature of a Pi, often overlooked, is that it can be put in a very remote place, on the roof, in the shed, and powered from a distance using Power over Ethernet. Or even a battery and a solar panel. A Pi has GPIOs to plug small sensors directly. And a Pi is a standard. When you buy a Pi, you have the exact same device as tens of thousands of other people, and when you ask a question on social media, you know that there will be people having the exact same experience/problem as you. Pis are also great when you want to make a small cluster of devices, as the one that I have.
But for general computing, just running stuff in a typical flat, close to a power socket? Those Lenovo USFF simply win the comparison. There are much cheaper (again, 30EUR! A Pi 5 16GB is 130EUR, and that is without the case and the power adapter!), and have expandable storage and RAM. And they are x86, not ARM. With the proliferation of ARM-capable software and Docker containers, that is becoming less of an issue, but there is still software that will just not run on an ARM device.
So, what do I choose? Both! There will always be cases where I prefer to use a Pi, and in other ones such tiny PCs will be the way to go.
And that for now wraps the theme of my home becoming smart (in contrast to myself).
Thanks for reading!
If you enjoyed this post, please consider helping me make new projects by supporting me on the following crowdfunding sites: