meme

Install Home Assistant on Intel NUC. The correct way

In this (series of?) tutorial I’ll write about my journey with Home Assistant: not a step by step tutorials, rather some points to follow to achieve particular and not trivial tasks.

Note: I never used Home Assistant before, so aritcles will be probably updated over the time and may contain corrections on the go.

Setup

I decided to use a spare Intel NUC i5 for the job, for having more horsepower than a Raspberry Pi, just in case.

Also I didn’t want to install the docker images, but at the same time I wanted official support from the community, so I decided to install the Home Assistant OS official image.

The install process of the image is not easy, but not difficult neither. For sure it is not intended for newbies, so I assume you are familiar with Linux and/or smart enough to search on Google when needed.

Let’s start first with…

Updating the BIOS

Just for being safe, I decided to start with a machine updated, so the first thing to do was to update the BIOS.

Go to Intel downloads page and search for you model (mine is NUC5i5RYK)

  1. Download the Recovery BIOS update file (.BIO) and transfer to a USB flash drive
  2. Plug the USB flash drive into a USB port of the target Intel NUC
  3. Turn on (or restart) the NUC
  4. During boot, when the F7 prompt is displayed, press F7 to enter the BIOS Flash Update screen
  5. Select the USB device and press Enter
  6. Select the .BIO file and press Enter
  7. Confirm you want to update the BIOS by pressing Enter
  8. Wait 2-5 minutes for the update to complete
  9. Remove the USB flash drive
  10. Restart NUC.

Turn on automatically

In case of power failure and subsequent restore, I want the NUC to boot up again automatically so Home Assistant can operate again.

  1. Boot NUC and press F2 on keyboard during start up to go inside BIOS
  2. Click Advanced > Power > Secondary Power Settings > After Power Failure
  3. Select Power On under After Power Failure
  4. Press F10 on keyboard to save the changes and exit BIOS

Installing the image

To flash the official NUC image downloaded from the download page you need to boot to a live image of Ubuntu, because the destination SSD must not be mounted.

  1. Download Ubuntu 20.24 LTS and flash it to an USB flash drive using Balena Etcher or you preferred software
  2. Download the official NUC disk compressed image (.xz file) and put it as is in another flash drive
  3. Plug the Ubuntu USB flash drive
  4. Power up the NUC, and press F10 to show the boot options, then select the USB with Ubuntu
  5. From there select “Try Ubuntu” and wait the booting process to finish.
  6. Once the Desktop screen shows up, plug the NUC flash drive and locate the path to the image .gz file.
  7. Open a terminal

Next step will be the most dangerous part, so read carefully.

We need to unpack the compressed image file and flash directly to the NUC disk.

Target partition is usually /dev/sda, you can locate it with fdisk -l

The mount point of the USB flash drive containing the compressed image can be found with lsblk command.

Thanks to the pipe (|) power we can do both commands with a single line on the CLI. This is the syntax:

xz -dc /path/to/image.xz | dd of=/path/to/your/ssd bs=4M conv=fsync
In my case the command is:

xz -dc /media/ubuntu/Volume/hassos_intel-nuc-5.10.img.xz | dd of=/dev/sda bs=4M conv=fsync

It will take some time, just have a little patience.

Fun fact: this screen is taken directly from the Ubuntu Live image. Update: the command changed due to new xz image format

First boot

I highly recommend to don’t use WiFi for home Home Assistant, as it is not always 100% reliable, so attach the NUC to the router using an ethernet cable.

First boot will be slow because of internal setup. Meanwhile you can search on your router the IP address assigned to the NUC, and reserve that for avoid future problems.

Congratulations! Home Assistant is starting 🙂

Once the IP is found you can connect to that address (default port is 8123) and do the initial setup.

Conclusion

This is the end of the first post. As you’ve seen the process seems (and is) pretty straightforward, but many people tried with different methods and had no luck .

I decided to share my experience, hope it will work on you too.

8 pensieri su “Install Home Assistant on Intel NUC. The correct way

  1. Thanks for writing this guide, I found it very helpful when setting up Home Assistant on my NUC. For anyone who is reading this recently, the latest image requires a small change to the command used to install the image. As of the time of this writing, the latest image is https://github.com/home-assistant/operating-system/releases/download/5.10/hassos_intel-nuc-5.10.img.xz, which cannot be decompressed using gunzip. Instead, use the following command:

    xz -dc /path/to/image.xz | dd of=/path/to/your/ssd bs=4M conv=fsync

    Piace a 1 persona

  2. I had to run the command as ROOT (sudo -i) in order to get the command working (after 3 hours of search and trying :-D), but it WORKS! Thanxs for the guide!

    "Mi piace"

Lascia un commento

Questo sito utilizza Akismet per ridurre lo spam. Scopri come vengono elaborati i dati derivati dai commenti.