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;
|
int reconnectionInterval = bridgeConfig.reconnectionInterval;
|
||||||
if (reconnectionInterval > 0) {
|
if (reconnectionInterval > 0) {
|
||||||
this.reconnectionHandler = scheduler.scheduleWithFixedDelay(() -> {
|
this.reconnectionHandler = scheduler.scheduleWithFixedDelay(() -> {
|
||||||
if (connect() && reconnectionHandler != null) {
|
final ScheduledFuture<?> currentReconnectionHandler = this.reconnectionHandler;
|
||||||
reconnectionHandler.cancel(false);
|
if (connect() && currentReconnectionHandler != null) {
|
||||||
|
currentReconnectionHandler.cancel(false);
|
||||||
}
|
}
|
||||||
}, reconnectionInterval, reconnectionInterval, TimeUnit.SECONDS);
|
}, reconnectionInterval, reconnectionInterval, TimeUnit.SECONDS);
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,6 +63,13 @@ public class VelbusNetworkBridgeHandler extends VelbusBridgeHandler {
|
||||||
updateStatus(ThingStatus.ONLINE);
|
updateStatus(ThingStatus.ONLINE);
|
||||||
logger.debug("Bridge online on network address {}:{}", networkBridgeConfig.address,
|
logger.debug("Bridge online on network address {}:{}", networkBridgeConfig.address,
|
||||||
networkBridgeConfig.port);
|
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;
|
return true;
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
onConnectionLost();
|
onConnectionLost();
|
||||||
|
@ -70,12 +77,6 @@ public class VelbusNetworkBridgeHandler extends VelbusBridgeHandler {
|
||||||
networkBridgeConfig.port);
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1338,7 +1338,7 @@
|
||||||
<label>Clock Alarm 1 Wakeup Hour</label>
|
<label>Clock Alarm 1 Wakeup Hour</label>
|
||||||
</channel>
|
</channel>
|
||||||
<channel id="clockAlarm1WakeupMinute" typeId="minute">
|
<channel id="clockAlarm1WakeupMinute" typeId="minute">
|
||||||
<label>Clock Alarm 1 Minute</label>
|
<label>Clock Alarm 1 Wakeup Minute</label>
|
||||||
</channel>
|
</channel>
|
||||||
<channel id="clockAlarm1BedtimeHour" typeId="hour">
|
<channel id="clockAlarm1BedtimeHour" typeId="hour">
|
||||||
<label>Clock Alarm 1 Bedtime Hour</label>
|
<label>Clock Alarm 1 Bedtime Hour</label>
|
||||||
|
|
Loading…
Reference in New Issue