KNX

From ago control wiki
Jump to: navigation, search

Contents

Warning - parts of this doc are obsolete

The mirror now provides "knxd", the successor of eibd. You don't need to create a devices.xml anymore. Just export the GA list from ETS4 as xml and import that with the new protocol wizard in agocontrol. Then you can create devices and assign group addresses to the specific functions.

Dependencies

agoknx depends on eibd. You can install the original debian packages after adding the following to the sources.list:

deb http://www.auto.tuwien.ac.at/~mkoegler/debian/ eib main

We also provide packages on the ago control mirror. They are compiled without java and with the "only eibd" setting.

Package

Install the "agocontrol-knx" package.

Configuration

eibd connection

You can specify a connection URL for eibd with the following /etc/opt/agocontrol/conf.d/knx.conf snippet:

[knx]
url=ip:127.0.0.1:6720

This is already set as default when no setting is done via the config file.

Device configuration

The device configuration is done via a XML file named "/etc/opt/agocontrol/knx/devices.xml". You can override the path with a "devicesfile=..." entry in the /etc/opt/agocontrol/conf.d/knx.conf . This XML file defines the mapping between group addresses (GA) and ago control devices. The mapping is done like this:

<devices>
  <device uuid="5e4c10c2-05ab-46eb-ad9d-4dc39f4d4913" type="switch">
	<ga type="onoff">0/0/101</ga>
	<ga type="onoffstatus">0/0/102</ga>
  </device>
  <device uuid="4b568cb7-26be-4486-ad7e-0a16f9915162" type="drapes">
	<ga type="onoff">0/0/33</ga>
	<ga type="setlevel">0/0/32</ga>
	<ga type="levelstatus">0/0/31</ga>
	<ga type="stop">0/0/34</ga>
  </device>
  <device uuid="c2a3628b-5da3-4c7a-a926-aae2218baa74" type="dimmer">
	<ga type="onoff">0/4/0</ga>
	<ga type="setlevel">0/7/0</ga>
	<ga type="levelstatus">0/6/10</ga>
  </device>
  <device uuid="b7e9ac90-032c-45e2-969d-382f84f3de11" type="multilevelsensor">
	<ga type="temperature">3/0/0</ga>
  </device>
  <device uuid="26f43f6e-3b4c-43ad-ba57-8e88102d2680" type="multilevelsensor">
        <ga type="brightness">3/0/1</ga>
  </device>
  <device uuid="a8d8a6da-097d-40f1-a655-9bb917e7d491" type="binarysensor">
        <ga type="binary">3/0/1</ga>
  </device>
  <device uuid="a8fa5922-f8c0-43fe-8257-2cf9c8209e14" type="multilevelsensor">
	<ga type="energy">4/1/2</ga>
  </device>
  <device uuid="ff13c8d5-98c7-4b6e-b88f-3e543cfe963a" type="multilevelsensor">
	<ga type="energyusage">4/7/2</ga>
  </device>

</devices>

Installing and Starting eibd

Just install eibd package:

apt-get install eibd-server

When you want to use a local eibd instance, you need to start it first. These are quite common options for an IP KNX interface (assuming 1.2.3.4 for its address):

eibd -D -T -R -S -i -u ipt:1.2.3.4

You might also want to consider enabling group cache functionality. Just add the "-c" (or --GroupCache) flag to the eibd daemon to enable caching of group communication network state.

IMPORTANT! If you're loosing telegrams (e.g. when sending a lot of telegrams via scenario) then add the following switch:

--no-tunnel-client-queuing

This is needed for Weinzierl IP interfaces (and OEM variants like MDT)

eibd systemd startup

If you want to run eibd as a systemd service you need to create following files. We need to check how to run eibd as non-root user in future.

/etc/eibd.conf

# config file for eibd
EIBD_OPTS="-D -T -R -S -i -u ipt:1.2.3.4"

/lib/systemd/system/eibd.service

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

[Service]
EnvironmentFile=/etc/eibd.conf
ExecStart=/usr/bin/eibd -d -p /var/run/eibd.pid $EIBD_OPTS
Type=forking
PIDFile=/var/run/eibd.pid

[Install]
WantedBy=multi-user.target

/lib/systemd/system/eibd.socket

[Unit]
Conflicts=eibd.service

[Socket]
ListenDatagram=6720

[Install]
WantedBy=sockets.target

start the service

systemctl start eibd.service

enable the eibd service at startup

systemctl enable eibd.service

starting agoknx

You can start agoknx via systemctl:

systemctl start agoknx.service

Don't forget to enable it when it shall start automatically on reboot:

systemctl enable agoknx.service
Personal tools