Moving from Raspberry Pi to NUC (Docker) for HomeAssistant Hass.io with Z Wave - ZinkNotTheMetal/HomeAssistant GitHub Wiki

To begin this is comprised of following many different articles and I found these steps to be the most direct. Hope this helps!

Migrating Hass.io to the NUC

Install [Ubuntu] on the NUC (https://www.ubuntu.com/download)

  • setup network (ethernet or wireless)
  • enable & setup ssh (apt-get install openssh-server)
apt-get install openssh-server

The Steps Below can done via SSH or on the NUC itself

Map Z-Stick to friendly name (OPTIONAL if you don't have Z-Wave skip this step)

  • sudo nano /etc/udev/rules.d/99-com.rules Put the line below into the file and save it (using ctl+x)
SUBSYSTEM=="tty", ATTRS{idVendor}=="0658", ATTRS{idProduct}=="0200", SYMLINK+="ttyUSB-ZStick-5G"

Enable Sudo for the command window (optional - if you do not do this step preface everything with sudo)

sudo -s

Type password

Upgrade / Update OS

apt-get upgrade
apt-get update

Download required docker packages

apt-get install -y bash jq curl avahi-daemon dbus network-manager apparmor-utils
apt-get install -y apt-transport-https ca-certificates curl software-properties-common

If a Reboot is required

Enable Sudo for the command window (optional - if you do not do this step preface everything with sudo)

sudo -s

Install Docker

apt-get install docker.io
systemctl enable docker
systemctl start docker
systemctl status docker

Create a volume for portainer

docker volume create portainer_data

Create a docker container for Portainer

docker run -d \
--name="portainer" \
--restart on-failure \
-p 9000:9000 \
-v /var/run/docker.sock:/var/run/docker.sock \
-v portainer_data:/data \e
portainer/portainer

Ensure it is up and running by typing http://:9000

HASS.IO / HomeAssistant install

NUC specific

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

Final configuration

  1. Navigate to your instance of Portainer (http://:9000)
  2. In portainer stop the HomeAssistant container
  3. Click edit at the top for the HomeAssistant container
  4. Add the line under media
/dev/ttyUSB-ZStick-5G:/dev/ttyUSB-ZStick-5G
  1. Above click deploy the container

Navigate to http://:8123 And HomeAssistant with Hassio should be back up and running

Install Hass.io Addons

Some that I use

  • RPC Shutdown
  • Duck DNS (for SSL)
  • Web Relay

Install Node-Red (via Docker)

  1. Make new directory on host machine under the user /home//
mkdir node-red
  1. Check id and uid for user
id

In my case it was uid:1000 & id:1000 3. Create new Node-Red Docker container

docker run -d \
--name=node-red \
--restart=always \
-p 1880:1880 \
-u <id>:<guid> \
-v /home/<user>/node-red:/data \
-v /var/run/docker.sock:/var/run/docker.sock
nodered/node-red-docker:v8

Install NPM (required for the admin website for Node-Red)

sudo apt-get install npm

takes a few seconds...

Install Node-Red Admin

sudo npm install -g node-red-admin
cd /home/<user>/node-red
node-red-admin hash-pw
  1. (this is used on the admin website)
  2. Copy the Hash (select and right click will copy will use this in step 7)
  3. Modify the settings file for the new HASH
sudo nano settings.js
  1. Uncomment adminAuth section (in settings.js)
  2. (optional) change username
  3. change password to copied hash above in step 3)
  4. Save the file (in nano ctl+x then y then )
  5. Login to Portainer (http://:9000)
  6. Select Containers
  7. Restart Node-Red Container

Ensure Admin site works properly

  1. Navigate to Admin site (http://:1880)
  2. Use the credentials stored in the above steps
  3. Add Node-Red Add-ons that are missing in this default installation
- Hue-Magic
- Home Assistant
- stop-timer
- time-range-switch

P.S.

!!!IF NEEDED TO STOP DOCKER or HASS Supervisor!!!!

SSH / Terminal on NUC

sudo systemctl docker stop
sudo systemctl docker status
sudo systemctl docker start
⚠️ **GitHub.com Fallback** ⚠️