Guides > Hass.io
 

 

Installing Hass.io inside of a Docker container on an Intel NUC (NUC6CAYH) - Last Updated 6/9/2019

If you have a NUC, you may be wondering why you should go through the trouble of installing Debian or some other linux OS instead of just installing the Hass.io image on your storage drive. That may be what you did on your Raspberry Pi but it isn't a good idea on a NUC for 2 reasons:

1) NUCs are powerful devices and their hardware can be utilized for more than just a Home Assistant setup. By installing a Linux OS on your NUC, Hass.io can be just one of multiple things running on your NUC, using more of its full potential.

2) Hass.io has a bug where certain USB devices like the Linear HUSBZB-1 aren't detected. See thread: https://github.com/home-assistant/hassio/issues/227

The workaround is to first install Debian, Ubuntu, etc. Then install docker so the HUSBZB-1 will be detected detected. Lastly, install Hass.io.

See below for a full walkthrough.

 

BIOS

    • First make sure your NUC has the most recent BIOS installed on it.
      • Click here for instructions for doing that on the NUC.
      • You can download the actual BIOS file here. (You want the one that is BI .zip like this for Linux: AYAPLCEL.86A.0060.BI.zip)
      • Extract the zip file and put the 2 files that it contains (the .exe and .bio) onto a USB flash drive that is in FAT format.

Etcher

Etcher is a program that allows you to burn images or discs to USB devices like flash drives, hard drives (spinning disk and solid state). We need it to create a bootable USB drive that will have Debian on it.

    • Download and install Etcher.
    • Download the Debian 9 OS image (or whatever the latest version is) from here. Select the torrent file labeled something like: debian-x.x.x-amd64-netinst
    • Use Etcher to burn the Debian image to a blank USB drive, hard drive or SSD.

Debian

Debian is a Linux based operating system. When you buy a NUC, you can pay something like $100 USD for a copy of Windows which Home Assistant runs crappy on. If you did buy Windows, you would probably want to install a virtual machine on your NUC, running Linux, to install Home assistant in. So if you can, avoid buying Windows for your NUC and download Linux for free and install that on your NUC.

I chose Debian because it looked like it was a tiny bit more stable and user friendly than Ubuntu but that is a great choice as well. For these instructions though, they are using Debian. As a person not familiar with Linux at all really, I don't know if the commands would be the same on Unbuntu as Debian but I would guess that most of them would be.

    • Power on the NUC and boot from the USB drive. You can hit F2 when the NUC is booting to enter BIOS. Or you can turn off the NUC and then press and hold the power button for 5 seconds. When you boot it up the BIOS screen should appear. Select the USB drive that you burned the Debian image on.
    • Load Debian from the options available. When you're prompted to create a root account and password, do it. When I used blank/blank for the username/password I couldn't get Docker to install properly so please take note of this step.
    • Once setup of Debian has completed, use your username and password to log into the traditional desktop homescreen of Debian.
    • Now go to Activities > Utilities > Terminal or just search for "Terminal" from your desktop.
    • Inside the Terminal application, type "su" and hit enter. Then your root password to enable root access. You've enabled superuser/root.
    • Then install docker-ce following this guide (or read below): https://docs.docker.com/install/linux/docker-ce/debian/#install-docker-ce-1

Docker

Docker is basically a lightweight container that will be running Hass.io inside of it. Hass.io itself will also create a bunch of Docker containers for add-ons but the reasons we are making one now is so that: 1) USB devices like the Aeotech 5 z-wave controller will show as devices you can use and 2) Installing in a Docker also allows your NUC to do other things instead of being 100% dedicated to Home Assistant. A NUC has a lot of power and can do other things like host a Plex server or run other small servers in addition to running your smart home setup.

    Setting up the repository

      First, I type this and then enter my password to enable superuser:

        su

      Now, anytime it says sudo below you shouldn't need to enter the sudo part.

       

      Before we install Docker, we need to set up the repository.

      First update the apt package index:

      sudo apt-get update

      Now we need to install the pre-requisites. Install packages to allow apt to use a repository over HTTPS:

      sudo apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common jq

      Add Docker’s official GPG key:

      curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -  

      Verify that you now have the key with the fingerprint 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88, by searching for the last 8 characters of the fingerprint.

      $ sudo apt-key fingerprint 0EBFCD88 

      You should see it respond with something like this, note the 0EBF CD88 which means the fingerprint is correct:

      pub   4096R/0EBFCD88 2017-02-22       
      Key fingerprint = 9DC8 5822 9FC7 DD38 854A  E2D8 8D81 803C 0EBF CD88  uid  
      Docker Release (CE deb) <[email protected]>  sub   4096R/F273FCD8 2017-02-22  

      Use the following command to set up the stable repository:

      sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs)
      stable"

    Installing Docker

      Update the apt package index.

      $ sudo apt-get update  

      Install the latest version of Docker CE, or go to the next step to install a specific version:

      $ sudo apt-get install docker-ce

      Verify that Docker CE is installed correctly by running the hello-world image.

      $ sudo docker run hello-world

      It should say it was successful and if so it's time to download Hass.io.

       

Hass.io

Hass.io is a more user friendly version of Home Assistant and it is the future of the project in my opinion. There is very active support and development for it and it allows you to use some features that regular Home Assistant doesn't have. Hass.io has "add-ons" that simplify what can be complicated processes to set up other services. It also is moving towards a more visual way of managing your front end as opposed to the old way of doing yaml files. Coming from a non-programming person, Hass.io is a clear choice for its simplicity and support.

Once you get Hass.io set up a few of the add-ons going, I would highly recommend you check out the Node Red add-on Frenck created. Node Red is an alternative way to create automations in Home Assistant. It lets you test immediately rather than having to reboot your Home Assistant to test changeNow we are ready to install Hass.io.

Installing Hass.io

      Instead of needing to download a Hass.io image and burn it to a USB or hard drive with Etcher, we can instead use a command to have the NUC download Hass.io from GitHub.

    In Debian Terminal, enter the following to install the Hass.io image (also see this link). Run the following command as root:

      curl -sL https://raw.githubusercontent.com/home-assistant/hassio-build/master/install/hassio_install | bash -s -- -m intel-nuc

Be patient as it can take some time to load. To see if it worked and if Home Assistant is running or being installed, open your web browser and go to:

http://<YourNUC'sLocalPAddressHere>:8123 or http://hassio.local:8123.

If it's downloading you should see the blue Home Assistant logo. If you're installing on a Pi or something it can take a long time but with a NUC it should be faster.

Note, if the above doesn't work, the last time I had to do it a slightly different way, I believe this is the generic Linux way:

# apt-get install -y apparmor-utils apt-transport-https avahi-daemon ca-certificates curl dbus jq network-manager socat

Then:

curl -sL "https://raw.githubusercontent.com/home-assistant/hassio-installer/master/hassio_install.sh" | bash -s

Continue reading below for important next steps now that you have Home Assistant running.

Enable Samba - Last Updated 4/22/2019

Samba is an essential way to link your NUC to your home computer or other devices as a network share. It allows you to view your Home Assistant's folders and files and allows for easy editing of your setup without having to use another method like SSH.

Installing Samba

Open Hass.io in your web browser. Create a username and password for your Home Assistant setup if you haven't already.

Then in windows file exploxer (not your browser), enter this in the address bar: <youripaddress>:8123

Once you have Hass.io pulled up, select the Hass.io button on the left navigation bar. Find the SAMBA add-on and install it. For settings use:

{
"workgroup": "WORKGROUP",
"username": "",
"password": "",
"interface": "",
"allow_hosts": [
"10.0.0.0/8",
"172.16.0.0/12",
"192.168.0.0/16"
]
}

Now in Windows File Explorer, you should see HASSIO as a network device. You should see folders like addons, backup, config, share, and ssl. config is your main folder where a lot of things will bekept for your Hass.io project.

If you ever want to back up your settings, copy the config folder and the other folders to a safe place. Once you get samba or SSH access set up on a new device or install, you can use the folders you backed up to help restore your settings.

There is also a snapshot feature that Hass.io has that is even easier. You can use it by clicking on the left panel of the front end, click the Hass.io button and then go to the Snapshot tab. Snapshots are saved in your "backup" folder so to restore a backup, get Samba working on the new device and then drag and drop the backup folder over.

 

More

    • Coming Soon

Copyright © 2018 brett0wens.com. All Rights Reserved.