When starting OH3 all module channel states, e.g. outputs, relays, variables should be retrieved / updated.
No issue at all in OH2, where it seems the update is happening directly after connection. I see some warnings which indicate to me there is a scan happening:
00:31:57.445 [DEBUG] [ernal.connection.AbstractStateMachine] - Changing state ConnectionStateSegmentScan -> ConnectionStateConnected
00:32:09.855 [WARN ] [nding.lcn.internal.connection.ModInfo] - S000M092: Failed to receive status message: Output 1: Failed finally after 3 tries
00:32:12.878 [WARN ] [nding.lcn.internal.connection.ModInfo] - S000M090: Failed to receive status message: VARIABLE 3: Failed finally after 3 tries
I'm not seeing any of those warnings in OH3.
On start no values retrieved. Once a module sends an update via the LCN bus, the value is picked up. This can also be forced by switching an output on / off, for example.
From the logs I see no polling or request for updates at all, just passively receiving values. Only when adding the module, it seems to retrieve all values.
OH3 - Build #2022
Maybe the LCN binding is another binding impacted by the change related to channelLinked in the core framework:
https://github.com/openhab/openhab-core/issues/1707
Just looking at the code I'm not sure it is really related. This method does not seem to be used.
Any idea @fwolter ? Anything I can test?
It depends on whether the binding is relying or not on calls to channelLinked to initialize the channels. It should not (because it will not work properly in OH3).
The binding relies on the initial REFRESH commands, which are triggered by channelLinked. As this method is not called anymore, the initial values aren't polled. The fix from @robnielsen in https://github.com/openhab/openhab-core/issues/1707#issuecomment-709273658 seems to work. I will add it to the binding.
Thanks for prompt action
Most helpful comment
The binding relies on the initial
REFRESHcommands, which are triggered bychannelLinked. As this method is not called anymore, the initial values aren't polled. The fix from @robnielsen in https://github.com/openhab/openhab-core/issues/1707#issuecomment-709273658 seems to work. I will add it to the binding.