-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[Cbus] Fails to reflect CBUS item status after upgrading CGATE to 3.4.0 #17969
Comments
The underlying dependency (cgateinterface maintained by @jpharvey) seems to be abandoned. A fix for this issue should be made in that library. Unfortunately we can't fix it in openHAB without a full rewrite of the binding. As you have found a workaround, we could update the documentation that this |
Definitely worth having the workaround documented, and agree that #17975 addresses the workaround aspect. May just need to change the version in your note to state that it was introduced somewhere after 2.11.11_334. (I did more research overnight, and updated the ticket) But if it's OK, I would prefer that the workaround documentation change does not close this ticket. I have just edited the Bug description slightly - One concern that I have is that the default may have changed for a reason (yet unknown) in the Clipsal C-Bus EcoSystem, and whilst the workaround may allow OpenHAB to continue working, it may introduce issues elsewhere for C-Bus users (Something else leveraging C-Gate). In my environment, looks OK, as the only other thing which uses C-Gate (occasionally) is C-Bus Toolkit. But I don't want to make that assumption for other users. I have a huge learning curve ahead of me, but am keen to try and see if I can start getting my head around the OpenHAB C-Bus Binding this winter (I'm Southern Hemisphere, so won't start until June 2025), and get to the point I can address some minor fixes, including this one, to try and contribute to keeping this binding operational/current. No promises, but will give it a go. |
If 2.11.11_334 has the default set to yes and when set to yes it causes this issue, the problem is introduced before 2.11.11_334 (not after) To update the docs we need to be sure, it has to be set to no to fix the problem and when the default to yes was introduced |
Sorry - Was a typo. Have corrected now.
I'm not sure what else I can do for diagnostics beyond what was provided above in the ticket, which was based on the following process:
Hope that helps confirm the findings. Thanks. |
Expected Behaviour
Upon starting up OpenHAB, the C-Bus binding should Synchronise all configured C-Bus networks, and reflect their current state.
Current Behaviour
The C-Bus sync command is issued by OpenHAB, and the command can be seen in the C-Gate logs to execute, however the status of the Items linked to the C-Bus Things never update to their current status.
This issue has been observed when Running OpenHAB with C-Gate 3.4.0 however looks to have been introduced earlier than this, as I skipped a few versions during a recent C-Gate upgrade, and also until recently, ran a config file generated by an older-version of C-Gate.
Investigation
When running under C-Gate 3.4.0, the 'get state' command issued by OpenHAB returns the following (Just one device for brevity below):
Under an earlier CGATE version (2.11.11_334) , the same response can be seen as follows:
The responses on the event port therefore now include additional millisecond timestamps, which obviously prevent OpenHAB from interpreting the responses from C-Gate.
Putting the OpenHAB C-Bus binding into 'Trace' Mode, did not show any unexpected messages (that changed between running different versions of C-Gate). I would therefore assume that the C-Bus binding silently ignores anything which does not match the pattern it is looking for.
Looking at the C-Gate configuration file
C-GateConfig.txt
there is an Option to enable the display of ms on responses. This is enabled by default now:I cannot say exactly which C-Gate version introduced this change in the default value, but for this C-Gate upgrade I let it generate a new config file, and merged my site-specific changes back into the config, mostly to ensure that I am not running a decade-old config file schema.
I tried installing (available) c-gate versions from the Schneider site, and ended-up back at C-Gate 2.11.11_334 as the first where it generated the config, with the default set to 'no', so was introduced at some point > Version 2.11.11_334
Possible Solution
Update C-Bus binding to be able to handle both variants of the timestamp returned by C-Gate, either with or without the ms
Workaround
C-GateConfig.txt
to now haveevent-millis=no
This works for OpenHAB, however my primary concern is I have no idea why they changed this default, and if anything else in the C-Bus Ecosystem will depend on this new setting, or will in future. Basic usage of C-Bus toolkit seems happy enough anyway, with it set to 'no'.
Steps to Reproduce (for Bugs)
Your Environment
The text was updated successfully, but these errors were encountered: