Hi. I recently got the Eclipse IDE working again for 2.5 development, and started doing some work on the Lutron binding. However, I soon noticed a problem with the current binding code running under 2.5. A routine which should be periodically executed by a thread scheduled using scheduleWithFixedDelay() is never being called. However, I can see the same code working on my 2.4 production system.
The problem schedule call is in IPBridgeHandler.java at line 219:
(https://github.com/openhab/openhab2-addons/blob/master/bundles/org.openhab.binding.lutron/src/main/java/org/openhab/binding/lutron/internal/handler/IPBridgeHandler.java#L219)
private ScheduledFuture<?> keepAlive;
[ā¦]
keepAlive = scheduler.scheduleWithFixedDelay(this::sendKeepAlive, heartbeatInterval, heartbeatInterval, TimeUnit.MINUTES);
[ā¦]
private void sendKeepAlive() {
[ā¦]
}
When I add logger calls or use the debugger, I can see that the scheduleWithFixedDelay call succeeds. At least so far that I get back a good java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask. The heartbeatInterval variable is set to 5 (minutes), and I confirmed immediately after this call that keepAlive.getDelay(TimeUnit.SECONDS) was 299 (seconds). But sendKeepAlive() is never called, and I canāt figure out why.
I tried running the binding both in the Eclipse IDE set up for 2.5 development with bnd and under the latest 2.5 snapshot build (or the latest as of a day or two ago, anyway) with the same results. That same bit of code has been working fine under 2.4, though.
I checked to see if the thingHandler thread pool was out of threads, but it looks fine. I set org.eclipse.smarthome.threadpool:thingHandler to 10, but there are only one or two threads running in it when I look.
Maybe Iām missing something obvious, but I canāt really think of what else to look at. Does anyone have any suggestions? Have there been any changes in 2.5 that would cause this sort of problem?