KNXD add-on: convert your KNX-USB interface into an IP interface that can be used by HA

I just got the information that Alpine 3.13 (which is used in the latest versions of the add-on base images and also this add-on uses) seems to cause some issues in regards to USB. So I downgraded/forced the base image to 3.12 again and hope that this would fix the issue. The change is in my test branch if somebody would like to give it a try.
In add-on version 0.3.6 I had used the latest tag for the base image, so even if you restore the old version and recompile it, you would still end up with Alpine 3.13 which seems to have issues. If somebody could test and confirm that the downgrading to Alpine 3.12 fixes the issue, I’ll push out a new version of my add-on.

Hi da-anda,

I have cloned your test repo and built the container, I can confirm that with alpine 3.12 it works perfectly fine.

I think we are good to push your changes to your master branch.

Thanks a lot for your help ! :yum:

phew, finally. Thanks for testing and your patience.

1 Like

new version is pushed. I now also added an option where you can define the debug/log level of KNXD so that it’s hopefully easier to debug issues in future.

Gonna test it right away ! :grinning:

BTW taking a moment to thank you for this great add-on ! you miss it the moment it stops working which means we can’t leave without it :ok_hand:

So I just saw that there was another HA update and also KNXD to version 4.0. For me no change…? Did I miss something?

Reverting to alpin 3.12 fixed the issue for me, I was able to access the usb module, but strange enough after the last HA update and restart I get now another error : Could not connect to KNX interface:
No Gateways found.

I am still looking a what could go wrong, now it is like HA can’t communicate with the add-on anymore.

What device did you add? For me the same error message occurs…
terminate called after throwing an instance of ‘std::invalid_argument’
what(): stoi

it is picking up /dev/bus/usb/001/005 automatically which is a ABB STOTZ-KONTAKT GmbH

Could you share your config? I can’t leave the device blank and if I change the config with yaml it throws error messages…

well, pick the correct device in the dropdown - that’s what it’s for :wink:

I did but it’s not working I always get the error message mentioned

any additional info visible when you set the log error level in settings to debug?

looks like I cannot upload a picture so here is the yaml version

 address: 0.0.1
 client_address: '0.0.2:10'
 interface: usb
 device: /dev/bus/usb/001/005
 log_error_level: debug
 usb_filters: 'single,queue'
 custom_config: ''

I changed the config to the one Vicha shared, changed the device to mine. Thats the outcome:

I00000131: [ 1:main] 0.14.39: knxd /etc/knxd.ini
terminate called after throwing an instance of ‘std::invalid_argument’
what(): stoi

By the way I’m on proxmox

I am on an intel nuc alike minicomputer debian / kvm. but I have a proxmox server as well.
I will quickly setup an HA instance on Proxmox and run some more tests. as said, the addon doesn’t complain anymore for me, except HA says it can’t connect to the Add-on : Bad gateway.

1 Like

could you try a config without specifying a USB filter just to see if the std::invalid_argument error is gone then?

Updated to 0.4.0 version of the plugin. Do you have any hints how to identify right device from the list? I tried different /dev/bus/usb/00X/00Y options but get the same error:

terminate called after throwing an instance of 'std::invalid_argument'
  what():  stoi

I think I had before updates a device called /dev/ttyACM0 (not the /dev/ttyAMA0 I took by mistake :grinning:), but now there is no such a device.

I don’t have any USB filters defined so they probably are not the cause of the error.

HomeAssistant is only listing those USB devices by their ID path, because the “physical” path would change if you plug the device into a different USB port. So they only show the path by ID (which should include the name of the device ideally) and convert this path then back to /dev/ttyACM0 (or whatever the actual path is) when you start the add-on.
If before the update you had a device called /dev/ttyACM0 then you used the the tpuart interface, correct? If you have more than one USB device in the list and are not sure which the correct one is, you can go to supervisor -> system and open the “hardware info” dialog. There you get detailed infos incl manufactuer etc of each device.