Skip to main content

Home Assistant, OpenHAB, Node-RED, ioBroker, MotionEye Containerized (Podman)

Siem Reap, Cambodia

Installation through Podman on CentOS8

Home Assistant

podman pull homeassistant/home-assistant:stable
mkdir -p /opt/homeassistant/{config}
chmod -R 775 /opt/homeassistant
podman run -d --rm --privileged --net=host --name='home-assistant' -e 'TZ=Europe/Berlin' -v /opt/homeassistant/config:/config homeassistant/home-assistant:stable

There seems to be an issue with Podman - or the way I am using it. I have to run the container privileged to be able to write to the volume. Google did not help me solve this 'issue', yet.

podman start home-assistant
podman stop home-assistant

Node-RED

podman pull nodered/node-red
mkdir -p /opt/nodered/{data}
chmod -R 775 /opt/nodered
chown 1000:1000 -R /opt/nodered
podman run -d --rm --privileged --net=host -v /opt/nodered/data:/data --name nodered nodered/node-red
podman start nodered
podman stop nodered

Theming

cd /opt/nodered/data
npm install @node-red-contrib-themes/midnight-red

Add the following to the editorTheme section of your settings.js:

editorTheme: {
projects: {
// To enable the Projects feature, set this value to true
enabled: false
}
}

Change to ->

// Customising the editor
editorTheme: {
page: {
css: '/opt/nodered/data/node_modules/@node-red-contrib-themes/midnight-red/theme.css'
}
}

OpenHAB

groupadd -g 9001 openhab
useradd -g 9001 openhab
usermod -a -G openhab myownuser
mkdir -p /opt/openhab/{openhab_addons,openhab_conf,openhab_userdata}
chmod -R 775 /opt/openhab
podman run \
--name openhab \
--net=host \
--privileged \
--rm \
-v /etc/localtime:/etc/localtime:ro \
-v /opt/openhab/openhab_addons:/openhab/addons \
-v /opt/openhab/openhab_conf:/openhab/conf \
-v /opt/openhab/openhab_userdata:/openhab/userdata \
-d \
openhab/openhab:latest

OpenHAB CLI

docker exec -it openhab
/openhab/runtime/bin/client -p habopen

Updating the Image

Use the following steps to update the docker image and all installed add-ons.

Stop the container:

docker stop openhab

Delete the container:

docker rm openhab

Delete the contents of /opt/openhab/userdata/cache and /opt/openhab/userdata/tmp

rm -rf /opt/openhab/userdata/cache
rm -rf /opt/openhab/userdata/tmp

Pull down the latest image:

docker pull openhab/openhab:`latest`

Restart the container using the full command above.

ioBroker

podman pull iobroker/iobroker:latest

And and run it:

podman run \
--net=host \
--privileged \
--rm \
--name iobroker \
-v /opt/iobroker:/opt/iobroker \
-v /opt/iobroker/home:/home/iobroker \
--detach=true \
iobroker/iobroker:latest

MotionEye

podman pull ccrisan/motioneye:master-amd64

And and run it:

podman run --name='motioneye' \
--net=host \
--privileged \
--rm \
--hostname='motioneye' \
-v /etc/localtime:/etc/localtime:ro \
-v /opt/motioneye:/etc/motioneye \
-v /opt/motioneye/lib:/var/lib/motioneye \
--security-opt label=disable \
--detach=true \
ccrisan/motioneye:master-amd64