Hi,
as an alternative to knxd the calimero project also supplies an KNXnet/IP server.
The calimero server is based on Java so you have to ensure that the device which should host the server has enough CPU/RAM. A Raspberry Pi or Orange Pi PC should be sufficient.
I’ve written a script which do all necessary tasks to get the server running.
The requirements:
- A running Debian 10 installed, i.e. raspbian (Raspberry Pi) or armbian (Orange Pi),
- A TPUART modul as descripted here is connected. PCB and schematic
- You can also use KNX USB devices or an IP Tunnel connection but I have not tested it yet. Any experiences or feedback are welcome.
What the script does:
- Recognition on which platform the script runs
- Setup the serial device depending on the platform
- Gets all sources for calimero server and –tools from github
- Complies all sources
- Patches calimero server to run in background(detached stdin)
- Installs binaries to /opt/calimero-server
- Moves/installs config files to /etc/calimero
- Alters config to use a TPUART Module
- Adds 8 KNX Client Addresses
- Sets the Servername
- Creates a user and group knx under which the server runs
- Adds a systemd service knx.service
- Installs calimero tools and a wrapper script knxtools to /usr/local/bin
- New: The script can configure calimero to use a KNX USB device or a Tunnel connection
To install calimero KNXNet/IP server download the script. In the header adjust the variables
- KNX_ADDRESS
- KNX_CLIENT_ADDRESS_START
- LISTEN_NETWORK_INTERFACE
- KNX_SERVER_NAME
- ….
to your needs and run it as root. It can configure calimero server for using TPUART- or KNX USB device and for establish a Tunnel connection. To use a TPUART Module start the script without a parameter
michael@debdev ~ # sudo su - root@debdev ~ # wget https://michlstechblog.info/blog/download/shell_scripts/calimero_2.sh root@debdev ~ # bash calimero_2.sh
For the use of the first found USB Device:
root@debdev ~ # bash calimero_2.sh usb
To establish a tunnel connection to 192.168.56.200 start it with:
root@debdev ~ # bash calimero_2.sh tunnel 192.168.56.200
After script has finshed. Reboot your device. The calimero server starts automatically at boot.
The location of the config file is /etc/calimero/server-config.xml
Some basic checks after reboot
Check if the java process is running
root@debdev ~ # ps ax|grep tuwien.auto.calimero.server.Launcher 429 ? Ssl 0:04 /usr/bin/java -cp /opt/calimero-server/* tuwien..........
Check systemd log
root@debdev ~ # journalctl -xu knx java[429]: 19:02:45:852 WARN calimero.server - network interface eth0 not found, using system default java[429]: 19:02:47:090 INFO calimero.server - KNXnet/IP discovery network interfaces: listen on [all], send on [all] java[429]: 19:02:47:127 INFO calimero.server - Service container '/dev/ttyS0': java[429]: listen on any, KNXnet/IP routing multicast group 224.0.23.12 java[429]: tpuart connection: TP1 medium, device 3.1.0 java[429]: Group address filter [] java[429]: 19:02:47:178 INFO calimero.server - connect to /dev/ttyS0 java[429]: 19:02:47:378 INFO calimero.serial.tpuart:/dev/ttyS0 - setup serial port: baudrate 19200, even parity, 8 databits, 1 stopbits, timeou java[429]: 19:02:47:393 INFO calimero.link.tpuart:/dev/ttyS0 - hop count set to 6 java[429]: 19:02:47:579 INFO calimero.server.gateway.knx-server - main-line group address forward setting set to 1 java[429]: 19:02:47:581 INFO calimero.server.gateway.knx-server - sub-line group address forward setting set to 1 java[429]: type 'stop' to stop the gateway and shutdown the server java[429]: Detached from STDIN. Running in daemon mode java[429]: 19:02:47:587 INFO calimero.server.knx-server - launch KNXnet/IP server 'Calimero KNXnet/IP Server' java[429]: 19:02:47:724 INFO calimero.knxnetip.KNXnet/IP routing service 224.0.23.12 - multicast loopback mode enabled java[429]: 19:02:47:726 INFO calimero.server.knx-server - KNXnet/IP discovery listens on interface enp0s8 java[429]: 19:02:47:739 INFO calimero.server.knx-server - KNXnet/IP discovery listens on interface enp0s3 java[429]: 19:02:47:739 INFO calimero.server.knx-server - KNXnet/IP discovery listens on interface lo
Check if the KNXnet/IP gateway is found.
root@debdev :~# knxtools discover Using /127.0.0.1 at lo ---------------------- Control endpoint 192.168.200.1:3671 (IPv4 UDP) "Calimero KNXnet/IP Server" KNX address 1.1.150 KNX medium TP1 Installation 0 - Project 0 (ID 0) KNX IP multicast address 0.0.0.0 MAC address 8a:e4:30:04:f1:81 S/N 0x000000000000 Supported services: Core (v1), Device Management (v1), Tunneling (v1) Using /172.16.1.200 at eth0 --------------------------- Control endpoint 192.168.200.1:3671 (IPv4 UDP) "Calimero KNXnet/IP Server" KNX address 1.1.150 KNX medium TP1 Installation 0 - Project 0 (ID 0) KNX IP multicast address 0.0.0.0 MAC address 8a:e4:30:04:f1:81 S/N 0x000000000000 Supported services: Core (v1), Device Management (v1), Tunneling (v1)
Check if groupmonitor can connect and see packets on the bus. Replace 192.168.200.1 with the IP Address of your calimero server.
root@debdev :~# knxtools groupmon -m knxip 192.168.200.1 19:26:50:994 INFO calimero.knxnetip.KNXnet/IP Tunneling 192.168.200.1:3671 - establish connection from /127.0.0.1:58235 to /192.168.200.1:3671 19:26:51:123 INFO calimero.knxnetip.KNXnet/IP Tunneling 192.168.200.1:3671 - connection established (channel 1) 19:26:51:132 INFO calimero.knxnetip.KNXnet/IP DevMgmt 192.168.200.1:3671 - establish connection from /127.0.0.1:58045 to /192.168.200.1:3671 19:26:51:137 INFO calimero.knxnetip.KNXnet/IP DevMgmt 192.168.200.1:3671 - connection established (channel 2) 19:27:03.600 0.0.1->5/3/1 A_Group.write 00: 0 counter pulses [5.010], 0 % [6.001], 0 [17.001], activate 0 [18.001], inactive (no message sent) [20.606], [21.106], [28.001] 19:27:03.745 1.1.59->2/2/26 A_Group.write 0c 7c: 31960 ms [7.003], 22.96 mV [9.020]
Script is also available at github. Any feedback is welcome. If you have improvments feel free to send a pull request.
Michael
I am from China. Where I can buy the Siemens Bustranceiver Module BTM UP117 5WG1117-2AB11 ?
It is appreciate that you could give a directly web address to buy it.
THX!
Hi Roger,
Voltus
eibmarkt
rb-elektroshop
elektrowelt-zwickau
rakuten
Michael
Hello Michael,
So I tried installing your script but it seems it’s not working for me.
ps ax|grep tuwien.auto.calimero.server.Launcher gives me:
1503 pts/1 S+ 0:00 grep –color=auto tuwien.auto.calimero.server.Launcher
journalctl -xu knx gives:
no entries
and when I make knxtools discover:
bash: knxtools: command not found
so apparently it’s not installed.
I’m a complete beginner with calimero and knx. How can I solve this ?
Thanks in advance.
yassin
Hi Yassin,
is the script ran completely until the end?
What was the last line of screen output: Please reboot your device?
Please rerun the script.
Michael
Hello,
Apparently it doesn’t run until the end, there is an error :
Package setserial is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package ‘setserial’ has no installation candidate
it stops there
Yassin
Hello,
It doesn’t complete until the end, it stops with this error:
Package setserial is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package ‘setserial’ has no installation candidate
Yassin
Hi Yassin,
which linux distribution and which version do you use ?
Try the following before running the script (Update and reboot)
Michael
Hello,
I’m running raspbian stretch on rpi3, I tried installing the missing package manually and now it’s working.
So I connected my rpi to a simple knx home system through ip router IN00A01RIP from eelectron, I can find its mac address when I do knxtools discover but I can’t see any packets on the bus. Also I don’t know how to send commands to turn on/off lights.
can you help me please ?
Besides here is my email : yassinegouja@gmail.com could you please send me yours to detail problem and for further queries.
Sorry for the inconvenience.
Yassin.
Hi Yassin,
any more Details? Command line which you are using? Calimero server-config.xml file? Error Messages?
Michael
as knxd did not succeed, i tried to install this one on a blank raspberry 2 with brand new jessie image.
This is the result
knxtools discover
Error: A JNI error has occurred, please check your installation and try again
Exception in thread “main” java.lang.NoClassDefFoundError: tuwien/auto/calimero/KNXFormatException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.getMethod(Class.java:1784)
at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: tuwien.auto.calimero.KNXFormatException
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
I had to add a line 117 :
export IS_RASPBERRY_3=0
otherwise that variable was not initiated and failed @line 645
I upgraded and updated jessie to latest version and ran the script again, but same result.
Hi Kurt
create an symlink:
ln -s /opt/calimero-server/calimero-core-2.4-rc1.jar /opt/calimero-server/calimero-core-2.4-SNAPSHOT.jar
and try to run knxtools again.
BTW: Why you are still on debian jessie 🙂 ?
Michael
P.S. Script is adjusted
it seems to work now
knxtools groupmon -m knxip 192.168.1.23
13:26:11:153 INFO calimero.knxnetip.KNXnet/IP Tunneling 192.168.1.23:3671 – establish connection from /127.0.1.1:59760 to /192.168.1.23:3671
13:26:11:208 INFO calimero.knxnetip.KNXnet/IP Tunneling 192.168.1.23:3671 – connection established (channel 5)
13:26:11:218 INFO calimero.knxnetip.KNXnet/IP DevMgmt 192.168.1.23:3671 – establish connection from /127.0.1.1:51606 to /192.168.1.23:3671
13:26:11:226 INFO calimero.knxnetip.KNXnet/IP DevMgmt 192.168.1.23:3671 – connection established (channel 6)
But i do not see any message appearing on the bus.
Is there somewhere a user manual for calimero knxtools ?
update : just received my busware.de/tiki-index.php?page=POD and after installation and without touching anything, the script of michael did do the job activating the whole interface
Magnificent job michael !
> Task :compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ‘:compileJava’.
> Could not target platform: ‘Java SE 9’ using tool chain: ‘JDK 8 (1.8)’.
Hi Lukasz,
the calimero is under development and they switch to Java 9. I must alter my script to just use the 2.4 release (based on Java 8) for the projects (if available) branch… I think tomorrow….
Update: Script is altered. Please cleanup your build directory and try again.
Michael
Dear Michael,
I also have the same Java error – but even with the current version of the script. What can I do?
Michael
Hi Michael,
is fixed. Please rerun the script.
Michael
Dear Michael,
finally I managed to get everything working – but I had to change your script a little bit. Here is the diff:
root@raspberrypi:~# diff calimero.sh calimero.sh.1
373c373
cp ./build/libs/calimero-core-2.4-*.jar $CALIMERO_SERVER_PATH
380c380
cp ./build/libs/calimero-device-2.4-*.jar $CALIMERO_SERVER_PATH
403c403
cp ./build/libs/calimero-rxtx-2.4-*.jar $CALIMERO_SERVER_PATH
455c455
cp ./build/libs/calimero-server-2.4-*.jar $CALIMERO_SERVER_PATH
488c488
cp ./build/libs/calimero-tools-2.4-SNAPSHOT.jar $CALIMERO_SERVER_PATH
Thank you very much for your great work,
Michael
Diff output doesn’t work here…
In fact I had to change all ./build/libs paths to something like that ~/calimero-build/calimero-core/build/libs (for core, server, tools, etc.) and also the calimero-tools-2.4.-SNAPSHOT.jar name to *.rc1.jar
Michael
Hi Michael,
thx for the hint. I changed the copy command of the calimero tools jar to calimero-tools-2.4-*.jar but a change to ~/calimero-build/calimero-core/build/libs isn’t necessary because the working directory is always changed to the root of the package before building it and therefore the relative path should work.
Michael
hello , Hello. I did all the steps. looks ok. (comunication etc).
But i do not see any message appearing on the bus.
KNX/Interface Thing it is online.
Hi Michael.
I’ve followed your guide(s) setting up my BTM UP117 5WG1117-2AB12 with a 1201 between the RPI and KNX bus. I’ve tried eibd, knxd, and calimero, but all seem to fail.
I checked if there is traffic between serial and the knx, and i get some “garble” when i press my light switch on and off.
I can get calimero to start, but get ADPU errors, and generally no sensible info when monitoring the bus.
Ive tried to connect the 1201 to both 3.3 and 5.0 v (some suggested 3.3 v )
What might i be doing wrong?
Hi Per-Arne,
do use the 1201 on a PCB I’ve provided or have you wired it manually? Any error messages when knxd or calimero starts?
Michael
Hi There,
I came across this github project (Race666/calimero-server) and this blog post linked.
We are trying to make a gateway that can talk to existing KNX system. As I read, this project talks about the same. Can you please let me know if the project will cater to our needs.
Thanks
Rahul
+61 45-21695
Hi Rahul,
yes this should fit your needs.
Michael
Hi,
Thanks for your tutorial.
I’m trying to use it. I have installed the server and I get a good response from knxtools discover command:
root@raspberrypi:/home/pi# knxtools discover
13:30:38:673 INFO calimero.knxnetip.Discoverer – search on eth0 /192.168.1.11:3671
13:30:38:693 INFO calimero.knxnetip.Discoverer – search on lo /127.0.0.1:3671
Using 192.168.1.11 at eth0
————————–
“Calimero KNXnet/IP Server” endpoint 192.168.1.11:3671 (IPv4 UDP)
KNX address 2.1.0
KNX medium TP1
Installation 0 – Project 0 (ID 0)
KNX IP multicast address 224.0.23.12
MAC address b8:27:eb:a6:5f:92
Supported services: Core (v1), Device Management (v1), Tunneling (v1), Routing (v1)
Using 127.0.0.1 at lo
———————
“Calimero KNXnet/IP Server” endpoint 192.168.1.11:3671 (IPv4 UDP)
KNX address 2.1.0
KNX medium TP1
Installation 0 – Project 0 (ID 0)
KNX IP multicast address 224.0.23.12
MAC address b8:27:eb:a6:5f:92
Supported services: Core (v1), Device Management (v1), Tunneling (v1), Routing (v1)
13:30:41:721 INFO calimero.knxnetip.Discoverer – search stopped after 3 seconds with 2 responses
The problem is when I try to listen from the bus:
root@raspberrypi:/home/pi# knxtools groupmon -m knxip 192.168.1.11
13:32:35:488 INFO calimero.knxnetip.KNXnet/IP Tunneling 192.168.1.11:3671 – establish connection from /192.168.1.11:49043 to /192.168.1.11:3671
13:32:35:511 ERROR calimero.knxnetip.KNXnet/IP Tunneling 192.168.1.11:3671 – could not accept new connection (maximum reached)
13:32:35:512 ERROR calimero.knxnetip.KNXnet/IP Tunneling 192.168.1.11:3671 – establishing connection failed, error response from control endpoint /192.168.1.11:3671: could not accept new connection (maximum reached)
13:32:35:513 ERROR calimero.tools.ProcComm – completed with error
tuwien.auto.calimero.KNXRemoteException: error response from control endpoint /192.168.1.11:3671: could not accept new connection (maximum reached)
at tuwien.auto.calimero.knxnetip.ClientConnection.connect(ClientConnection.java:201)
at tuwien.auto.calimero.knxnetip.KNXnetIPTunnel.(KNXnetIPTunnel.java:158)
at tuwien.auto.calimero.link.KNXNetworkLinkIP.newConnection(KNXNetworkLinkIP.java:309)
at tuwien.auto.calimero.link.KNXNetworkLinkIP.(KNXNetworkLinkIP.java:201)
at tuwien.auto.calimero.link.KNXNetworkLinkIP.newTunnelingLink(KNXNetworkLinkIP.java:132)
at tuwien.auto.calimero.tools.ProcComm.createLink(ProcComm.java:487)
at tuwien.auto.calimero.tools.ProcComm.start(ProcComm.java:323)
at tuwien.auto.calimero.tools.ProcComm.run(ProcComm.java:274)
at tuwien.auto.calimero.tools.ProcComm.main(ProcComm.java:260)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at tuwien.auto.calimero.tools.Main.main(Main.java:117)
Do you know what is can be wrong?
Thanks in advance.
Hi Sergio,
Error Message: “could not accept new connection (maximum reached)”
Can you restart your system and try again?
Michael
Thank you for the script. Maybe you could change the wget command to get the github version because the version at michlstechblog.info/blog/download/shell_scripts/calimero.sh doen’t work (Maven too old).
I had another problem. My raspberry pi is only connected with by wlan0 so calimero failed to start. sed s/eth0/wlan0/g on /etc/calimero/server-config.xml
fixed it.
hi michael,
i can install it on openhabian, but not work….
[20:36:53] root@openHABianPi:~# ps ax|grep tuwien.auto.calimero.server.Launcher
1201 pts/0 S+ 0:00 grep –color=auto tuwien.auto.calimero.server.Launcher
[20:37:15] root@openHABianPi:~# journalctl -xu knx
— No entries —
[20:37:33] root@openHABianPi:~# knxtools groupmon -m knxip 192.168.82.101
-su: knxtools: command not found
Hi Alberto,
I’ve updated to the script the latest version. Please try again.
Michael
Hi, Michael
this is a error:
Package oracle-java8-jdk is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package ‘oracle-java8-jdk’ has no installation candidate
Hi Song,
please try https://michlstechblog.info/blog/download/shell_scripts/calimero_2.sh
This script always uses openjdk 11
Michael
Successful compilation in PI4
Thank you very much for your script.
but the usb connect still have problems,the ipt workingfine.
I decided to use 5WG1117-2AB12 to do it.
Best Regrads
songzh
Hi Michael
I have a ABB 6120/13-500 module,Whether this module can be used as a TPUART module?
In addition, I would like to ask how to distinguish between Stecker Btm pins 1-10 on your circuit diagram? How to connect the Raspberry Pi?
Thank you
Best Regards
songzh
Hi Songzh,
please ignore the PIN Numbers in the schematic. TPUART Module is using an other numbering schema than the standard (Computer) Pin Header but I had not changed this in the schematic. PCB is Pin compatible to the TPUART Module.
ABB 6120/13-500 is a BCU2. With my PCB you can not replace a TPUART Module with this, because BCU2 uses other pins for Power Supply and TX/RX. You have to design a new PCB.
Some BCU2’s works with knxd. You have to use -b ft12 as device parameter
Michael
Hi,
When i run the script i get the following error:
Package oracle-java8-jdk is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package ‘oracle-java8-jdk’ has no installation candidate
Skrin
Hi,
I installed with the calimero_2.sh script on a Rasp4 with freshly-installed Buster-based Openhabian. Everything went through without any error message.
Then I activated USB in the configuration and restarted the system.
Now Calimero tries to open the USB connection but it gets an exception: …USB Error 3 Access denied….
What do I need to do to give it the needed permissions?
Miro
Hi Miro,
determine the USB Vendor and Product ID by lsusb
Then take a look at /etc/udev/rules.d/90-knxusb-devices.rules and look if your device is listed there. If not add a new line with the properties of your device.
Michael
Hi Michael,
Thank you! It looks good now.
Just one KNXTimeoutException during start up, but then:
KNX-USB Inteface (ESYLUX)
S/N: 00721….
How would you suggest to test, whether it is really working or not? I’m still on a raw system without openhab configuration. So, a command line would be cool…
Miro
Hi Miro,
if you have already knx packets on the wire start the groupmon as described in the post.
Michael
Oh, sorry. I’ve could found it by myself. I’ll try it out.
What I already tried is to connect with my ETS4 which is running inside a VM with a NAT-ed network interface. Unfortunately, it didn’t work an the server produced some Calimero exceptions. It complained about the IP address of the ETS4-VM and could not send the ACKs. But it was complaining about the IP behind the NAT. Where does it have that from? And, why does it care about? Shouldn’t send it the ACK to the sender of the request (VM-Host)?
Miro
While i had some problems with the other 2 versions of the KNXD tool. The first script of the Calimero didn’t work for me. Got an error that some Javascript wasn’t available anymore.
Tried the calimero_2.sh and its working fine on my Raspberry Pi 3B+ with an Hager Electro USB interface.
Even the ETS KNX software is detecting the IP gateway automatically. Very much thank you!
Now i will try to connect it with OpenHAB and get some visualisation!
Keep up the good work! 🙂
what command use to send 1 on 1/1/1 ?
With KNXD (which I stopped trying to use because of its USB issues), I could switch a light on using:
knxtool groupswrite ip: 14/5/73 1
I cannot, for the life of me find the equivalent in calimero
I tried all sorts of
knxtools write
commands, but they all seem to be wrong and finding something as basic as a manual
I’ll elaborate a bit more on what I’m trying to do.
Checking the bus works great:
pi@rpiKNX:~ $ knxtools groupmon -m knxip 192.168.1.18
13:52:58:641 INFO calimero.knxnetip.KNXnet/IP Tunneling 192.168.1.18:3671 – establish connection from /192.168.1.18:58187 to /192.168.1.18:3671
13:52:58:764 INFO calimero.knxnetip.KNXnet/IP Tunneling 192.168.1.18:3671 – connection established (channel 1)
13:52:58:772 INFO calimero.knxnetip.KNXnet/IP DevMgmt 192.168.1.18:3671 – establish connection from /192.168.1.18:49692 to /192.168.1.18:3671
13:53:02:268 INFO calimero.knxnetip.KNXnet/IP DevMgmt 192.168.1.18:3671 – connection established (channel 2)
13:53:05.811 2.5.73->14/0/73 A_Group.write 00: no alarm [1.005], 0 false [2.002], decrease break [3.007]
13:53:57.951 2.5.73->14/5/73 A_Group.write 01: alarm [1.005], 0 true [2.002], decrease 1 steps [3.007]
13:53:57.995 2.5.73->14/0/73 A_Group.write 01: alarm [1.005], 0 true [2.002], decrease 1 steps [3.007]
13:53:59.684 2.5.73->14/5/73 A_Group.write 00: no alarm [1.005], 0 false [2.002], decrease break [3.007]
13:53:59.732 2.5.73->14/0/73 A_Group.write 00: no alarm [1.005], 0 false [2.002], decrease break [3.007]
But then I try:
knxtools write 1.005 on 14/5/73 192.168.1.18
or
knxtools write 1.005 “on” 14/5/73 192.168.1.18
or
knxtools write 1.005 true 14/5/73 192.168.1.18
or 1 or 01 instead of on or true
Also tried localhost, 127.0.0.1
2.002, 3.007 and 1.001 instead of 1.005
and all I get is:
knxtools write 1.005 “on” 14/5/73 192.168.1.18
13:57:24:152 INFO calimero.knxnetip.KNXnet/IP Tunneling 192.168.1.18:3671 – establish connection from /192.168.1.18:59913 to /192.168.1.18:3671
13:57:24:188 INFO calimero.knxnetip.KNXnet/IP Tunneling 192.168.1.18:3671 – connection established (channel 7)
13:57:24:195 INFO calimero.knxnetip.KNXnet/IP DevMgmt 192.168.1.18:3671 – establish connection from /192.168.1.18:48297 to /192.168.1.18:3671
13:57:25:256 INFO calimero.knxnetip.KNXnet/IP DevMgmt 192.168.1.18:3671 – connection established (channel 8)
13:57:27:935 INFO calimero.process.communication 192.168.1.18:3671 – detached from link 192.168.1.18:3671
13:57:27:941 INFO calimero.link.192.168.1.18:3671 – link closed
13:57:27:942 ERROR calimero.tools.ProcComm – completed with error
java.lang.StringIndexOutOfBoundsException: begin 0, end -1, length 2
at java.base/java.lang.String.checkBoundsBeginEnd(String.java:3319)
at java.base/java.lang.String.substring(String.java:1874)
at tuwien.auto.calimero.dptxlator.TranslatorTypes.getMainNumber(TranslatorTypes.java:654)
at tuwien.auto.calimero.dptxlator.TranslatorTypes.createTranslator(TranslatorTypes.java:566)
at tuwien.auto.calimero.process.ProcessCommunicatorImpl.write(ProcessCommunicatorImpl.java:352)
at tuwien.auto.calimero.tools.ProcComm.readWrite(ProcComm.java:567)
at tuwien.auto.calimero.tools.ProcComm.readWrite(ProcComm.java:552)
at tuwien.auto.calimero.tools.ProcComm.run(ProcComm.java:280)
at tuwien.auto.calimero.tools.ProcComm.main(ProcComm.java:260)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at tuwien.auto.calimero.tools.Main.main(Main.java:117)
Hi Janis,
command line help is not correct. Use:
More details at ProcComm.java :
Entry point for running ProcComm. The endpoint for KNX network access is either an IP host or port identifier for
IP, USB, FT1.2 or TP-UART communication. Use the command line option
--help
(or-h
) to show theusage of this tool.
Command line options are treated case sensitive. Available options for communication:
--help -h
show help message--version
show tool/library version and exit--verbose -v
enable verbose status output--compact -c
show incoming process communication data in compact format--localhost
id local IP/host name--localport
number local UDP port (default system assigned)--port -p
number UDP port on host (default 3671)--nat -n
enable Network Address Translation--ft12 -f
use FT1.2 serial communication--usb -u
use KNX USB communication--tpuart
use TP-UART communication--medium -m
id KNX medium [tp1|p110|knxip|rf] (defaults to tp1)--domain
address domain address on open KNX medium (PL or RF)--sn
number device serial number to use in RF multicasts & broadcastsAvailable commands for process communication:
read
group-address [DPT] read from datapoint with the specifiedgroup address, using DPT value format (optional)
write
group-address [DPT] value write to datapoint with thespecified group address, using DPT value format
monitor
enter group monitoringIn monitor mode, read/write commands can be issued on the terminal using
cmd DP [DPT] [value]
, withcmd = ("r"|"read") | ("w"|"write")
.Additionally, the tool will either create or load an existing datapoint list and maintain it with all datapoints
being read or written. Hence, once the datapoint type of a datapoint is known, the DPT part can be omitted from
the command. The datapoint list is saved to the current working directory.
Examples:
write 1/0/1 switch off
,w 1/0/1 off
,r 1/0/1
.For common datapoint types (DPTs) the following name aliases can be used instead of the general DPT number
string:
switch
for DPT 1.001, with valuesoff
,on
bool
for DPT 1.002, with valuesfalse
,true
dimmer
for DPT 3.007, with valuesdecrease 0..7
,increase 0..7
blinds
for DPT 3.008, with valuesup 0..7
,down 0..7
percent
for DPT 5.001, with values0..100
%
for DPT 5.001, with values0..100
angle
for DPT 5.003, with values0..360
ucount
for DPT 5.010, with values0..255
temp
for DPT 9.001, with values-273..+670760
float
orfloat2
for DPT 9.002float4
for DPT 14.005int
for DPT 13.001string
for DPT 16.001Opened an issue at github.
Update: command line help issue is fixed in master.
Michael
Michael,
Thanks a million!! I was not able to deduct this syntax from the ProcComm page.
It all works again. I’m happy as can be.
Finally my KNX stuff is controllable via domoticz again.
Part of the house we bought was KNX controlled whereas my own stuff is zwave.
Now it’s all integrated, nice.
Thanks again.
It’s still working as it should, there’s just one thing that knxd was better at (when it used to work with my ABB STOTZ-KONTAKT GmbH KNX-USB). And that’s speed.
It takes 5 to 6 seconds between issuing the “knxtools write” command and the light actually turning on.
Hi Bart and Janis,
I don’t know why such delays happens.
Can you open an issue at github for that behaviour? Maybe the developer already has a solution or can give you a hint.
Michael
This (and the knxd) version works. i have some problems in usage though.
I am using a Dali gateway that generates a lot of bus traffic.
There is sometimes a lot of delay (10s+) when switching lights.
Is this expected behaviour? Is the Siemens module not fast enough for high traffic?
Knxd works also but crashes on high traffic.
Got a huge amount of help on GitHub with the following result:
About 5 seconds have been shaved of the switch-times:
knxtools write 14/5/73 switch on -m knxip 192.168.1.18
6.9 seconds
knxtools write 14/5/73 switch on -m knxip 224.0.23.12
1.7 Seconds
Hello.
First thank you for the great tutorials and scripts on your page.
I am using an RPI 3 and i installed your calimero_2.sh script.
No error occured during the installation and the ETS 5 also recognizes the interface.
But i can not program a adress to my knx devices or see any action on the diagnostic mode.
So i tried journalctl -xu knx and the output was:
Jän 01 21:02:31 raspberrypi systemd[1]: Started Calimero KNX Daemon.
— Subject: A start job for unit knx.service has finished successfully
— Defined-By: systemd
—
— A start job for unit knx.service has finished successfully.
—
— The job identifier is 87.
Jän 01 21:02:37 raspberrypi java[424]: [main] INFO calimero.server.knx-server –
Jän 01 21:02:40 raspberrypi java[424]: [main] INFO calimero.server.knx-server –
Jän 01 21:02:40 raspberrypi java[424]: [main] INFO calimero.server.knx-server –
Jän 01 21:02:40 raspberrypi java[424]: listen on eth0, KNXnet/IP routing
Jän 01 21:02:40 raspberrypi java[424]: tpuart connection: TP1 medium, de
Jän 01 21:02:40 raspberrypi java[424]: [main] INFO calimero.server.knx-server –
Jän 01 21:02:41 raspberrypi java[424]: [knx-server routing service 224.0.23.12]
Jän 01 21:02:41 raspberrypi java[424]: [knx-server routing service 224.0.23.12]
Jän 01 21:02:41 raspberrypi java[424]: [knx-server discovery endpoint] INFO cali
Jän 01 21:02:41 raspberrypi java[424]: [knx-server discovery endpoint] INFO cali
Jän 01 21:02:41 raspberrypi java[424]: [knx-server discovery endpoint] INFO cali
Jän 01 21:02:41 raspberrypi java[424]: [knx-server routing service 224.0.23.12]
Jän 01 21:02:41 raspberrypi java[424]: [knx-server control endpoint /dev/ttyAMA0
Jän 01 21:02:41 raspberrypi java[424]: [knx-server routing service 224.0.23.12]
lines 1-23…skipping…
— Logs begin at Thu 2019-02-14 11:11:59 CET, end at Wed 2020-01-01 21:21:31 CET. —
Jän 01 21:02:31 raspberrypi systemd[1]: Started Calimero KNX Daemon.
— Subject: A start job for unit knx.service has finished successfully
— Defined-By: systemd
—
— A start job for unit knx.service has finished successfully.
—
— The job identifier is 87.
Jän 01 21:02:37 raspberrypi java[424]: [main] INFO calimero.server.knx-server – Calimero KNXnet/IP server (v2.4) ‘Calimero KNXnet/IP Server’
Jän 01 21:02:40 raspberrypi java[424]: [main] INFO calimero.server.knx-server – KNXnet/IP discovery network interfaces: listen on [all], send on [all]
Jän 01 21:02:40 raspberrypi java[424]: [main] INFO calimero.server.knx-server – Service container ‘/dev/ttyAMA0’:
Jän 01 21:02:40 raspberrypi java[424]: listen on eth0, KNXnet/IP routing multicast group 224.0.23.12
Jän 01 21:02:40 raspberrypi java[424]: tpuart connection: TP1 medium, device 1.1.0
Jän 01 21:02:40 raspberrypi java[424]: [main] INFO calimero.server.knx-server – setup tpuart subnet ‘/dev/ttyAMA0’
Jän 01 21:02:41 raspberrypi java[424]: [knx-server routing service 224.0.23.12] INFO calimero.knxnetip.KNXnet/IP routing service 224.0.23.12 – using network interface eth0
Jän 01 21:02:41 raspberrypi java[424]: [knx-server routing service 224.0.23.12] INFO calimero.knxnetip.KNXnet/IP routing service 224.0.23.12 – multicast loopback mode enabled
Jän 01 21:02:41 raspberrypi java[424]: [knx-server discovery endpoint] INFO calimero.server.knx-server – KNXnet/IP discovery listens on interface eth0
Jän 01 21:02:41 raspberrypi java[424]: [knx-server discovery endpoint] INFO calimero.server.knx-server – KNXnet/IP discovery listens on interface lo
Jän 01 21:02:41 raspberrypi java[424]: [knx-server discovery endpoint] INFO calimero.server.knx-server – knx-server discovery endpoint is up and running
Jän 01 21:02:41 raspberrypi java[424]: [knx-server routing service 224.0.23.12] INFO calimero.server.gateway.knx-server – /dev/ttyAMA0 started KNXnet/IP routing service 224.0.23.12
Jän 01 21:02:41 raspberrypi java[424]: [knx-server control endpoint /dev/ttyAMA0] INFO calimero.server.knx-server – knx-server control endpoint /dev/ttyAMA0 is up and running
Jän 01 21:02:41 raspberrypi java[424]: [knx-server routing service 224.0.23.12] INFO calimero.server.knx-server – knx-server routing service 224.0.23.12 is up and running
So there is still ‘/dev/ttyAMA0’: i read on another blog from you at rpi3 there should be ttys0 but i can not change that.
i Think this could be a problem but i cant solve it also not with google.
Another question is i am using a Gira 200800 BCU and not a siemens. Is the schematic different?
Best Reguard
Edi
Hi Edi,
a Gira 200800 BCU is not compatible with a Siemens TPUART module. They speak different protocols. Gira 200800 BCU is a Buscoupling unit these usually uses FT12 and not TPUART protocol and also not all BCU(2)’s can be used.
Michael
Hello.
Thank you for your reply.
Can i use Siemens 5WG1117-2AB12?
Edi
Hi Edvin,
yes, 5WG1117-2AB12 should work.
Michael
Success.
I finally made it working.
To see the telegrams on the bus I used:
knxtools groupmon -m knxip 224.0.23.12
To switch on and off a light I used:
knxtools write 0/0/1 switch on -m knxip 224.0.23.12
knxtools write 0/0/1 switch off -m knxip 224.0.23.12
Thanks for all the help and guidance.
Hello
Thank you very much for these tutorials, they are very helpful!
Can I use your script to install on an Orange Pi Zero?
When I test I get this error:
Configure support for TPUART
No supported Hardware detected
Hi Peter,
I think not out of the box. You have to determine which serial device (I think ttyS1 ) corresponds to Pin8/10 at the pin header. For Orange PI PCs this is /dev/ttyS3.
With this information and the output of
cat /proc/device-tree/model
I can adjust the script to also run on Orange PI Zero.
Michael
Great stuff, however looks like the knxSubnet type: ft12-cemi isn’t supproted in the 2.4 build. how can I use the script to build based on the latest version of calimero?
Hi Michael,
I was using this solution for some years now and everything was working fine – until my SD card broke and I had to reinstall everything from scratch on my Raspi 3. But now the script doesn’t work anymore… It stops with this error:
E: Paket oracle-java8-jdk kann nicht gefunden werden.
I do not get the point why it is complaining about java 8 (and certainly not from oracle) because the script installs open jdk 11… can you please help here?
Thank you and best regards,
Michael
Hi Michael,
uploaded the latest version v20210523_060000. Please try again.
Michael
Dear Michael,
you are my hero 🙂 It is working fine with the latest version.
Thank you and best regards,
Michael
Hello, First of all, I apologize for my bad english. I have a ABB S/1.2 USB Interface. I’m trying to install calimero on my debian installed OrangePi PC Plus device, but i can’t install calimero.
bash calimero_2.sh usb when i run this command; ”Configure support for USB No supported Hardware detected” i’m getting to warning.
I don’t know how to configure USB. I don’t know much about Linux. Please help, I’ve been trying for a week but I couldn’t do it.
Hi,
could you please update the installation script to the latest version. The instllation of th used branch 2.5 M1 is not anymore wokring in my case. After manually changing the script to the newest branch 2.5.1 also an failure appears. I would be very happy about any help.
Thanks René
Hi,
I have updated my hardware to an new RPi5. I tried to install again with your provided shell script an get the error:
“openHABian-RPi5:/home/openhabian# bash calimero.sh usb
Configure support for USB
Raspberry Pi found!
Unknown CPU architecture aarch64”
Is it possible to get an updated version to get my KNX Server runnning again?
best regards Rene
Hi,
I bought an Rpi5 and tried to install again the calimaro server with your script. It stops because the RPi5 CPU is unknown. Could you please update the script to be able to install it on an RPi5?
best regards René
Hi,
I bought an RPi5 and like to migrate from the 32Bit OS to 64Bit bookworm. I tried again to install the calimaro server but get now the following error:
“root@openHABian-RPi5:/home/openhabian# bash calimero_2.sh
Configure support for TPUART
Raspberry Pi found!
Unknown CPU architecture aarch64”
Could you please add support for the RPi5 CPU architecture aarch64?
best regards René