I run HA container with a ZWaveJS2MQTT container and Aeotec Gen 5 ZWave stick all on a Synology DS1515+ running DSM 6.2.4-25556 Update 6. Yes it was a huge learning curve, but I have a system that works. You do not need an RPi4, but for those who want a very simple “click, click, done” install, HAOS and an RPi4 or similar device is the route to go.
First thing I can recommend with your Synology if not done already is enable SSH in the control panel. Second thing I recommend is DO NOT update to DSM 7.0+. If you update to DSM 7.0+ then that’s where you need to go on the hunt for USB drivers for your device to make them work with DSM to pass through to the docker container. The alternative is to install a Virtual Machine of HAOS through the DSM Package Virtual Machine Manager. But that is a topic covered in another thread in the forums.
Enabling SSH on your Synology will help with advanced configuration of the docker containers. You will want to learn how to build your own docker create
and docker run
commands or learn docker compose where you put your container build configuration into a file then use ssh to take down and rebuild a container (especially useful when updating). I use just regular create and run commands. I do not use docker compose. I keep a text file with my commands so I don’t have to remember them or keep building them every time I want to update a container.
You will need to know what port the USB stick shows up as on your NAS. it could be either /dev/ttyACM0
or /dev/ttyUSB0
and the number could change every time you unplug the device and plug it back in. You also need to make sure the container has R/W privileges by either using the docker -privileged
flag (warning: this lets the container have access to the entire DSM subsystem including but not limited to the drives themselves) or doing a chmod 777
on the device port.
Now that you have some of the basics down, you’ll need to now look at the install instructions for each individual container. ZWaveJS2MQTT needs some specific setup to get the container to recognize the USB device, but then there’s also some configuration from the frontend to enable things like S2 security and the ZWave network. Thankfully getting HA Container up and running is a little more straight forward.
Here are the docker create
commands I use. I’ll break down each one with what each part means.
ZWaveJS2MQTT
sudo docker create --name=zwavejs2mqtt --restart always -v /volume1/docker/zwavejs2mqtt/config:/usr/src/app/store -v /etc/localtime:/etc/localtime:ro -e TZ=America/Chicago --device=/dev/ttyACM10:/dev/zwave -p 8091:8091 -p 3000:3000 zwavejs/zwavejs2mqtt:latest
sudo docker create
- create command, run as root
--name=zwavejs2mqtt
- name the container
--restart always
- always restart the container if it shuts down unexpectedly or when the host (DSM) restarts
-v host/source/path:container/destination/path
- used to map specific files and folders between host and container. Necessary to save configurations when updating containers or deleting a container and recreating it
-v /etc/localtime:/etc/localtime:ro
and -e TZ=America/Chicago
- synchronizes local time (read only mode) with container and sets the container time zone
--device=/dev/ttyACM10:/dev/zwave
- maps my USB device to the container. see my comments why I use port 10 here: Aeotec Z-wave stick Gen5 on Synology installation - #60 by squirtbrnr
-p ####:####
- publish command to map the container ports to the host. alternative to using --net=host
if you don’t want the container and the host network to have full access. works like port forwarding
zwavejs/zwavejs2mqtt:latest
- specify the container image to use. If it doesn’t exist locally, find and download it from the repository
Home Assistant
sudo docker create --name=homeassistant --restart unless-stopped -v /var/run/docker.sock:/var/run/docker.sock -v /usr/syno/etc/certificate:/certificate:ro -v /etc/localtime:/etc/localtime:ro -v /volume1/docker/homeassistant/config:/config -v /volume1/docker/homeassistant/ssh:/root/.ssh -e TZ=America/Chicago --net=host homeassistant/home-assistant:2022.8.7
as you can see, the command is similar, but more simple than the ZWaveJS2MQTT container creation. I let the container auto restart unless I specifically shut it down myself. I still map volumes to save my config files, and I set the time zone, but I let HA use the host network so it can do discovery of new devices and integrations.
You have to make sure the mapped volumes, folder, and files exist on the host before you can start the container, otherwise docker run
will fail and errors will be logged. You should not need to worry about permissions of the folders and files on the host as the container will adjust and create the necessary files accordingly.
Follow the above and you will have two containers, one for ZWave management, and one for Home Assistant. Then it’s a matter of configuring each application to talk to the other as well as connect your existing ZWave devices. Those setup steps are found in the install instructions for the respective application. And of course, issue the command sudo docker run <container_name>
to start the container you created.