OpenHAB
Goal
OpenHAB running on Raspberry PI is one of way where you don’t have to rely on outside services to orchestrate your IOT. Then comes the issues of high availability of the software if only running on one PI. By dockerizing the software first, this open the doors to leverage a kubernetes cluster to ensure HA of the software
Key Aspects
- Use the 3 nodes Raspeberry Cluster
- Access the WIFI, ZWave and Zigbee network
- Leverage the Nortek HUSBZB-1 Zwave and Zigbee dongle.
- Try to install OpenHab on node 3 of the cluster (Picture to be update with Dongle on bottom node).
Setup the host operating system
Moved the dongle to the third node of the cluster. Check it is present
lsusb
Bus 001 Device 004: ID 10c4:8a2a Cygnal Integrated Products, Inc.
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
~~~
Check the tty. I think (not sure) AMA is irrelevant when using Docker.
~~~
ls -lt /dev/tty*
crw-rw---- 1 root dialout 188, 0 Jul 7 08:12 /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 1 Jul 7 08:12 /dev/ttyUSB1
crw--w---- 1 root tty 4, 1 Jul 6 01:24 /dev/tty1
crw-rw---- 1 root dialout 204, 64 Jul 6 01:24 /dev/ttyAMA0
~~~
Create the directory for OpenHAB data
~~~
mkdir /opt/openhab
mkdir -p /opt/openhab/addons
mkdir -p /opt/openhab/conf
mkdir -p /opt/openhab/userdata
~~~
## Download and Start OpenHAB
Let's download the OpenHAB image
~~~
docker pull openhab/openhab:2.3.0-armhf-debian
~~~
Multiple things have to be done.
- Host networking allows access to the local Wifi network
- Adding the /dev/ttyXXX to be let the OpenHAB access the dongle
- EXTRACT_JAVA_OPTS to let the internal Java application access the dongle
~~~
docker run -d
--name openhab \
--net=host
-v /etc/localtime:/etc/localtime:ro \
-v /etc/timezone:/etc/timezone:ro \
-v /opt/openhab/addons:/openhab/addons \
-v /opt/openhab/conf:/openhab/conf \
-v /opt/openhab/userdata:/openhab/userdata \
-e EXTRA_JAVA_OPTS='-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyUSB1' \
--device=/dev/ttyUSB0 \
--device=/dev/ttyUSB1 \
openhab/openhab:2.3.0-armhf-debian
~~~
Run docker ps. Notice that we don't use Kubernetes infrastructure yet for OpenHAB
~~~
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
480d13667da3 openhab/openhab:2.3.0-armhf-debian "/entrypoint.sh gosu…" 9 hours ago Up 9 hours openhab
bd8761c6d40a k8s.gcr.io/kubernetes-dashboard-arm "/dashboard --insecu…" 39 hours ago Up 39 hours k8s_kubernetes-dashboard_kubernetes-dashboard-7d59788d44-x48qg_kube-system_b00d030f-80c6-11e8-acaf-b827ebd5ad4c_0
9be093b170b6 k8s.gcr.io/pause:3.1 "/pause" 39 hours ago Up 39 hours k8s_POD_kubernetes-dashboard-7d59788d44-x48qg_kube-system_b00d030f-80c6-11e8-acaf-b827ebd5ad4c_0
b0ae3ae6ab1e 184e05022e7f "/opt/bin/flanneld -…" 40 hours ago Up 40 hours k8s_kube-flannel_kube-flannel-ds-bhllh_kube-system_3a299b93-80bd-11e8-acaf-b827ebd5ad4c_2
dfb84f0a4fc0 k8s.gcr.io/kube-proxy-arm "/usr/local/bin/kube…" 40 hours ago Up 40 hours k8s_kube-proxy_kube-proxy-6r5mn_kube-system_3a2ac36a-80bd-11e8-acaf-b827ebd5ad4c_0
b19805b62389 k8s.gcr.io/pause:3.1 "/pause" 40 hours ago Up 40 hours k8s_POD_kube-flannel-ds-bhllh_kube-system_3a299b93-80bd-11e8-acaf-b827ebd5ad4c_0
6f633a4fca9b k8s.gcr.io/pause:3.1 "/pause" 40 hours ago Up 40 hours k8s_POD_kube-proxy-6r5mn_kube-system_3a2ac36a-80bd-11e8-acaf-b827ebd5ad4c_0
~~~
Get into the container. Notice there is no `nano` nor `vi` commands
~~~
sudo docker exec -ti openhab /bin/bash
root@nas-pi:/openhab# ls -lt
total 64
drwxrwxr-x 9 openhab openhab 4096 Jul 7 09:24 userdata
drwxr-xr-x 2 openhab openhab 4096 Jul 7 07:40 addons
drwxrwxr-x 1 openhab openhab 4096 Jun 27 15:23 userdata.dist
drwxrwxr-x 13 openhab openhab 4096 May 28 09:56 conf
drwxrwxr-x 1 openhab openhab 4096 May 28 09:56 conf.dist
-rw-rw-r-- 1 openhab openhab 11232 May 28 09:56 LICENSE.TXT
drwxrwxr-x 1 openhab openhab 4096 May 28 09:56 runtime
-rw-r--r-- 1 openhab openhab 121 May 28 09:46 start.bat
-rw-r--r-- 1 openhab openhab 72 May 28 09:46 start_debug.bat
-rwxr-xr-x 1 openhab openhab 73 May 28 09:46 start_debug.sh
-rwxr-xr-x 1 openhab openhab 116 May 28 09:46 start.sh
~~~
## Use OpenHAB
### Check the Dongle in the UI


### Check that logs
Check the docker logs
~~~
sudo docker logs openhab
++ test -t 0
++ echo false
+ interactive=false
+ set -euo pipefail
+ IFS='
'
+ '[' limited = unlimited ']'
+ rm -f /openhab/runtime/instances/instance.properties
+ rm -f /openhab/userdata/tmp/instances/instance.properties
+ NEW_USER_ID=9001
+ NEW_GROUP_ID=9001
Starting with openhab user id: 9001 and group id: 9001
+ echo 'Starting with openhab user id: 9001 and group id: 9001'
+ id -u openhab
Create group openhab with id 9001
+ echo 'Create group openhab with id 9001'
+ groupadd -g 9001 openhab
+ echo 'Create user openhab with id 9001'
+ adduser -u 9001 --disabled-password --gecos '' --home /openhab --gid 9001 openhab
Create user openhab with id 9001
Warning: The home dir /openhab you specified already exists.
Adding user `openhab' ...
Adding new user `openhab' (9001) with group `openhab' ...
adduser: Warning: The home directory `/openhab' does not belong to the user you are currently creating.
The home directory `/openhab' already exists. Not copying from `/etc/skel'.
+ groupadd -g 14 uucp2
+ groupadd -g 16 dialout2
+ groupadd -g 18 dialout3
+ groupadd -g 32 uucp3
+ groupadd -g 997 gpio
+ adduser openhab dialout
Adding user `openhab' to group `dialout' ...
Adding user openhab to group dialout
Done.
+ adduser openhab uucp
Adding user `openhab' to group `uucp' ...
Adding user openhab to group uucp
Done.
+ adduser openhab uucp2
Adding user `openhab' to group `uucp2' ...
Adding user openhab to group uucp2
Done.
+ adduser openhab dialout2
Adding user `openhab' to group `dialout2' ...
Adding user openhab to group dialout2
Done.
+ adduser openhab dialout3
Adding user `openhab' to group `dialout3' ...
Adding user openhab to group dialout3
Done.
+ adduser openhab uucp3
Adding user `openhab' to group `uucp3' ...
Adding user openhab to group uucp3
Done.
+ adduser openhab gpio
Adding user `openhab' to group `gpio' ...
Adding user openhab to group gpio
Done.
+ case ${OPENHAB_VERSION} in
++ ls -A /openhab/userdata
+ '[' -z 'cache
config
etc
jsondb
logs
tmp' ']'
++ cmp /openhab/userdata/etc/version.properties /openhab/userdata.dist/etc/version.properties
+ '[' '!' -z ']'
++ ls -A /openhab/conf
+ '[' -z 'html
icons
items
persistence
rules
scripts
services
sitemaps
sounds
things
transform' ']'
+ chown -R openhab:openhab /openhab
+ '[' false == false ']'
++ IFS=' '
++ echo gosu openhab ./start.sh
+ '[' 'gosu openhab ./start.sh' == 'gosu openhab ./start.sh' ']'
+ command=($@ server)
+ exec gosu openhab ./start.sh server
Launching the openHAB runtime...
~~~
On the PI Host:
~~~
tail -f /opt/openhab/userdata/logs/openhab.log
2018-07-07 09:21:23.913 [INFO ] [er.internal.HomeBuilderDashboardTile] - Started Home Builder at /homebuilder
2018-07-07 09:21:24.646 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Location set to 'XX.XXXXXXX,-YY.YYYYYYY'.
2018-07-07 09:21:25.889 [WARN ] [g.eclipse.smarthome.core.net.NetUtil] - Found multiple local interfaces - ignoring 169.254.43.59
2018-07-07 09:21:25.895 [WARN ] [g.eclipse.smarthome.core.net.NetUtil] - Found multiple local interfaces - ignoring 10.244.2.1
2018-07-07 09:21:25.900 [WARN ] [g.eclipse.smarthome.core.net.NetUtil] - Found multiple local interfaces - ignoring 169.254.185.58
2018-07-07 09:21:25.903 [WARN ] [g.eclipse.smarthome.core.net.NetUtil] - Found multiple local interfaces - ignoring 10.244.2.0
2018-07-07 09:21:25.908 [WARN ] [g.eclipse.smarthome.core.net.NetUtil] - Found multiple local interfaces - ignoring 192.168.1.93
2018-07-07 09:21:26.063 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at http://169.254.40.251:8080
2018-07-07 09:21:26.067 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at https://169.254.40.251:8443
2018-07-07 09:21:37.283 [INFO ] [thome.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007
2018-07-07 09:21:40.819 [INFO ] [basic.internal.servlet.WebAppServlet] - Started Basic UI at /basicui/app
2018-07-07 09:21:41.230 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
2018-07-07 09:21:41.397 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
2018-07-07 09:24:33.432 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Connecting to serial port '/dev/ttyUSB0'
2018-07-07 09:24:33.468 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Serial port is initialized
2018-07-07 09:24:33.483 [INFO ] [mmandclass.ZWaveSecurityCommandClass] - Update networkKey
2018-07-07 09:24:33.510 [INFO ] [ve.internal.protocol.ZWaveController] - Starting ZWave controller
2018-07-07 09:24:33.512 [INFO ] [ve.internal.protocol.ZWaveController] - ZWave timeout is set to 5000ms. Soft reset is false.
2018-07-07 09:24:36.816 [INFO ] [age.SerialApiGetInitDataMessageClass] - NODE 1: Node found
2018-07-07 09:24:36.819 [INFO ] [age.SerialApiGetInitDataMessageClass] - ZWave Controller using Controller API
2018-07-07 09:24:36.822 [INFO ] [age.SerialApiGetInitDataMessageClass] - ZWave Controller is Primary Controller
2018-07-07 09:24:36.824 [INFO ] [age.SerialApiGetInitDataMessageClass] - ------------Number of Nodes Found Registered to ZWave Controller------------
2018-07-07 09:24:36.827 [INFO ] [age.SerialApiGetInitDataMessageClass] - # Nodes = 1
2018-07-07 09:24:36.830 [INFO ] [age.SerialApiGetInitDataMessageClass] - ----------------------------------------------------------------------------
2018-07-07 09:26:49.467 [INFO ] [mmandclass.ZWaveSecurityCommandClass] - Update networkKey
2018-07-07 09:26:49.503 [WARN ] [age.RequestNetworkUpdateMessageClass] - RequestNetworkUpdate not placed on stack.
2018-07-07 09:26:52.505 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Stopped ZWave serial handler
2018-07-07 09:26:52.567 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Connecting to serial port '/dev/ttyUSB0'
2018-07-07 09:26:52.584 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Serial port is initialized
2018-07-07 09:26:52.589 [INFO ] [mmandclass.ZWaveSecurityCommandClass] - Update networkKey
2018-07-07 09:26:52.593 [INFO ] [ve.internal.protocol.ZWaveController] - Starting ZWave controller
2018-07-07 09:26:52.596 [INFO ] [ve.internal.protocol.ZWaveController] - ZWave timeout is set to 5000ms. Soft reset is false.
2018-07-07 09:26:59.597 [INFO ] [age.SerialApiGetInitDataMessageClass] - NODE 1: Node found
2018-07-07 09:26:59.600 [INFO ] [age.SerialApiGetInitDataMessageClass] - ZWave Controller using Controller API
2018-07-07 09:26:59.602 [INFO ] [age.SerialApiGetInitDataMessageClass] - ZWave Controller is Primary Controller
2018-07-07 09:26:59.603 [INFO ] [age.SerialApiGetInitDataMessageClass] - ------------Number of Nodes Found Registered to ZWave Controller------------
2018-07-07 09:26:59.605 [INFO ] [age.SerialApiGetInitDataMessageClass] - # Nodes = 1
2018-07-07 09:26:59.606 [INFO ] [age.SerialApiGetInitDataMessageClass] - ----------------------------------------------------------------------------
2018-07-07 09:26:59.737 [WARN ] [ve.internal.protocol.ZWaveController] - NODE 1: Restore from config: Error. Data invalid, ignoring config.
2018-07-07 09:27:00.838 [INFO ] [age.SerialApiGetInitDataMessageClass] - NODE 1: Node found
2018-07-07 09:27:00.842 [INFO ] [age.SerialApiGetInitDataMessageClass] - ZWave Controller using Controller API
2018-07-07 09:27:00.844 [INFO ] [age.SerialApiGetInitDataMessageClass] - ZWave Controller is Primary Controller
2018-07-07 09:27:00.846 [INFO ] [age.SerialApiGetInitDataMessageClass] - ------------Number of Nodes Found Registered to ZWave Controller------------
2018-07-07 09:27:00.850 [INFO ] [age.SerialApiGetInitDataMessageClass] - # Nodes = 1
2018-07-07 09:27:00.852 [INFO ] [age.SerialApiGetInitDataMessageClass] - ----------------------------------------------------------------------------
2018-07-07 09:27:00.863 [WARN ] [ve.internal.protocol.ZWaveController] - NODE 1: Attempting to add node that already exists
2018-07-07 09:27:04.622 [INFO ] [age.SerialApiGetInitDataMessageClass] - NODE 1: Node found
2018-07-07 09:27:04.624 [INFO ] [age.SerialApiGetInitDataMessageClass] - ZWave Controller using Controller API
2018-07-07 09:27:04.625 [INFO ] [age.SerialApiGetInitDataMessageClass] - ZWave Controller is Primary Controller
2018-07-07 09:27:04.627 [INFO ] [age.SerialApiGetInitDataMessageClass] - ------------Number of Nodes Found Registered to ZWave Controller------------
2018-07-07 09:27:04.629 [INFO ] [age.SerialApiGetInitDataMessageClass] - # Nodes = 1
2018-07-07 09:27:04.630 [INFO ] [age.SerialApiGetInitDataMessageClass] - ----------------------------------------------------------------------------
2018-07-07 09:27:04.637 [WARN ] [ve.internal.protocol.ZWaveController] - NODE 1: Attempting to add node that already exists
2018-07-07 09:27:09.648 [INFO ] [age.SerialApiGetInitDataMessageClass] - NODE 1: Node found
2018-07-07 09:27:09.662 [INFO ] [age.SerialApiGetInitDataMessageClass] - ZWave Controller using Controller API
2018-07-07 09:27:09.665 [INFO ] [age.SerialApiGetInitDataMessageClass] - ZWave Controller is Primary Controller
2018-07-07 09:27:09.667 [INFO ] [age.SerialApiGetInitDataMessageClass] - ------------Number of Nodes Found Registered to ZWave Controller------------
2018-07-07 09:27:09.670 [INFO ] [age.SerialApiGetInitDataMessageClass] - # Nodes = 1
2018-07-07 09:27:09.673 [INFO ] [age.SerialApiGetInitDataMessageClass] - ----------------------------------------------------------------------------
2018-07-07 09:27:09.683 [WARN ] [ve.internal.protocol.ZWaveController] - NODE 1: Attempting to add node that already exists
2018-07-07 09:27:14.669 [INFO ] [age.SerialApiGetInitDataMessageClass] - NODE 1: Node found
2018-07-07 09:27:14.672 [INFO ] [age.SerialApiGetInitDataMessageClass] - ZWave Controller using Controller API
2018-07-07 09:27:14.679 [INFO ] [age.SerialApiGetInitDataMessageClass] - ZWave Controller is Primary Controller
2018-07-07 09:27:14.682 [INFO ] [age.SerialApiGetInitDataMessageClass] - ------------Number of Nodes Found Registered to ZWave Controller------------
2018-07-07 09:27:14.684 [INFO ] [age.SerialApiGetInitDataMessageClass] - # Nodes = 1
2018-07-07 09:27:14.687 [INFO ] [age.SerialApiGetInitDataMessageClass] - ----------------------------------------------------------------------------
2018-07-07 09:27:14.701 [WARN ] [ve.internal.protocol.ZWaveController] - NODE 1: Attempting to add node that already exists
~~~
## Create a systemctl service around the container
Since I did not do things, in the right order, create the openhab account now on the PI
~~~
sudo useradd -r -s /sbin/nologin openhab
sudo usermod -a -G openhab rpiuser
sudo usermod -a -G openhab openhab
sudo chown -R openhab:openhab /opt/openhab
~~~
Check the uid and gid
~~~
grep openhab /etc/group
grep openhab /etc/passwd
~~~
Add the systemctl file
~~~
sudo cat /etc/systemd/system/openhab2.service
[Unit]
Description=openHAB 2
Requires=docker.service
After=docker.service
[Service]
Restart=always
ExecStart=/usr/bin/docker run --name=%n --net=host --tty \
-v /etc/localtime:/etc/localtime:ro \
-v /etc/timezone:/etc/timezone:ro \
-v /opt/openhab/conf:/openhab/conf \
-v /opt/openhab/userdata:/openhab/userdata \
-v /opt/openhab/addons:/openhab/addons \
-v /opt/openhab/.java:/openhab/.java \
--device=/dev/ttyUSB0 \
--device=/dev/ttyUSB1 \
-e EXTRA_JAVA_OPTS='-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyUSB1' \
-e USER_ID=998 \
-e GROUP_ID=998 \
openhab/openhab:2.3.0-armhf-debian
ExecStop=/usr/bin/docker stop -t 2 %n ; /usr/bin/docker rm -f %n
[Install]
WantedBy=multi-user.target
~~~
~~~
sudo systemctl enable openhab2.service
sudo systemctl daemon-reload
sudo systemctl start openhab2.service
~~~
~~~
sudo systemctl status openhab2.service
● openhab2.service - openHAB 2
Loaded: loaded (/etc/systemd/system/openhab2.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2018-07-07 20:21:42 UTC; 5min ago
Process: 17627 ExecStop=/usr/bin/docker rm -f openhab2.service (code=exited, status=0/SUCCESS)
Process: 17603 ExecStop=/usr/bin/docker stop -t 2 openhab2.service (code=exited, status=0/SUCCESS)
Main PID: 17638 (docker)
Tasks: 8 (limit: 4915)
Memory: 5.7M
CPU: 506ms
CGroup: /system.slice/openhab2.service
└─17638 /usr/bin/docker run --name=openhab2.service --net=host --tty -v /etc/localtime:/etc/localtime:ro -v /etc/timezone:/etc/timezone:ro -v /opt/openhab/conf:/openhab/conf -v /opt/openhab/userda
Jul 07 20:22:23 nas-pi docker[17638]: / __ \/ __ \/ _ \/ __ \/ /_/ / /| | / __ |
Jul 07 20:22:23 nas-pi docker[17638]: / /_/ / /_/ / __/ / / / __ / ___ |/ /_/ /
Jul 07 20:22:23 nas-pi docker[17638]: \____/ .___/\___/_/ /_/_/ /_/_/ |_/_____/
Jul 07 20:22:23 nas-pi docker[17638]: /_/ 2.3.0
Jul 07 20:22:23 nas-pi docker[17638]: Release Build
Jul 07 20:22:23 nas-pi docker[17638]: [2B blob data]
Jul 07 20:22:23 nas-pi docker[17638]: Hit '<tab>' for a list of available commands
Jul 07 20:22:23 nas-pi docker[17638]: and '[cmd] --help' for help on a specific command.
Jul 07 20:22:23 nas-pi docker[17638]: Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown openHAB.
Jul 07 20:22:23 nas-pi docker[17638]: [1B blob data]
~~~
#### Test reboot
To check the system, reboot the PI and log back in
~~~
sudo docker ps | grep openhab
d45de7379859 openhab/openhab:2.3.0-armhf-debian "/entrypoint.sh gosu…" 3 minutes ago Up 2 minutes openhab2.service
~~~
~~~
$ sudo journalctl -b -u openhab2.service
Jul 07 20:35:56 nas-pi systemd[1]: Started openHAB 2.
Jul 07 20:36:11 nas-pi docker[828]: ++ test -t 0
Jul 07 20:36:11 nas-pi docker[828]: ++ echo true
Jul 07 20:36:11 nas-pi docker[828]: + interactive=true
Jul 07 20:36:11 nas-pi docker[828]: + set -euo pipefail
Jul 07 20:36:11 nas-pi docker[828]: + IFS='
Jul 07 20:36:11 nas-pi docker[828]: '
Jul 07 20:36:11 nas-pi docker[828]: + '[' limited = unlimited ']'
Jul 07 20:36:11 nas-pi docker[828]: + rm -f /openhab/runtime/instances/instance.properties
Jul 07 20:36:11 nas-pi docker[828]: + rm -f /openhab/userdata/tmp/instances/instance.properties
Jul 07 20:36:11 nas-pi docker[828]: + NEW_USER_ID=998
Jul 07 20:36:11 nas-pi docker[828]: + NEW_GROUP_ID=998
Jul 07 20:36:11 nas-pi docker[828]: + echo 'Starting with openhab user id: 998 and group id: 998'
Jul 07 20:36:11 nas-pi docker[828]: Starting with openhab user id: 998 and group id: 998
Jul 07 20:36:11 nas-pi docker[828]: + id -u openhab
Jul 07 20:36:12 nas-pi docker[828]: + echo 'Create group openhab with id 998'
Jul 07 20:36:12 nas-pi docker[828]: Create group openhab with id 998
Jul 07 20:36:12 nas-pi docker[828]: + groupadd -g 998 openhab
Jul 07 20:36:12 nas-pi docker[828]: + echo 'Create user openhab with id 998'
Jul 07 20:36:12 nas-pi docker[828]: Create user openhab with id 998
Jul 07 20:36:12 nas-pi docker[828]: + adduser -u 998 --disabled-password --gecos '' --home /openhab --gid 998 openhab
Jul 07 20:36:13 nas-pi docker[828]: Warning: The home dir /openhab you specified already exists.
Jul 07 20:36:13 nas-pi docker[828]: Adding user `openhab' ...
Jul 07 20:36:13 nas-pi docker[828]: Adding new user `openhab' (998) with group `openhab' ...
Jul 07 20:36:14 nas-pi docker[828]: The home directory `/openhab' already exists. Not copying from `/etc/skel'.
Jul 07 20:36:14 nas-pi docker[828]: adduser: Warning: The home directory `/openhab' does not belong to the user you are currently creating.
Jul 07 20:36:14 nas-pi docker[828]: + groupadd -g 14 uucp2
Jul 07 20:36:14 nas-pi docker[828]: + groupadd -g 16 dialout2
Jul 07 20:36:15 nas-pi docker[828]: + groupadd -g 18 dialout3
Jul 07 20:36:15 nas-pi docker[828]: + groupadd -g 32 uucp3
Jul 07 20:36:15 nas-pi docker[828]: + groupadd -g 997 gpio
Jul 07 20:36:15 nas-pi docker[828]: + adduser openhab dialout
Jul 07 20:36:16 nas-pi docker[828]: Adding user `openhab' to group `dialout' ...
Jul 07 20:36:16 nas-pi docker[828]: Adding user openhab to group dialout
Jul 07 20:36:16 nas-pi docker[828]: Done.
Jul 07 20:36:16 nas-pi docker[828]: + adduser openhab uucp
Jul 07 20:36:16 nas-pi docker[828]: Adding user `openhab' to group `uucp' ...
Jul 07 20:36:16 nas-pi docker[828]: Adding user openhab to group uucp
Jul 07 20:36:16 nas-pi docker[828]: Done.
Jul 07 20:36:16 nas-pi docker[828]: + adduser openhab uucp2
Jul 07 20:36:17 nas-pi docker[828]: Adding user `openhab' to group `uucp2' ...
Jul 07 20:36:17 nas-pi docker[828]: Adding user openhab to group uucp2
Jul 07 20:36:17 nas-pi docker[828]: Done.
Jul 07 20:36:17 nas-pi docker[828]: + adduser openhab dialout2
Jul 07 20:36:17 nas-pi docker[828]: Adding user `openhab' to group `dialout2' ...
Jul 07 20:36:17 nas-pi docker[828]: Adding user openhab to group dialout2
Jul 07 20:36:17 nas-pi docker[828]: Done.
Jul 07 20:36:17 nas-pi docker[828]: + adduser openhab dialout3
Jul 07 20:36:17 nas-pi docker[828]: Adding user `openhab' to group `dialout3' ...
Jul 07 20:36:17 nas-pi docker[828]: Adding user openhab to group dialout3
Jul 07 20:36:17 nas-pi docker[828]: Done.
Jul 07 20:36:17 nas-pi docker[828]: + adduser openhab uucp3
Jul 07 20:36:18 nas-pi docker[828]: Adding user `openhab' to group `uucp3' ...
Jul 07 20:36:18 nas-pi docker[828]: Adding user openhab to group uucp3
Jul 07 20:36:18 nas-pi docker[828]: Done.
Jul 07 20:36:18 nas-pi docker[828]: + adduser openhab gpio
Jul 07 20:36:18 nas-pi docker[828]: Adding user `openhab' to group `gpio' ...
Jul 07 20:36:18 nas-pi docker[828]: Adding user openhab to group gpio
Jul 07 20:36:18 nas-pi docker[828]: Done.
Jul 07 20:36:18 nas-pi docker[828]: + case ${OPENHAB_VERSION} in
Jul 07 20:36:18 nas-pi docker[828]: ++ ls -A /openhab/userdata
Jul 07 20:36:18 nas-pi docker[828]: + '[' -z 'cache
Jul 07 20:36:18 nas-pi docker[828]: config
Jul 07 20:36:18 nas-pi docker[828]: etc
Jul 07 20:36:18 nas-pi docker[828]: jsondb
Jul 07 20:36:18 nas-pi docker[828]: logs
Jul 07 20:36:18 nas-pi docker[828]: tmp
Jul 07 20:36:18 nas-pi docker[828]: zwave' ']'
Jul 07 20:36:18 nas-pi docker[828]: ++ cmp /openhab/userdata/etc/version.properties /openhab/userdata.dist/etc/version.properties
Jul 07 20:36:18 nas-pi docker[828]: + '[' '!' -z ']'
Jul 07 20:36:18 nas-pi docker[828]: ++ ls -A /openhab/conf
Jul 07 20:36:18 nas-pi docker[828]: + '[' -z 'html
Jul 07 20:36:18 nas-pi docker[828]: icons
Jul 07 20:36:18 nas-pi docker[828]: items
Jul 07 20:36:18 nas-pi docker[828]: persistence
Jul 07 20:36:18 nas-pi docker[828]: rules
Jul 07 20:36:18 nas-pi docker[828]: scripts
Jul 07 20:36:18 nas-pi docker[828]: services
Jul 07 20:36:18 nas-pi docker[828]: sitemaps
Jul 07 20:36:18 nas-pi docker[828]: sounds
Jul 07 20:36:18 nas-pi docker[828]: things
Jul 07 20:36:18 nas-pi docker[828]: transform' ']'
Jul 07 20:36:18 nas-pi docker[828]: + chown -R openhab:openhab /openhab
Jul 07 20:37:01 nas-pi docker[828]: + '[' true == false ']'
Jul 07 20:37:01 nas-pi docker[828]: + exec gosu openhab ./start.sh
Jul 07 20:37:01 nas-pi docker[828]: Launching the openHAB runtime...
Jul 07 20:37:17 nas-pi docker[828]: [2B blob data]
Jul 07 20:37:17 nas-pi docker[828]: __ _____ ____
Jul 07 20:37:17 nas-pi docker[828]: ____ ____ ___ ____ / / / / | / __ )
Jul 07 20:37:17 nas-pi docker[828]: / __ \/ __ \/ _ \/ __ \/ /_/ / /| | / __ |
Jul 07 20:37:17 nas-pi docker[828]: / /_/ / /_/ / __/ / / / __ / ___ |/ /_/ /
Jul 07 20:37:17 nas-pi docker[828]: \____/ .___/\___/_/ /_/_/ /_/_/ |_/_____/
Jul 07 20:37:17 nas-pi docker[828]: /_/ 2.3.0
Jul 07 20:37:17 nas-pi docker[828]: Release Build
Jul 07 20:37:17 nas-pi docker[828]: [2B blob data]
Jul 07 20:37:17 nas-pi docker[828]: Hit '<tab>' for a list of available commands
Jul 07 20:37:17 nas-pi docker[828]: and '[cmd] --help' for help on a specific command.
Jul 07 20:37:17 nas-pi docker[828]: Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown openHAB.
Jul 07 20:37:17 nas-pi docker[828]: [1B blob data]
~~~
## Conclusion
- Installation could not proceed further without solving the ZWave SUC Controller aspect.
- Not willing to break my Lowe's IRIS based network yet and wanted to used Raspberry PI as a SUC Controller (see other post)
- Also need to understand how to create persistency volume in Kubernetes in the PI Cluster (see other post)
- Will be able to remove the dedicated the systemctl services since Kubernetes will control thoses.
## Links and Repos
- [Link1](https://community.openhab.org/t/running-openhab-2-in-docker/14267)
- [Link2](https://docs.openhab.org/installation/docker.html)
- [GitHUB associated repo](https://github.com/jbrette/openhab-helm)