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!
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
- 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
apt-get upgrade
apt-get update
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
apt-get install docker.io
systemctl enable docker
systemctl start docker
systemctl status docker
Install Portainer (https://www.youtube.com/watch?v=_3XR1gx0lVo)
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
NUC specific
curl -sL https://raw.githubusercontent.com/home-assistant/hassio-build/master/install/hassio_install | bash -s -- -m intel-nuc
- Navigate to your instance of Portainer (http://:9000)
- In portainer stop the HomeAssistant container
- Click edit at the top for the HomeAssistant container
- Add the line under media
/dev/ttyUSB-ZStick-5G:/dev/ttyUSB-ZStick-5G
- Above click deploy the container
Navigate to http://:8123 And HomeAssistant with Hassio should be back up and running
Some that I use
- RPC Shutdown
- Duck DNS (for SSL)
- Web Relay
- Make new directory on host machine under the user /home//
mkdir node-red
- 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
sudo apt-get install npm
takes a few seconds...
sudo npm install -g node-red-admin
cd /home/<user>/node-red
node-red-admin hash-pw
- (this is used on the admin website)
- Copy the Hash (select and right click will copy will use this in step 7)
- Modify the settings file for the new HASH
sudo nano settings.js
- Uncomment adminAuth section (in settings.js)
- (optional) change username
- change password to copied hash above in step 3)
- Save the file (in nano ctl+x then y then )
- Login to Portainer (http://:9000)
- Select Containers
- Restart Node-Red Container
- Navigate to Admin site (http://:1880)
- Use the credentials stored in the above steps
- 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