Skip to content
/ piVCCU Public
forked from alexreinert/piVCCU

piVCCU is a project to install the original Homematic CCU2 firmware inside a virtualized container (lxc) on ARM based single board computers.

License

Notifications You must be signed in to change notification settings

masetho/piVCCU

Repository files navigation

piVCCU

piVCCU is a project to install the original Homematic CCU2 firmware inside a virtualized container (lxc) on ARM based single board computers.

Goals

  • Option to run CCU2 and other software parallel on one device
  • Usage of original CCU2 firmware (and not OCCU)
  • As compatible as possible with original CCU2
  • Full Homematic and Homematic IP support on all supported platforms
  • Support for backup/restore between piVCCU and original CCU2 without modification
  • Easy to install and update with apt
  • Support not only on Raspberry

Prequisites

  • Supported Single Board Computer
    • Raspberry Pi 2 or 3 running Raspbian Jessie or Stretch
    • Asus Tinkerboard running Armbian with Mainline kernel (Experimental)
  • Properly installed HM-MOD-RPI-PCB

Pre-prepared sd card images

You can find pre-prepared sd card images here. They are identical to the original distribution lite or server images but have piVCCU already installed like it is described below. Login to Raspbian based images using user 'pi' and password 'raspberry'. Login to Armbian based images using user 'root' and password '1234'.

Manual installation

Updating piVCCU to latest version

Use the normal apt based update mechanism:

sudo apt update && sudo apt upgrade

Migration from other systems

  • Original CCU2

    Just restore a normal system backup using the CCU web interface

  • RaspberryMatic

    1. Restore a normal system backup using the CCU web interface
    2. Reinstall all addons using the CCU web interface
  • YAHM 0. Create full backup of your SD card

    1. Create system backup using CCU web interface
    2. Remove YAHM on the host
      sudo lxc-stop -n yahm
      sudo rm -f /etc/bash_completion.d/yahm_completion
      sudo rm -f /etc/init.d/hm-mod-rpi-pcb
      
      sudo rm -rf /opt/YAHM
      sudo rm -rf /var/lib/lxc/yahm
      
      sudo sed -i /boot/config.txt -e '/dtoverlay=pi3-miniuart-bt/d'
      sudo sed -i /boot/config.txt -e '/dtoverlay=pi3-miniuart-bt-overlay/d'
      sudo sed -i /boot/config.txt -e '/enable_uart=1/d'
      sudo sed -i /boot/config.txt -e '/force_turbo=1/d'
      
      sudo sed -i /etc/modules -e '/#*eq3_char_loop/d'
      sudo sed -i /etc/modules -e '/#*bcm2835_raw_uart/d'
    3. Install piVCCU as described above
    4. Restore the system backup using the CCU web interface
    5. Remove YAHM specific configuration stuff
      sudo systemctl stop pivccu.service
      
      sudo rm -f /var/lib/piVCCU/userfs/etc/config/no-coprocessor-update
      sudo sed -i /var/lib/piVCCU/userfs/etc/config/rfd.conf -e 's/Improved Coprocessor Initialization = false/Improved Coprocessor Initialization = true/'
      sudo sed -i /var/lib/piVCCU/userfs/etc/config/multimacd.conf -e 's/bcm2835-raw-uart/mxs_auart_raw.0/'
      
      sudo systemctl start pivccu.service

Using CUxD and USB devices

  1. Starting with package build 16 You can find available devices on the host using

    sudo pivccu-device listavailable
  2. Create a hook script on the host

    bash -c 'echo "#!/bin/bash" > /etc/piVCCU/post-start.sh'
    sudo chmod +x /etc/piVCCU/post-start.sh
  3. For each device add an entry to this hook file, e.g. here for /dev/ttyUSB0

    bash -c 'echo "pivccu-device add /dev/ttyUSB0" >> /etc/piVCCU/post-start.sh'
  4. The devices will now be available inside the container, just use them like it is described in the CUxD documentation

Build packages by your own

If you like to build the .deb package by yourself

  • Use Ubuntu 16.04 as build system
  • Install prequisites tbd
  • Clone source
  • create_*.sh are the scripts to build the deb packages
  • Deploy the .deb files to an apt repository e.g. using reprepro

Donations Donate

Please consider sending me a donation to not only help me to compensate for expenses regarding piVCCU, but also to keep my general development motivation on a high level. So if you want to donate some money please feel free to send me money via PayPal.

License

piVCCU itself – the source files found in this git repository – are licensed under the conditions of the Apache License 2.0. The kernel module source files (folder kernel) and the generated kernel .deb files (raspberrypi-kernel-pivccu) licensed under the GPLv2 license instead. The generated CCU container .deb files (pivccu) are containing the original CCU2 firmware, containing multiple different licenses. Please refer to eQ-3 for more information.

Acknowledgement

The base idea of piVCCU is inspired by YAHM and lxccu.

About

piVCCU is a project to install the original Homematic CCU2 firmware inside a virtualized container (lxc) on ARM based single board computers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 61.8%
  • Shell 19.7%
  • C++ 17.6%
  • Other 0.9%