Sdomotica is a very very home automation entusiat, and from 15 years play with every kind of DIY solutions (Girder, Netremote, iViewer, etc).
Now I’m very Home Assistant fan!!!
Now my challenge is answer at very very frequent question and discussion on forum, chat etc
What is the right hardware?
It’s very frequent read what kind of hardware is the best for HA.
Normally the comparison is made on reboot/restart time.
And people make a ranking on the basis of these times
I organized a very empiric test.
The scope is compare different kind of hardware but with more or less the same price range.
I wrote a package with two automations for call restart HA and reboot host from a mqtt message.
I wrote an automation for send a mqtt message on HA start.
script:
riavviahost:
alias: Riavvia Host
icon: mdi:power-cycle
sequence:
- service: mqtt.publish
data_template:
topic: "test/odroid"
payload_template: "riavvia"
riavviaha:
alias: Riavvia HA
icon: mdi:power-cycle
sequence:
- service: mqtt.publish
data_template:
topic: "test/odroid"
payload_template: "riavviaHA"
sensor:
- platform: mqtt
name: Tempo start Host
state_topic: "test/sensor/riavvia"
- platform: mqtt
name: Tempo start HA
state_topic: "test/sensor/riavviaHA"
automation:
- id: '1610988481530'
alias: Riavvia Host
description: ''
trigger:
- platform: mqtt
topic: test/odroid
payload: riavvia
condition: []
action:
- service: hassio.host_reboot
data: {}
mode: single
- id: '1610989243578'
alias: Riavvia Home Assistant
description: ''
trigger:
- platform: mqtt
topic: test/odroid
payload: riavviaHA
condition: []
action:
- service: homeassistant.restart
data: {}
mode: single
- id: '1610989538508'
alias: Home Assistant Start
description: ''
trigger:
- platform: homeassistant
event: start
condition: []
action:
- service: mqtt.publish
data:
topic: test/odroidstart
payload: odroid
mode: single
On a different machine with Nodered and Mqtt broker I implemented a Nodered flow for intercept the mqtt message for start, and put the timestamp on a variable. When arrive the HA start mqtt message, nodered make the difference between the two time stamp and send back a sensor value with time difference
Here the Nodered flow
[{"id":"ea30c68d.2c38e","type":"tab","label":"Restart","disabled":false,"info":""},{"id":"425f3e2d.dfe5a8","type":"mqtt in","z":"ea30c68d.2c38e","name":"","topic":"test/odroid","qos":"2","broker":"bb6f23a2.5bd548","x":130,"y":140,"wires":[["c62262c9.6bedd8"]]},{"id":"c62262c9.6bedd8","type":"switch","z":"ea30c68d.2c38e","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"riavvia","vt":"str"},{"t":"eq","v":"riavviaHA","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":290,"y":140,"wires":[["3a66f2f.40b550e","6f94cf38.ff456"],["fe1b6eb1.27fad8","6f94cf38.ff456"]]},{"id":"3a66f2f.40b550e","type":"function","z":"ea30c68d.2c38e","name":"Riavvia set","func":"msg.payload = new Date().getTime()\n\nflow.set(\"riavvia\", msg.payload);\nflow.set(\"riavviaHA\",0);\n\nreturn msg;","outputs":1,"noerr":0,"x":510,"y":80,"wires":[["65030594.ce9314"]]},{"id":"65030594.ce9314","type":"debug","z":"ea30c68d.2c38e","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":680,"y":80,"wires":[]},{"id":"19bafa9e.a4ddcd","type":"inject","z":"ea30c68d.2c38e","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":320,"y":80,"wires":[["3a66f2f.40b550e"]]},{"id":"66fb894c.92685","type":"function","z":"ea30c68d.2c38e","name":"Delta su Riavvia","func":"a = flow.get(\"riavvia\");\n\nif (a>0){\n\nb = new Date().getTime()\nms = b -a\n\nmsg.payload = new Date(ms).toISOString().slice(11, -1);\nreturn msg;\n}","outputs":1,"noerr":0,"x":400,"y":340,"wires":[["155cfba0.3fd0dc","c3b67c8a.644a78"]]},{"id":"155cfba0.3fd0dc","type":"debug","z":"ea30c68d.2c38e","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":630,"y":340,"wires":[]},{"id":"17dde2aa.0f4e05","type":"inject","z":"ea30c68d.2c38e","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":200,"y":340,"wires":[["66fb894c.92685"]]},{"id":"fe1b6eb1.27fad8","type":"function","z":"ea30c68d.2c38e","name":"Riavvia HA set","func":"msg.payload = new Date().getTime()\n\nflow.set(\"riavviaHA\", msg.payload);\nflow.set(\"riavvia\",0);\nreturn msg;","outputs":1,"noerr":0,"x":520,"y":200,"wires":[["b2af4557.6bdf18"]]},{"id":"b2af4557.6bdf18","type":"debug","z":"ea30c68d.2c38e","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":680,"y":200,"wires":[]},{"id":"1cb3dc42.42941c","type":"inject","z":"ea30c68d.2c38e","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":320,"y":200,"wires":[["fe1b6eb1.27fad8"]]},{"id":"82352eea.168818","type":"function","z":"ea30c68d.2c38e","name":"Delta su RiavviaHA","func":"a = flow.get(\"riavviaHA\");\nif (a>0){\n\nb = new Date().getTime()\nms = b -a\n\nmsg.payload = new Date(ms).toISOString().slice(11, -1);\nreturn msg;\n}","outputs":1,"noerr":0,"x":410,"y":460,"wires":[["11b12004.84a3d8","f1800a9a.cc024"]]},{"id":"11b12004.84a3d8","type":"debug","z":"ea30c68d.2c38e","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":630,"y":460,"wires":[]},{"id":"fca70d15.0811c8","type":"inject","z":"ea30c68d.2c38e","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":200,"y":460,"wires":[["82352eea.168818"]]},{"id":"99b99059.aca1f8","type":"mqtt in","z":"ea30c68d.2c38e","name":"","topic":"test/odroidstart","qos":"2","broker":"a1ac51.d8acd3b","x":160,"y":400,"wires":[["66fb894c.92685","82352eea.168818"]]},{"id":"c3b67c8a.644a78","type":"mqtt out","z":"ea30c68d.2c38e","name":"","topic":"test/sensor/riavvia","qos":"","retain":"","broker":"a1ac51.d8acd3b","x":870,"y":340,"wires":[]},{"id":"f1800a9a.cc024","type":"mqtt out","z":"ea30c68d.2c38e","name":"","topic":"test/sensor/riavviaHA","qos":"","retain":"","broker":"a1ac51.d8acd3b","x":880,"y":460,"wires":[]},{"id":"6f94cf38.ff456","type":"change","z":"ea30c68d.2c38e","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"--","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":680,"y":140,"wires":[["c3b67c8a.644a78","f1800a9a.cc024"]]},{"id":"bb6f23a2.5bd548","type":"mqtt-broker","z":"","name":"Sdomotica 127","broker":"127.0.0.1","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"a1ac51.d8acd3b","type":"mqtt-broker","z":"","name":"MQTT 127","broker":"127.0.0.1","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]
These are the hardware involved for the test and the HA version
RPI4 2gb HA 2021.1.4 Hassos 5.10
Odroid N2 Blue HA 2021.1.4 Hassos 4.20 (no update avaiable)
NUC5CPYH - Celeron 1,6 4gb HA 2021.1.4 Hassos 5.10
FUJITSU ESPRIMO Q520 (Proxmox 6.3) HA 2021.1.4 Hassos 5.10 - 2gb ram, normal HD
The last Fujitsu is a second hand PC.
These the results for Home Assistant restart time
The winner is new Odroid N2 Blue
These are the results for Host reboot (for Proxmox is the reboot called by hassio.host_reboot not totally correct.
Free to comment and eventually share your test.
Enjoy with Home Assistant
Sandro