-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugin crash (terminate called after throwing an instance of std::invalid_argument) #12
Comments
well, the knxd version itself did not change between 0.3.6 and 0.3.7, so it can't really be knxd related. I only switched the base image to the new Github container repository hosted ones and fixed a runtime issue because those new base images missed two libs that knxd required. |
hmm, no issues on my end on 5.11. Are you sure your device |
You're right, after update I lost my original configuration and needed to recreate it. I had problems with "device" parameter earlier, and I found that I needed to leave it empty to start working: https://community.home-assistant.io/t/knxd-add-on-covert-your-knx-usb-interface-into-an-ip-interface-that-can-be-used-by-ha/38108/35 Now I updated it as before, however it still throws errors:
|
is |
Thanks for the hint - I did't know where to check it. However, it seems that the address is correct:
|
great, my interface now also craps out as it terminates the connection every couple seconds |
ok, I had accidentally selected the wrong device on my end. So it's still working fine on my end. Sorry, but no idea what's wrong for you. It could be related to the recent supervisor changes and how they forward devices to containers/add-ons. But no idea how to test/fix this since I don't own a KNX USB-interface, only an UART one, so I can't test anything here. Debugging of the issue would have to be done by someone with such a device. |
since I am flying blindfolded I can only do some guesses. A dev from the HA addon_dev discord mentioned that the add-on might need udev now, which I added. If you want you can check out this branch https://github.com/da-anda/hass-io-addons/tree/test to the |
Is it possible to add it with the Supervisor? |
if you do what I said, then yes, it will show up in the supervisor as local add-on. You will see it twice then, once locally from your device and once from my Github repo, so don't be confused. |
I can see a local addon, however after clicking "Install", it starts spinning, but install does not finish. |
I have same USB error and same usb address reported by the supervisor.
Running https://github.com/da-anda/hass-io-addons/tree/test as a local addon instead of the error message from #12 (comment) I get this:
Thank your for working on this, I really hope you can get it fixed. I can test more if you have any more ideas. |
so a dev over at the HA discord did a change to the supervisor which might fix the issue, but no guarantee. So please give it a try with the just released supervisor 2021.02.7 edit: for this you will have to join the beta channel of the supervisor |
it will take quite some time, because it has to compile everything. I might look into pre-building the container at some point, but cross compiling is still out of my league. I'm no linux expert and all I do is searching the web for answers and hope things work out. edit: logs about the installation process of any add-on can be found in the supervisor logs. So go to supervisor -> system and scroll down to the logs. Start and finish of an installation will be shown there, also any errors that might have occured. But as said, the installation can take some time since it will be compiled. |
@mariwing your second log shows the add-on version 0.3.7 while the one in the test branch is 0.3.8. No idea what went wrong on your end there. |
I know what happened, forgot to checkout test branch. Sorry about that! Here is the (very similar) log for 0.3.8
With regards to the supervisor beta mentioned; do you think I should test this with this version of the addon or the 0.3.7 version? By the way; nice with the new device selector dropdown on this 0.3.8 version! |
@da-anda Thank you for your efforts! Unfortunately, the 0.3.8 from the test branch still throws errors:
|
Hello again and thank you for continous support. I went ahead and upgraded to superviso 2020.02.7. Still the same error unfortunately:
|
@lukaszolek you likely selected the wrong device there, like ttyAMA0 or so, which is wrong in your case. 0.3.8 uses the device selector option now, so it should be easier for you to find the correct one. (I unfortunately can't limit it to only devices that make sense since it could either list USB or tty devices, but never both when I apply restrictions) @mariwing quite odd. It seems to have issues writing the config file. Do you by any chance have any custom config applied which might have been messed up by the new settings UI? Other then that, I'm kinda out of ideas. As for the supervisor - it should not matter which version you test with the new supervisor version (which appears to be in public release now) |
@da-anda, my config looks like: |
@lukaszolek ok, odd. I had the very same error message when I had used the wrong interface, which is why suspected it might be wrong. Out of ideas now, sorry. But hey, at least one step further on your end @mariwing argh, had hoped 2021.2.7 would have fixed it. Please check your config (probably best in RAW mode) to see if the UI mode messed something up. If not, then I'm also out of ideas in your case |
Sorry for my ignorance, but could you point me in the right directon how to access this file? I assume it is inside the container and I don't know how to access that unfortunately |
no, in the add-on config of the supervisor management panel you can switch between UI and RAW yaml mode (use the dotted menu indicator on the right side of the config options panel). Once your container is booting again (which it currently likely doesn't due to the error during startup) you can SSH into the container by doing the following:
|
I see, now I learned a lot of new stuff today. The raw view looks ok to me, so I don't think I have any hint on what to do next (since the container don't start). For now I have reinstated my old Pi3 knxd gateway and I will keep an eye on this addon and retry it down the road. Thank you for your patience in explaing and trying to help 👍 |
@lukaszolek could it be an issues with the new kernel that the latest HAOS update brought? Could you maybe test downgrading the OS to the previous version and see if the issue is gone? |
@da-anda it would be difficult for me to make a downgrade right now, however I'm sure it could be with the latest HAOS, because knxd stopped working right after the upgrade I've made. |
to rule out an issue with the switch from the dockerhub based add-on base-images to the new ones on github CR, you could try to install the old 0.3.6 version of the add-on locally. If this one also doesn't work, we at least know it's not related to a change I made. |
also, if you want, you could try to SSH into the add-on container like described above and check the generated config in |
This is my /etc/knxd.ini from the addon_local_knxd container:
Trying to give write permissions:
|
This is my /etc/knxd.ini from the addon_local_knxd container:
Trying to set write permissions:
|
hmm, config seems fine on a glance. Then sorry, no idea what else to try. Since knxd is run as root user, it shouldn't be a permission issue. Feel free to mess around inside the docker container as much as you like - once you restart it, it will be back to it's initial state, so you can't really mess things up. The docker image is based on alpine, so you can install additional libraries via |
oh, you could probably try to run knxd via it's command line arguments instead of the ini file in order to see if you can get it to work somehow with the usb device. See |
a friend mentioned that it might help if you just reboot the host OS. Might be worth a try I guess. |
This is what I get when downgraded to 0.3.6:
|
hmm, so also USB connection issues like others reported on the forums. So seems to be related to the new supervisor and probably also OS then |
Do you think add-on protection mode can play role? |
I tried to execute knxd directly in the container, however the same problem here:
|
@da-anda I managed to solve the problem for 0.3.6. However, doing the same in test branch resulted in the same error as in the beginning:
|
@lukaszolek I just pushed a change to my test branch. I added |
I've updated to newest 0.3.8 from the test branch, but it still trows the same error.
|
can you verify in I suppose that running knxd via command line parameters in this build also still doesn't work? I'm asking because while searching the entire knxd source code, the only mention of |
we could also try downgrading the base images of the add-on to alpine 3.12 since those also recently got bumped to 3.13. If you like, you could try switching the base image by modifying |
@lukaszolek I downgraded the add-on base-image to 3.12 and did one additional change in the config.json. Mind trying the latest version of the test branch once more? Thanks. |
@mariwing would you mind testing as well? Apparently there are some bugs in Alpine 3.13, so I hope your issue is gone now as well in the test branch |
sorry, made a mistake earlier. Now it's correctly switched to Alpine 3.12 |
a user on the forum tested the addon with Alpine 3.12 and reported it working. So I pushed a 0.4 release now, which should hopefully fix the issue. @mariwing if your issue still persists, please open a new ticket. Btw - I added a debug loglevel setting for KNXD now, which hopefully helps with debugging future issues. You can set it to loglevel |
@mariwing version 0.4.1 should now also fix your issue |
Thank you, I have reverted back to using a separate rpi for knxd for now. In an effort to pay back for your efforts on this (thank you again) I tried to install and run your latest version. It does indeed no longer give the configuration file error that I struggled with the other day 👍 |
I upgraded HA, Supervisor and KNXD to the newest versions and I get following error.
KNXD config:
The text was updated successfully, but these errors were encountered: