I wanted to share a problem that i am having with the Broadlink Binding for OpenHAB 3. I would like to see if anyone has seen this kind of issue, or has any ideas on how to troubleshoot it.
I have also open a ticket with the binding developer, in case they can help out.
I have made a HABpanel panel that has a remote control. The remote control uses the Broadlink binding to send commands to different appliances through IR.
The remote control is connected over WiFi, on the same network as the Broadlink device (an RM mini 3).
OpenHAB 3 is on a raspberry pi 3 connected through the network with a cable.
What i have found is that sometimes there is a delay between when the command is received by OpenHAB, and when the network packet with the command to control the Mini goes out of the raspberry pi. This delay is irregular. Sometimes openhab receives the command to activate the Mini, and sends the command to the Mini immediately, and sometimes the delay is of several seconds.
In some cases, the command is not sent at all, and you can see the following error on OpenHAB logs:
12:10:49.066 [ERROR] [rnal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.handleCommand()' on 'org.openhab.binding.broadlink.handler.BroadlinkRemoteHandler@': sendAndReceiveOneTime: Send/Receive failure java.lang.IllegalStateException: sendAndReceiveOneTime: Send/Receive failure at org.openhab.binding.broadlink.internal.socket.RetryableSocket.sendAndReceiveOneTime(RetryableSocket.java:67) ~[?:?] at org.openhab.binding.broadlink.internal.socket.RetryableSocket.sendAndReceive(RetryableSocket.java:49) ~[?:?] at org.openhab.binding.broadlink.handler.BroadlinkBaseThingHandler.sendAndReceiveDatagram(BroadlinkBaseThingHandler.java:165) ~[?:?] at org.openhab.binding.broadlink.handler.BroadlinkRemoteHandler.sendCode(BroadlinkRemoteHandler.java:63) ~[?:?] at org.openhab.binding.broadlink.handler.BroadlinkRemoteHandler.handleCommand(BroadlinkRemoteHandler.java:95) ~[?:?] at jdk.internal.reflect.GeneratedMethodAccessor1177.invoke(Unknown Source) ~[?:?] at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?] at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?] at org.openhab.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) [bundleFile:?] at com.sun.proxy.$Proxy7168.handleCommand(Unknown Source) [?:?] at org.openhab.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:80) [bundleFile:?] at org.openhab.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:48) [bundleFile:?] at jdk.internal.reflect.GeneratedMethodAccessor1176.invoke(Unknown Source) ~[?:?] at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?] at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?] at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?] at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?] at java.lang.Thread.run(Thread.java:834) [?:?]
This issue translates in a really poor experience when using IR devices. Specially when trying to control things like a TV, going through menus, etc.
Does anyone has any ideas on how to start looking at this? The issue appears to affect only the Broadlink device (I have more devices on the network). At first i thought the problem could be the device itself, but when i capture traffic on the pi, it is clear that the commands send by OpenHAB/binding sometimes delay by several seconds. I am using Beta 5 snapshot release of the Broadlink binding.
Thank you very much.