Since I loved the additional features added by @jens-maus in (RaspberryMatic)[https://github.com/jens-maus/RaspberryMatic] I had been ussing some of his work here. In order to get the "full thing" he and I have merged the functions in this repo: see (RaspberryMatic)[https://github.com/jens-maus/RaspberryMatic/issues/786]. Features:
Migration:
Therefore I do not longer plan to keep updating this repository. If you believe that there are resons for a vanilla official CCU as container please open an issue here. If I do not hear any requests in 1 month I will set this repo in read-only mode.
Homematic CCU firmware running as docker container on arm and (emulated) x86.
This project downloads the Homematic CCU2 firmware and re-package it as docker image. You can then start it on your raspi. Other ARM-based boards might also work (see Dependencies section). You can deploy on x86 but it will be slow and some components fail. I am working on a true multi-arch docker container for this.
An automated build pushes new docker images to Docker Hub. You can check there the available versions.
Support for CCU2 has been removed from the HEAD. Please checkout the ccu2 branch if you need to build the CCU2 images. There is also another Docker Hub repository with old CCU2 images.
cp210x
which is available in most Linux systems. The deploy.sh
will add a udev rule to enable it automatically when plugged.deploy.sh
script will try to install the pivccu packages for you. If it does not work please follow these instructions to install pivccu-modules-dkms
, pivccu-devicetree-armbian
(if you are on Armbian) and pivccu-modules-raspberrypi
(if you use a Raspberry with Raspbian). You do not need to install a network bridge since docker manages that.cp -a settings.template settings
and edit settings.template
sudo ./deploy.sh
MAYOR_CCU_VERSION=2
to deploy a CCU2 firmware. See settings.template for all available optionsAfter the above steps you can connect to the docker ps ccu
you can see its status.
This is only needed if you do not use the already built docker container.
cp -a settings.template settings
and edit settings.template
sudo ./build.sh
git pull
./pull.sh
./deploy.sh
Optionally you can use the _CCUVERSION variable to select a particular version.
Your CCU settings will be preserved.
You can move your settings from an existing CCU into the docker CCU, either via ssh or using the native backup/restore support in the CCU (recommended).
If you use a HM-MOD-RPI-PCB and the Homematic is not working after restoring the backup then likely your old system was running without compatibility with Homematic IP. You need to use the new dual-stack mode. The easiest way to achieve that is to execute the following command: docker exec ccu sh -c "rm /etc/config/rfd.conf && /etc/init.d/S61rfd restart && cat /etc/config/rfd.conf"
. After this please check that Improved Coprocessor Initialization = true
.
Please notice that this method does not support switch HW versions: to update from HW CCU2 to docker CCU you need to use the UI
sudo ./undeploy.sh
rsync -av \[your CCU IP\]/usr/local/* /var/lib/docker/volumes/ccu_data/_data/
./deploy.sh
You can deploy this docker container into a docker cluster with Kubernetes or Docker Swarm. This allows a High Available configuration where the home automation can stay up in the event of HW dying. This is usefull considering that a Raspberry is cheap so you should not depend on a single one to ensure your house stays warm ;-) .
You can check this example of a high available deployment. There I keep the configuration into a cluster persistent volume (glusterfs) so if one of computers is down then the CCU is "just" redeployed automatically into another available computer.
You can also deploy this docker image to a docker swarm. For this you need to:
_/media/glusterfs/ccu_
swarm
--constraint node.labels.architecture==arm
./deploy.sh