Fixed: Openhab2 docker container (homematic plugin) pivccu connection

My configuration:
RPi 1:

  • raspbian stretch
  • docker -> openhab2 -> homematic plugin

RPi 2:

  • raspbian stretch
  • pivccu with xml rpc api

My problem is, that the homematic plugin doesn’t connect to the pivccu (“Offline”) . I thing I tried every useful combination of ip-addresses in the configuration dialog of the homematic plugin without success.

My question is, does openhab docker installation work with pivccu? Is it a problem of how the docker container is created? I’m thinking about the callbacks, …

Thanks in advance …

If it uses callbacks that could be the problem. Are you using --net=host or are you using the -p option to expose each port individually?

I don’t know Homematic and have never heard of pivccu so won’t be much help there, but if pivccu needs to connect to a port on OH, that port needs to be open and exposed from the container.

The background:
First I tried to run homematic ccu2 in a docker container (https://github.com/angelnu/docker-ccu2). This didn’t work at all.
Then I started with the pivccu in a lxe container (https://github.com/alexreinert/piVCCU). This works well with homematic and homematic-ip components.

Currently I’m using:

docker run \
--name openhab \
--net=host \
--tty \
-v /etc/localtime:/etc/localtime:ro \
-v /etc/timezone:/etc/timezone:ro \
-v openhab_addons:/openhab/addons \
-v openhab_conf:/openhab/conf \
-v openhab_userdata:/openhab/userdata \
-d \
--restart=always \
openhab/openhab:2.3.0-armhf-debian

Everything seems to works well. Only the openhab homematic plugin failes.

Next I will give this a try:

docker run \
--name openhab 
--tty 
--restart always \
-p 8080:8080 -p 8443:8443 -p 2000:2000 -p 2001:2001 -p 2010:2010 \
-p 8701:8701 -p 8181:8181 -p 9292:9292 -p 9125:9125 -p 9126:9126 \
-p 43439:43439/udp \
-v /etc/localtime:/etc/localtime:ro \
-v /etc/timezone:/etc/timezone:ro \
-v /70_docker/30_openhab/conf:/openhab/conf \
-v /70_docker/30_openhab/userdata:/openhab/userdata \
-v /70_docker/30_openhab/addons:/openhab/addons \
-d \
openhab/openhab:2.3.0-armhf-debian

This docker start command seems to be ok:

docker run
–name openhab
–net=host
–tty
-v /etc/localtime:/etc/localtime:ro
-v /etc/timezone:/etc/timezone:ro
-v openhab_addons:/openhab/addons
-v openhab_conf:/openhab/conf
-v openhab_userdata:/openhab/userdata
-d
–restart=always
openhab/openhab:2.3.0-armhf-debian

After uninstalling the plugin, restarting openhab and installing the plugin again the connection is successful and things are recognized.