Trouble with KNX

Hi all,

I am really getting confused with setting up my Raspberry Pi 3 with Open HAB and KNXd via USB. I used the openHabian image and flashed it to my SD Card. Afterwards I installed the KNXd package from the additional options. This also worked out fine so far.

After changing the connection option under knxd to the USB and after rebooting my device I can see knx packets so far but after some seconds it breaks with:

LPDU: BC 11 11 69 13 E1 00 80 58 :L_Data low from 1.1.17 to 13/1/19 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write (small) 00
LPDU: BC 11 1F 12 0A E3 00 80 0C 55 6F :L_Data low from 1.1.31 to 2/2/10 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write 0C 55
LPDU: BC 11 12 69 11 E1 00 81 58 :L_Data low from 1.1.18 to 13/1/17 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write (small) 01
LPDU: BC 11 0F 69 10 E1 00 80 45 :L_Data low from 1.1.15 to 13/1/16 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write (small) 00
LPDU: BC 11 12 69 11 E1 00 80 59 :L_Data low from 1.1.18 to 13/1/17 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write (small) 00
Read failed: Connection reset by peer

So the knxd service isn’t running anymore.

When typing:

sudo systemctl status knxd.service

I am getting the following result:

● knxd.service – KNX Daemon
Loaded: loaded (/lib/systemd/system/knxd.service; enabled; vendor preset: enabled)
Active: failed (Result: resources) since Sat 2018-02-10 13:39:22 CET; 5min ago
Process: 1323 ExecStart=/usr/local/bin/knxd -p /run/knxd/knxd.pid $KNXD_OPTIONS (code=exited, status=0/SUCCESS)

Feb 10 13:39:22 openHABianPi systemd[1]: Starting KNX Daemon…
Feb 10 13:39:22 openHABianPi systemd[1]: knxd.service: PID file /run/knxd/knxd.pid not readable (yet?) after start: No such file or directory
Feb 10 13:39:22 openHABianPi systemd[1]: knxd.service: Daemon never wrote its PID file. Failing.
Feb 10 13:39:22 openHABianPi systemd[1]: Failed to start KNX Daemon.
Feb 10 13:39:22 openHABianPi systemd[1]: knxd.service: Unit entered failed state.
Feb 10 13:39:22 openHABianPi systemd[1]: knxd.service: Failed with result ‘resources’.
Feb 10 13:39:22 openHABianPi systemd[1]: knxd.service: Start request repeated too quickly.
Feb 10 13:39:22 openHABianPi systemd[1]: Failed to start KNX Daemon.
Feb 10 13:39:22 openHABianPi systemd[1]: knxd.service: Failed with result ‘resources’.

When starting the knxd service manually it says:

Excess arguments.

The journalctl says:

— Unit knxd.service has begun starting up.
Feb 10 13:39:22 openHABianPi systemd[1]: knxd.service: PID file /run/knxd/knxd.pid not readable (yet?) after start: No such file or directory
Feb 10 13:39:22 openHABianPi systemd[1]: knxd.service: Daemon never wrote its PID file. Failing.
Feb 10 13:39:22 openHABianPi systemd[1]: Failed to start KNX Daemon.
— Subject: Unit knxd.service has failed
— Defined-By: systemd
— Support: https:xxxxxxxxxxxxxxxxxxxxxx

— Unit knxd.service has failed.

— The result is failed.
Feb 10 13:39:22 openHABianPi systemd[1]: knxd.service: Unit entered failed state.
Feb 10 13:39:22 openHABianPi systemd[1]: knxd.service: Failed with result ‘resources’.
Feb 10 13:39:22 openHABianPi systemd[1]: knxd.service: Start request repeated too quickly.
Feb 10 13:39:22 openHABianPi systemd[1]: Failed to start KNX Daemon.
— Subject: Unit knxd.service has failed
— Defined-By: systemd
— Support: https:/xxxxxxxxxxxxxxxxxx

— Unit knxd.service has failed.

— The result is failed.
Feb 10 13:39:22 openHABianPi systemd[1]: knxd.service: Failed with result ‘resources’.

I have tried everything and also searched the internet for issues like thgat but unfortunately I can’t find the reason.

So I would be very pleased if someone could help.

Kind regards

Mathias

So the question is, is there a folder/run/knxd/ ? What are the permissions? Is there a file knxd.pid in this folder? If there is, maybe the permissions are wrong, so simply remove the file and retry. If the folder permissions aren’t suitable for the user, under which permissions knxd is running (knx? I don’t know) this user won’t be able to create the pid file successfully.

Dear Udo,
I’ve checked everything. There is such folder /run/knxd/ A knxd.pid is not in the folder. The user of this folder is knxd and I changed the permissions to 777 for testing purposes. Before that only the user knxd had full rights.
But in the end the resulkt is the same.
Once I reboot, the service works for a couple of seconds and then it ends with Read failed: Connection reset by peer.

Any ideas?

Kind regards

Mathias

reason is knxd can’t write pid file to destination directory correctly because that part of the code is broken.since pid file is not there systemctl can’t start it. someone checked in a fix to github repo , and with next release it might be working

compile with this file: knx.cpp

https://raw.githubusercontent.com/knxd/knxd/3a908eb3097fac7c86d94ed39d97d569132f8ffb/src/server/knxd.cpp

and you should be all fine with it.

Thanks a lot.
I will try.
Mathias

Oct 16 13:57:17 openHABianPi systemd[1]: knxd.service: PID file /run/knxd/knxd.pid not readable (yet?) after start: No such file or directory

I have still the same error on a fresh installed openhabian with the snapshot build:
openHAB 2.4.0~20181015030317-1 (Build #1390)

is there now an update available?

Which version of knxd is installed?

I’m in the same situation.
Did someone found a Solution?

And how can I do that ?
Regards
/Øystein