So I thought I better start a new topic for this, where the Cbus binding is highly intermittent on whether any Networks are synced, and at best 1 out of 2 cbus networks get synced.
So if you want to cut out the long read, here’s the solution (on a Linux box anyway):
sudo apt install iputils-arping
Yup - That’s it… Not a misprint, and I have probably restarted OpenHAB on my system well over 30 times, and both Networks sync perfectly with arping installed (maybe 1 out of 35 or so failed), but if you remove arping, the behaviour returns to original behaviour, with 1 network perhaps syncing every 3 or 4 OpenHAB restarts, and never with both networks syncing. Reinstall arping, and voila - cbus happy.
So whilst I am now happy, the reason for this post is that I have NO IDEA why this prevented the CBUS binding from working, and wonder if its something up in the thing handler (?) which could also affect other bindings in a similar fashion, rather than being an issue with the CBUS binding itself… Or if having arping installed is now a OH4 pre-requisite?
So before I move on, more details on the environment, and logs can be found in the following original post (Only difference is I am on OH4.0.3 now):
With the github issue here:
So how did I find this correlation to arping? Every so often I go on a tech-debt crusade, and have a go at sorting non-impacting low priority annoyances. Last nights was an attempt to clean up warnings from the openhab.log from startup time.
When I was addressing the following errors, after reading the forums, I decided to just try install arping to make it go away… And in the process, I noticed the CBUS started working as expected.
2023-09-12 18:37:29.635 [WARN ] [rg.openhab.core.io.net.exec.ExecUtil] - Failed to execute commandLine '[arping, --help]' 2023-09-12 18:37:29.645 [WARN ] [rg.openhab.core.io.net.exec.ExecUtil] - Failed to execute commandLine '[arping, --help]'
After many attempts of installing and removing arping and confirming the behaviour change, I started looking at the Network Binding config, and enabling/disabling system based ping switch, and also deliberately changing the path for arping to something else, no change in the above was noticed (errors, and CBUS issue remained).
At this point its worth mentioning, that when I was running OH3.4.4, I never had arping installed on the system either, and never had this issue.
I had a scan through the CBUS binding code (I’m not a dev though), and could not find any obvious clues as to what would be calling this. Also trying to pick key differences between the OH3 and OH4 versions, it appears that minimal binding specific changes were made (more to do with OH versioning changes?). Which is why I am now wondering about core handlers for things etc, and whether they facilitate network ping ‘online’ checks or similar.
Anyway, would be happy to solicit thoughts/feedback around this issue, and can ‘move’ the github ticket to oh-core, if the issue is thought to be over there, otherwise I will just close out the above ticket in ‘add-ons’ and move on to the next error in my logs … Cheers