A successful migration from Pi 3 to Intel NUC

I want to share some notes about migrating from Raspberry Pi to an Intel NUC, for inspiration to others and for personal reference :wink: 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 :smiley: )

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

  1. 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ā€.
  2. Copy the file to an USB stick or an SD card and plug it in the NUC.
  3. 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.
  4. In the interface, look for a button or link that says update BIOS or similar, and pick the file on the SD card.
  5. Wait for the machine to update and reboot.

Install Ubuntu Server

  1. Download Ubuntu Server with another machine (I used a mac) from here https://ubuntu.com/download/server.
  2. Flash onto SD card/USB stick with Etcher or similar.
  3. Put the SD card into the NUC, and restart, and push F7 again once it boots up.
  4. Select the SD card as a boot drive.
  5. Reboot
  6. Follow the installation steps (make sure you connect the NUC to the internet via a cable)
  7. When asked whether you want to install additional ā€œsnapsā€, select Docker. You can also install docker manually later, if preferred.
  8. Finish installation and restart.

Install Home Assistant

  1. Open your terminal (from a another machine - I used a Mac), and type SSH your-username@your-intel-nuc-ip
  2. If all goes well, you should now be ā€œinsideā€ your intel-nuc machine and be able to put in commands
  3. Now, perform the installation according to this https://github.com/home-assistant/supervised-installer
  4. 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
  5. 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

  1. 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.
  2. If you dont already have a Snapshot of your installation on the Pi (the original instance), go to Supervisor => Snapshots and create one.
  3. Go to Supervisor and => Add-on Store and install Samba share on the Pi.
  4. 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.
  5. Enter the ā€œBackupā€ folder on the Nuc, and copy over the snapshot file.

Load the snapshot (backup) on the NUC

  1. 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.
  2. 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.

  1. Very fast reboot
  2. SSD. No SD card becoming corrupt over time.
  3. Ability to run everything on one machine, like image recognition, influxdb, custom stuff.
  4. More responsive interface.
  5. Automations seem to trigger faster, like motion detection
17 Likes

Great post, thanks so much for sharing. Followed it to the letter and got everything migrated within half an hour.

Cool, glad to help :slight_smile:

Iā€™ve got one tiny addition. The zigbee2mqtt configuration contains the PIā€™s local IP-address, so youā€™ll have to change that to the NUCā€™s local IP-address.

1 Like

Hi!

Thx for thisā€¦ Could you help me how to install mosquitto with docker?

Thanks for your post!

Iā€™m running on a laptop with a i5 and 8GB as well.
I choose to run Proxmox. But Iā€™m not really using it for any other VMā€™s.
Iā€™m wonder if I can make Home Assistant faster if I convert to Ubuntu server as well. Proxmox itself take some resources as well.
Iā€™ve got a Deconz Zigbee network with 55 devices and Z-Wave with only 4 devices and a lot of ESP8266 devices.
Restarting Home Assistant does take a minute or 5.

Do you have a similar situation and how long does it take to restart Home Assistant?

Hi, firstly thank you for taking the time to write this up ā€¦ really helped me as I am considering moving from ST to HA fully but I need to implement Zwave and Zigbee on HA which I havenā€™t done yet. It seems Zwave is straightforward but Iā€™ve seen loads of issues around zigbee which seem to point towards the PI not coping. I also wanted to simplify the install with HUSBZB-1

But before I buy a NUC can I asked what i5 CPU you are running and how is performance with both Zwave and Zigbee .

Help is appreciated , Andy

I would just install it with the Add-on Store, via the Supervisor panel. It will install it as a docker container.

Restarting Home Assistant is very fast on my setup. I would say it takes 20-30 seconds before I can use the interface. Then, Z-wave takes a while to do its thing and query all devices (I have about 40), but that has nothing to do with Home Assistant. I also use Deconz with about 90 devices, along with a few ESP32s and what not.

I would recommend Debian instead of Ubuntu actually, because Debian is the only officially supported installation of Home Assistant supervised.

1 Like

Its an Intel Core i5-6260U, 1.80 GHz.

Performance with z-wave and zigbee is really good. I can see that Deconz is actually using quite a bit of CPU (10-15 %), but I also have many devices (about 90). Previously I had image recognition running on the same machine but never had any performance issues with z-wave or zigbee at all. In general, performance has been really stable.

@anderstbl !

very interesting post, clear, simple, love it!

I want to migrate right now lolā€¦just need a NUCā€¦think about it since few month, after try a RPI4 2Go,then 4Go then 8Go now, but i think i am convinced now, because of you :wink:

Thanks a lot.