CM3-Home

TP-BUS interface and KNXD daemon

This article explains how to install the knxd daemon on a CM3-Home and use it with the TP-BUS interface.

KNXD project

Tested with a standard Raspbian Stretch Lite - November 2017

Warning: CM3-Home is not a certified KNX controller !
An open hardware is implemented on it so we can't warranty the fully functionality with any KNX devices

In this article we will control a KNX relay PLANA 1453 made by Vimar wired as shown below. The relay address was already configured.

Compiling KNXD from sources

Install the following packages:

sudo apt-get install git-core build-essential
sudo apt-get install debhelper libsystemd-dev dh-systemd libev-dev

Clone the knxd repository on GitHub:

git clone https://github.com/knxd/knxd.git

Build knxd:

cd knxd
dpkg-buildpackage -b -uc

Install the package:

cd ..
sudo dpkg -i knxd_*.deb knxd-tools_*.deb

Setup

The default installation will install two services:

  • knxd.service
  • knxd.socket

In this example we will not use knxd.socket so disable it by typing:

sudo systemctl disable knxd.socket

Remove the actual contents of /lib/systemd/system/knxd.service with this contents:

[Unit]
Description=KNX Daemon
After=network.target

[Service]
EnvironmentFile=/etc/default/knxd
ExecStart=/usr/bin/knxd $KNXD_OPTIONS
User=root
Group=root
Type=simple

Restart=always
RestartSec=10
StartLimitIntervalSec=0

[Install]
WantedBy=multi-user.target network-online.target

Remove the actual contents of /etc/default/knxd with this contents:

KNXD_OPTIONS="--eibaddr=1.1.128 --client-addrs=1.1.129:1 -d -D -T -R -S -i --listen-local=/tmp/knx -b tpuarts:/dev/ttyAMA0"

Reload systemd in order to detect the new service definitions:

sudo systemctl daemon-reload

Let's try to control the KNX relay

Open and SSH session and launch the follow command to check what is the messages sent:

knxtool busmonitor1 ip:localhost

Open a second SSH session and type:

Relay ON:

knxtool on ip:localhost 1/6/105

Relay OFF:

knxtool off ip:localhost 1/6/105

Links

eShop

EUR 330.00


CM3-HOME-F - CM3-Home board full edition

CM3-Home board full edition

| Product description || CM3-Home catalog |

Author:
Sergio Tanzilli - tanzilli@acmesystems.it
http://www.tanzolab.it - http://www.tanzilli.com - https://github.com/tanzilli
Author:
Guido Ottaviani - guido@guiott.com
http://www.guiott.com - https://github.com/guiott