Skip to content
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] No devices update on Startup/Network Sync - OpenHAB 4.0.0 M3 #15081

Closed
guitarglen opened this issue Jun 11, 2023 · 3 comments
Closed

[Cbus] No devices update on Startup/Network Sync - OpenHAB 4.0.0 M3 #15081

guitarglen opened this issue Jun 11, 2023 · 3 comments
Labels
bug An unexpected problem or unintended behavior of an add-on

Comments

@guitarglen
Copy link

guitarglen commented Jun 11, 2023

Expected Behavior

On startup of OpenHAB (tested most recently on OpenHAB 3.4.4 Release), a network Synchronisation is initiated with CGATE for all networks configured in OpenHAB, and all Lighting Groups (Items in OpenHAB) are updated from NULL (initially) to their current value (e.g. ON/OFF for a switch, or numeric value for a dimmer) as read from the CBUS networks.

Current Behavior

With 4.0.0 M3, it is noted that upon startup of OpenHAB (and subsequent CGATE sync), all CBus group (Item) values remain as NULL, although intermittently one of the CBUS networks has been observed to Sync correctly (but rarely), but the other CBUS network almost never.

During Startup the following will also be displayed for a few minutes or so for the CBUS things (within MainUI):

  • CGate Connection: Online
  • C-Bus Network(s): Error:Comm
  • C-Bus Lighting Group: Error:Bridge

Devices on the CBUS will however turn on and off correctly when a command is sent from OpenHAB, and the status will then be updated to reflect the correct status.

It is also observed that the status will update correctly, once OpenHAB is running, if a switch is turned on/off from the CBUS network. So the behaviour just seems limited to the initial Network Sync status updating (Or not initiating a network sync)

Steps to Reproduce (for Bugs)

  • Start CGATE Service
  • Start OpenHAB service
  • Observe Item Status - Will remain as NULL

Context

This issue has occurred since I moved to a new system, and subsequently upgraded to OpenHAB 4.0.0M3, however I can now eliminate the system move as the cause, as I have upgraded the legacy system to OpenHAB4.0.0M3 and the exact same issue now occurs on there too.

It's also unlikely to be the change from Java11 to Java17 (as required for OH4) as I also retested on the legacy server running OpenHAB 3.4.4 under Java17, which worked just fine.
Hopefully that step rules out a problem with one of the underlying libraries not liking Java17?

Logs can be found in the following post:
https://community.openhab.org/t/openhab-4-0-milestone-discussion/145133/362?u=glen_m

Only thing I can add since the above post, is that the following entries appear throughout the legacy server logs after startup (Probably resulting from the CBUS Sync being kicked off), whereas I generally do not see these on the new system (except on a few occassions/items):
2023-06-03 19:13:23.610 [DEBUG] [inding.cbus.handler.CBusCGateHandler] - updateGroup address //FINLAYS/254/56/25 2023-06-03 19:13:23.611 [DEBUG] [inding.cbus.handler.CBusLightHandler] - channel UID cbus:light:cgatenetwork:cbushomenetwork:Bedroom1OutsideLights:state level UID cbus:light:cgatenetwork:cbushomenetwork:Bedroom1OutsideLights:level 2023-06-03 19:13:23.613 [DEBUG] [inding.cbus.handler.CBusLightHandler] - Updating CBus Lighting Group cbus:light:cgatenetwork:cbushomenetwork:Bedroom4EnsuiteMirrorLights with value 0

Your Environment

New Server:

  • OpenHAB 4.0.0M3
  • Java 17.0.7 (Zulu)
  • Ubuntu 23.04 (Server)
  • cGate 2.11.10 (Running under zulu8.52.0.23)
@guitarglen guitarglen added the bug An unexpected problem or unintended behavior of an add-on label Jun 11, 2023
@guitarglen
Copy link
Author

As an update, the issue has slightly changed (Observed in both 4.0.0_M5 and 4.0.0 Release), but it still an issue:

  • One network seems to now sync correctly most of the time, and current light values are pulled back into openHAB
  • The other never syncs, and values only appear when either changed on the CBUS network (e.g. switch) or state updated by OpenHAB
  • All other details in the above ticket (and linked community post) remain unchanged, and still no smoking guns in the OpenHAB log, nor Cgate logs.

@openhab-bot
Copy link
Collaborator

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/cbus-no-devices-update-on-startup-network-sync-openhab-4-0-3/149540/1

@guitarglen
Copy link
Author

guitarglen commented Sep 18, 2023

I actually now believe this issue related to some behaviour change in the thing handler or similar in OpenHAB >4.0.x, rather than an issue with the CBUS binding itself.... Issue is 100% reproducible, and conversely 100% fixable with the following short version of the solution/workaround (on a linux system) being:
sudo apt install iputils-arping

Long version of how I arrived at this "solution" can be found here:
https://community.openhab.org/t/cbus-no-devices-update-on-startup-network-sync-openhab-4-0-3/149540

The binding has been stable and pretty much found both my CBUS networks on every restart, since the above was applied.
Closing issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on
Projects
None yet
Development

No branches or pull requests

2 participants