Tested with Raspberry Pi OS Release date: January 11th 2021
In this article we will control a KNX relay PLANA 1453 made by Vimar wired as shown below. The relay address was already configured.
sudo apt update
sudo apt install knxd-tools
Comment this line in /etc/knxd.conf:
# KNXD_OPTS="-e 0.0.1 -E 0.0.2:8 -u /tmp/eib -b ip:"
and add this line in order to use the KNX port available on the CM3-Home board:
KNXD_OPTS="-e 1.1.128 -E 1.1.129:1 -u /tmp/eib -b tpuarts:/dev/ttyAMA0"
Change the User and Group from knxd to root on /lib/systemd/system/knxd.service:
[Unit]
Description=KNX Daemon
After=network.target knxd.socket
Requires=knxd.socket
[Service]
EnvironmentFile=/etc/knxd.conf
ExecStart=/usr/bin/knxd $KNXD_OPTS
#User=knxd
#Group=knxd
User=root
Group=root
Type=notify
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target network-online.target
Also=knxd.socket
then reload the systemd definitions:
sudo systemctl daemon-reload
and restart the knxd daemom:
sudo systemctl restart knxd.service
In case of errors check the log messages by typing:
journalctl -f -u knxd
Relay ON:
knxtool on ip:localhost 1/6/105
Relay OFF:
knxtool off ip:localhost 1/6/105