Click the blue text to follow us
This article is part of the “Hansi Bian” forum series, authored by riceball. Thanks to him!
Continuing from the last issue: Avoiding Pitfalls in HA Smart Hardware Procurement (Part Three) Bluetooth Edition
(Four) HA Box or PC
Comparison between the two:
-
PC performance far exceeds that of the box: CPU frequency is high (at least 2G or more), multiple cores (8-16 Cores), sufficient memory (16-64G), and large hard disk.
-
The power consumption of a PC is also much higher than that of a box, which has low power consumption.
Therefore, if power consumption and hard disk wear are not a concern, and you can keep it running 24 hours a day (cannot go offline), then go for the PC.
As for me, my home NAS is no longer running 24 hours a day, but is powered on as needed. I also don’t want my home PC to be on 24 hours a day, so I need a box as the smart hub.
HA Box
Requirements for HA Box:
-
If HA is to run in Docker, then the number of CPU cores cannot be less; unless only running HA Core, then a single core is acceptable, otherwise 4 cores are recommended, with a frequency not lower than 1GHz.
-
If HA is to connect to cameras, it is best to support H.264 hardware decoding.
-
To store more historical data from sensors, it must support USB3.0 interfaces or TF card slots for easy storage expansion, and choose a reliable power supply of at least 3A to drive the external hard disk.
-
If you want to further support offline AI face recognition, AI voice recognition, and AI TTS, it is best to have an NPU (Neural Processing Unit) chip.
HA Box selection and comparison:
There’s not much to say about PCs, but there are many options for boxes. Boxes I have purchased: as set-top boxes, routers, hard disk boxes…:
-
CubieTruck Box: Allwinner A20 (dual-core) 1Ghz, 2GiB DDR3 480MHz, 8G NAND (supports built-in 2.5 hard disk)
-
NanoPC T4 Box: RK3399, memory dual-channel 4GB LPDDR3-1866, 16GB eMMC 5.1 Flash, Bluetooth 4.1 dual-band Wi-Fi Bluetooth module, 2×2 MIMO, 2xUSB3.0 (1xTypeC), 2xUsb2.0, 1xPcieX4 (M.2 M-Key), 40PinGPIO, microSD (TF card) slot
RK3399,CPU: Dual Cortex-A72 large cores (up to 2.0GHz) + four Cortex-A53 small cores (up to 1.5GHz);GPU:Mali-T864 GPU (4 cores 900MHz), supports OpenGL ES1.1/2.0/3.0/3.1, OpenCL, DX11, supports AFBC (frame buffer compression);VPU: Supports 4K VP9 and 4K 10bits H265/H264 video decoding, up to 60fps, dual VOP display and other video encoding and decoding functions
-
NanoPi R4S: RK3399, 4GB LPDDR4, 2xUSB3
-
HK1 Box: CPU Amlogic S905X3 (4-core A55 up to 1.91 GHz), GPU G31 MP2 (650 MHz, 6 cores), memory 2G/4GB (DDR4, 3200 MHz), flash memory 16G/32G eMMC, WiFi/Bluetooth 4.0, 1xUSB3.0, 1xUSB2.0, microSD (TF card) slot, H.265 hardware decoding (8K support)
Among them, the best performing and functional box is the NanoPC T4, which I bought for ¥900 (full set: motherboard + heat sink + RTC + metal case + infrared remote control), and now the single board is already over a thousand. But the price is too high. The cost performance is not worth it, and I have already used this board. So, referring to the recommended HomeAssistant Blue on the official website, I chose the HK1 Box.
The hardware configuration of HK1 Box is comparable to HomeAssistant Blue (CPU and eMMC slightly inferior), the CPU of HomeAssistant Blue is S922X (4 cores [email protected] + 2 cores [email protected]), I checked on Taobao that the price of HomeAssistant Blue (Odroid N2+): 32G eMMC flash / 4G memory Odroid N2+ single board + shell is about ¥1200. The original price of HK1 Box (4G memory / 32G flash) is about ¥230. This price is almost one-fifth of HomeAssistant Blue. The power consumption is also low: 3-4.45W (without mobile hard disk).
Notes for HK1 Box:
-
Quality varies, and the yield rate is not high (I bought two, returned three), after flashing the firmware, test it thoroughly. The advantage is that it can function as a set-top box, game console (EmuElec), small server, and supports multi-boot.
-
The original power supply quality is poor, it is best to replace it with a good quality one: voltage 5V, current no less than 3A, interface 5.5*2.5 compatible with 2.1, if you really can’t find it, you can also use the 5V2A power supply of domestic TV boxes, or a 5V2A mobile phone charger + USB to DC line, but the quality must be acceptable. Some people using the original power supply have burned the USB port, some burned the USB network card, some burned the external hard disk, and even if it hasn’t burned, there are various instability issues.
-
The original heat dissipation is a problem; if you don’t modify the heat dissipation, it can easily reach 80 degrees. After modifying with a large heat sink, the temperature can be reduced to 60 degrees; the price of HK1 Box with a large heat sink is about ¥260 (with 3A power supply), and with a fan, it can be reduced to 40 degrees (30 degrees in winter); the price of HK1 Box with a fan is about ¥290 (with 3A power supply), but if the other party is not careful about static electricity after modifying the fan, it can burn the EMMC, making it impossible to flash the firmware.
-
The latest Android version (20220222_0120) for HK1 Box is troublesome to flash, unable to USB boot flash, must first flash back to the old version via wire (plug into USB2.0 port) before USB boot flash.
-
Check the version number: press the help button on the remote, scroll to the bottom, click update.
The future of HA Box
I don’t like the HomeAssistant Yellow that is currently crowdfunding on the official website; it is an expansion board for Raspberry Pi CM4: built-in Zigbee (Silicon Labs MGM210P) + M.2 expansion slot + Gigabit Ethernet port (optional PoE support) + Audio DAC, but this expansion board can only be used on the Raspberry Pi Compute Module 4 (must be self-prepared), and the Raspberry Pi CM4 (4 cores [email protected]) has many known small issues, plus the price has doubled now, so there’s no cost performance to speak of, just the ecological circle is acceptable.
To be honest, if there are many Addons installed, 4G memory may not be enough. DIY HA boxes are all about cost performance, and at the same time, they save energy and electricity.
Currently, the Addons I have installed are:
-
TimescaleDB (PostgreSQL: TimeScaleDB + PostGis)
-
Zigbee2MQTT
-
Mosquitto broker
-
VLC
-
Logitech Media Server
-
room-assistant
-
Samba share
-
File editor (generally closed)
-
Check Home Assistant configuration (generally closed)
-
pgAdmin4 (generally closed)
-
Node-RED (generally closed, for testing)
-
ESPHome (generally closed)
My ideal HA box has 8G/16G memory motherboard, with an NPU (Neural Processing Unit) chip, so that offline AI voice recognition/TTS/video recognition can be implemented directly on the smart hub: Rock5 Model B RK3588.
HA Usage Notes
This should fall under software, but let me briefly mention it here.
-
Do not unplug the power directly; try to follow the normal shutdown process: Configuration -> Add-ons, Backups and Supervisor -> System -> Shut down Host; otherwise, it may cause system damage, leading to a system reinstall. If using overlayfs file system, the situation of system damage will be improved to some extent.
-
When there are many sensors, the database data expands quickly, requiring storage expansion and optimization of data storage methods.
-
Storage expansion: insert 256G/512G TF card or external hard disk
-
If the box performance is good, then go directly to TimescaleDB (PostgreSQL), paying attention to controlling CPU and memory usage in the configuration, such as in the HK1 box.
-
If the box performance is average or you want to save disk space, then use MariaDB, or SQLite Mem + InfluxDB for more space saving, but at this time, historical data can only be viewed in InfluxDB.
One and a half months of usage experience is still far from enough; welcome to supplement.
Guide to this series of articles:
Avoiding Pitfalls in HA Smart Hardware Procurement (Part One) Zigbee Edition
Avoiding Pitfalls in HA Smart Hardware Procurement (Part Two) Wifi Edition
Avoiding Pitfalls in HA Smart Hardware Procurement (Part Three) Bluetooth Edition
Follow us to learn more about HA gameplay
▼ Please click “Read the original text” to interact with the author on the forum.