Fixed 3 bugs (#8584)
Fixed 3 bugs: - Network bridge not listening on bus - Reconnection handler keeps reconnecting even after a successful reconnection - Minor typo in alarm wakeup time channels Signed-off-by: Cedric Boon <cedric.boon@hotmail.com>
This commit is contained in:
parent
d716d03787
commit
d5f6bd326c
|
@ -253,8 +253,9 @@ public abstract class VelbusBridgeHandler extends BaseBridgeHandler {
|
|||
int reconnectionInterval = bridgeConfig.reconnectionInterval;
|
||||
if (reconnectionInterval > 0) {
|
||||
this.reconnectionHandler = scheduler.scheduleWithFixedDelay(() -> {
|
||||
if (connect() && reconnectionHandler != null) {
|
||||
reconnectionHandler.cancel(false);
|
||||
final ScheduledFuture<?> currentReconnectionHandler = this.reconnectionHandler;
|
||||
if (connect() && currentReconnectionHandler != null) {
|
||||
currentReconnectionHandler.cancel(false);
|
||||
}
|
||||
}, reconnectionInterval, reconnectionInterval, TimeUnit.SECONDS);
|
||||
}
|
||||
|
|
|
@ -63,6 +63,13 @@ public class VelbusNetworkBridgeHandler extends VelbusBridgeHandler {
|
|||
updateStatus(ThingStatus.ONLINE);
|
||||
logger.debug("Bridge online on network address {}:{}", networkBridgeConfig.address,
|
||||
networkBridgeConfig.port);
|
||||
|
||||
// Start Velbus packet listener. This listener will act on all packets coming from
|
||||
// IP-interface.
|
||||
Thread thread = new Thread(this::readPackets, "OH-binding-" + this.thing.getUID());
|
||||
thread.setDaemon(true);
|
||||
thread.start();
|
||||
|
||||
return true;
|
||||
} catch (IOException ex) {
|
||||
onConnectionLost();
|
||||
|
@ -70,12 +77,6 @@ public class VelbusNetworkBridgeHandler extends VelbusBridgeHandler {
|
|||
networkBridgeConfig.port);
|
||||
}
|
||||
|
||||
// Start Velbus packet listener. This listener will act on all packets coming from
|
||||
// IP-interface.
|
||||
Thread thread = new Thread(this::readPackets, "OH-binding-" + this.thing.getUID());
|
||||
thread.setDaemon(true);
|
||||
thread.start();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -1338,7 +1338,7 @@
|
|||
<label>Clock Alarm 1 Wakeup Hour</label>
|
||||
</channel>
|
||||
<channel id="clockAlarm1WakeupMinute" typeId="minute">
|
||||
<label>Clock Alarm 1 Minute</label>
|
||||
<label>Clock Alarm 1 Wakeup Minute</label>
|
||||
</channel>
|
||||
<channel id="clockAlarm1BedtimeHour" typeId="hour">
|
||||
<label>Clock Alarm 1 Bedtime Hour</label>
|
||||
|
|
Loading…
Reference in New Issue