I want to share some notes about migrating from Raspberry Pi to an Intel NUC, for inspiration to others and for personal reference I think it can be useful for intermediate/rookie HA users who are considering to do the same and have similar requirements. So far I am very happy with my new setup, but there is probably many things I could have done differently (and better), so any experts out there feel free to comment.
Some background
Before migrating, I had searched the internet and forums alot, but to be honest, it made me a bit hesitant about doing the ājumpā from my trusty old Pi running plain Hassio. I found a lot of posts with people having trouble with their configurations on the new machine.
Like many others, I started out with a Pi 3 model B+, which I initially thought would be more than enough for all my home automation needs. About half a year ago, my Pi, which had otherwise been running incredibly stable (been running almost two years on the same SD card), started to show some signs of weakness.
It would crash when we had many things going on in the house at once, and crash when compiling the code for ESP boards with ESPHome, most likely due to memory outage. Also, the web interface would lag to an extent that was unacceptable, something I had otherwise gotten used to. Probably inevitable with tons of z-wave and zigbee devices, cameras, addons and custom integrations. Lastly, I had a feeling that the SD card would soon die, and this always happens at the most inconvenient moments, so I better migrate soon.
I then went out and bought a second hand Intel NUC with an i5 processor, 8GB Ram and a 256GB SSD. It would prove to be a great decision, and the downtime was almost nonexistant (even the wife didnt notice anything )
My requirements for the new installation:
- āPoint and clickā addons and easy updating (provided by the āSupervisorā). I want the ease-of-use we have with Hassio (now called Home Assistant).
- I want to have control over the OS so I can install custom docker containers for things like object recognition, or configure the system (sometimes needed for stuff like bluetooth to work)
My choice was then to perform an installation of āHome Assistant Supervised on a generic Linux hostā (https://github.com/home-assistant/supervised-installer)
Here is how I went about it:
Update the NUCs firmware
- This part consists of downloading the newest firmware file from https://downloadcenter.intel.com/product/70407/Intel-NUC-Kits. For my particular model it was a .bio file. Pick the file where it says āto be used for F7 BIOS Update methodā.
- Copy the file to an USB stick or an SD card and plug it in the NUC.
- Start up the Intel NUC and press the F7 key. This causes the NUC to enter the BIOS setup, where you can see many details about the system.
- In the interface, look for a button or link that says update BIOS or similar, and pick the file on the SD card.
- Wait for the machine to update and reboot.
Install Ubuntu Server
- Download Ubuntu Server with another machine (I used a mac) from here https://ubuntu.com/download/server.
- Flash onto SD card/USB stick with Etcher or similar.
- Put the SD card into the NUC, and restart, and push F7 again once it boots up.
- Select the SD card as a boot drive.
- Reboot
- Follow the installation steps (make sure you connect the NUC to the internet via a cable)
- When asked whether you want to install additional āsnapsā, select Docker. You can also install docker manually later, if preferred.
- Finish installation and restart.
Install Home Assistant
- Open your terminal (from a another machine - I used a Mac), and type SSH your-username@your-intel-nuc-ip
- If all goes well, you should now be āinsideā your intel-nuc machine and be able to put in commands
- Now, perform the installation according to this https://github.com/home-assistant/supervised-installer
- When you run the installation command, make sure to put in āintel-nucā in the command, like this
curl -sL "https://raw.githubusercontent.com/home-assistant/supervised-installer/master/installer.sh" | bash -s -- -m intel-nuc
- Once you have run all the commands, it should only be a minute or two before your installation is complete. You can try to type the IP of your NUC in the browser, followed by the port :8123, and see if you get a login screen. If so, create a user and login.
By now you should have two instances of Home Assistant running simultaneously. Now all we need is to migrate the data.
Prepare for migration
- Go to Supervisor and => Add-on Store and install Samba share on the NUC. By doing this, we are able to browse the HA folder on the NUC, and can copy over the Snapshot file from the Pi.
- If you dont already have a Snapshot of your installation on the Pi (the original instance), go to Supervisor => Snapshots and create one.
- Go to Supervisor and => Add-on Store and install Samba share on the Pi.
- By now, we should be able to browse the folders of the new and old home assistant installations in our OS. So go ahead and enter the āBackupā directory on your Pi, and find the snapshot file.
- Enter the āBackupā folder on the Nuc, and copy over the snapshot file.
Load the snapshot (backup) on the NUC
- Go to Supervisor => Snapshots on the NUC, and click the āRefreshā icon on the top right corner. The file that you copied over, to the Backup directory, should appear as a snapshot. Click it.
- For my case, I checked everything off, EXCEPT for Home Assistant itself (at the top). Then click āRestore selectedā. Wait. Home Assistant should start restoring your entire configuration, files and addons. It took about 5-10 minutes before mine had completed the restore.
Some notes on Z-wave and Zigbee.
One major concern I had about migrating, was about my Z-wave and Zigbee sticks (Aeotec and Conbee 2). In my previous configuration (on the PI), I have this config:
zwave:
usb_path: /dev/ttyACM0
This would turn out to work out-of-the-box on the Intel NUC. No action needed, and my z-wave network started up immediately after restore. Also, I have Deconz running as an addon, with this configuration:
device: /dev/ttyACM1
Would my Zigbee stick also work in the new installation? Yes, indeed. No action needed.
Some notes on Docker.
This installation installs everything in Docker. Docker is basically a piece of software that runs containerized apps independently of the hosting OS, and every element of our installation, including Home Assistant itself, the supervisor, addons, are actually containers.
It is perfectly fine to run your own containers alongside the ones handled by Home Assistant. I did a standalone installation of Portainer, which is a container/app that gives you a nice GUI to view and configure your Docker environment.
Here is a screenshot of my containers. You can see each individual addon, as well as the supervisor and Home Assistant itself. I also have some custom containers, including deepstack and Portainer.
Final notes
The intel-nuc is a bit pricey, but there is quite a few advantages.
- Very fast reboot
- SSD. No SD card becoming corrupt over time.
- Ability to run everything on one machine, like image recognition, influxdb, custom stuff.
- More responsive interface.
- Automations seem to trigger faster, like motion detection