In a previous post I showed how I installed domoticz in a docker container using the documentation on the WIKI.
Since I now need to start using domoticz for ‘real’ (since the razberry daughterboard on my ‘production’ PI seems to have died on me) I wanted to update the container with the latest version. Although I no longer have to do the two part install (see my previous post) I searched for an alternative which would be simpler to use and also up-to-date. That is when I came across the linux server.io site which also has a domoticz image available. I tried to install that and it all seems a lot simpler than the one from Joshuacox. Well at least for a domoticz/docker beginner like me!
Since I am using docker on a Raspberry PI3 I needed the ARM version of the domoticz image which can be found here.
As I mentioned in my previous post I already have a mount to my NAS in which I want to store my domoticz data. The mount on the PI is
After removing the old domoticz container and images and cleaning up the mapped config folder on the NAS, I then installed the new domoticz instance.
sudo docker run --name=domoticz \ --restart unless-stopped \ -d \ -t \ -p 1443:1443 \ -p 6144:6144 \ -p 8080:8080 \ -v /home/pi/dockerdata/domoticz:/config \ -e TZ=Europe/Amsterdam \ --device=/dev/ttyUSB0 \ lsioarmhf/domoticz
I no longer use the –privileged flag now because it’s more secure. Mapping the USB device seems to work just as fine.
After starting the container I checked the running domoticz instance on
Unfortunately domoticz seemed not to be running. After inspecting the container logs, it turned out that an SSL key was generated for domoticz so it could be accessed using SSL. However, generating such a key on a Raspberry PI 3 takes quite a long time (in my case it took about 30-45 minutes!).
After I drank a nice cup of tea, and such…, domoticz was finally up.
So I now can start to reset all my ZWave nodes (since they can’t be removed from a dead ZWave controller) and include the in my new ZWave ‘production’ environment.
On the domoticz WIKI is a page on how to install domoticz in a docker container. You can find it here.
There were however some items on that page, ‘cat cid’ and ‘pwd’ I did not quite understand being a newcomer in Docker. For those that have come accross the same issue here is what I did to get it running (mainly copying stuff from the WIKI page).
I already have a mount to my NAS in which I want to store my domoticz data. The mount on the PI is
I created a folder called domoticz in dockerdata to store the data from domoticz
Now we have to start a first instance of domoticz from which we can copy the config files. I haven’t got a clue why this process needs two steps and two containers, but I’ll stick to the manual because I don’t know what else to do 🙂
So to run the first container
sudo docker run --name=domoticz \ --privileged \ --cidfile="cid" \ -d \ -t \ -p 8080:8080 \ joshuacox/mkdomoticz:arm
We can now copy the config files from the running container into our created domoticz folder
sudo docker cp domoticz:/config /home/pi/dockerdata/domoticz
Now this container is no longer used and can be removed
sudo docker stop domoticz sudo docker rm domoticz
And we can finally create our ‘real’ domoticz container using the created config folder. Please note that I included an extra parameter to set the timezone correctly in the domoticz container.
sudo docker run --name=domoticz \ --privileged \ -d \ -t \ -p 8080:8080 \ -v /home/pi/dockerdata/domoticz:/config \ -e TZ=Europe/Amsterdam \ joshuacox/mkdomoticz:arm
And we are done. You can check the running domoticz instance on
After having used the Razberry on the Raspberry PI for quite some time now, I am growing tired of having to power cycle the PI every month of so because the Razberry stops working. Also the API to the Razberry has changed several times which forces me to change my software as well or to keep working with an older no longer supported API.
So I have decided to move away from the Razberry and use the Aeon Labs Z-Stick (gen-2) on a new PI 3. It seems that the Z-Stick solution is much more stable. If this works the way I hope I perhaps might migrate to a gen-5 Z-Stick as well. But since I already have a Gen-2 let’s use that to start with.
I am thinking about using Domoticz for its integrated Open ZWave library support to control my ZWave network. Since all of my domotica uses MQTT for communication I might use the MQTT possibilities of Domoticz too.
I will do some experimenting on this first before deciding to use Domoticz or perhaps some other Open ZWave implementation. Or even build my own MQTT gateway using the Open ZWave library.
Perhaps I will share some posts on how to get that working or how it turns out to work (or not).