Broadlink binding for RMx, A1, SPx and MP. Any interest?

Where can I get the binding? the links at the top of the thread don’t work for me? Thanks in advance.

The downloadlink is in Post#73 of this thread:

2 Likes

Got it, thanks

It happen the same to me, I have this error in the log every 30 seconds

2018-01-21 11:03:50.381 [ERROR] [nk.handler.BroadlinkBaseThingHandler] - IO error: Broadlink Device: Socket is closed
2018-01-21 11:04:20.431 [ERROR] [nk.handler.BroadlinkBaseThingHandler] - IO error: Broadlink Device: Socket is closed
2018-01-21 11:04:50.475 [ERROR] [nk.handler.BroadlinkBaseThingHandler] - IO error: Broadlink Device: Socket is closed
2018-01-21 11:05:20.525 [ERROR] [nk.handler.BroadlinkBaseThingHandler] - IO error: Broadlink Device: Socket is closed
2018-01-21 11:05:50.571 [ERROR] [nk.handler.BroadlinkBaseThingHandler] - IO error: Broadlink Device: Socket is closed
2018-01-21 11:06:20.628 [ERROR] [nk.handler.BroadlinkBaseThingHandler] - IO error: Broadlink Device: Socket is closed

By the way, is it necessary to set static IP on the Broadlink SP devices? as it normally uses DHCP on the next restart they will have different IP, and as the binding connects to them directly, not through the Broadlink cloud’s API they will have a different IP on next reboot
I would expect the binding to use direct ARP resolution as Mac address if part of the channel description, but as there is a network address property on the binding configuration parameters page, I’m in doubt. I also noticed that after a reboot the thing does not seem to respond and other instance is detected in Paper UI Inbox

Does powerConsumption channel work for anybody? in my SP2 they always appears as NaN

thanks for this great binding!!! awesome work!
so for me everything is running now… the only struggle i got is how to set a power on / off button on the habpanel?
no widget i´ve tried worked… could anybody help?
thanks alot

I am using spmini2 to switch normally, but I can not update my status

java.lang.IllegalStateException: Could not update state, because callback is missing
at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.updateState(BaseThingHandler.java:303)
at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.updateState(BaseThingHandler.java:322)
at org.openhab.binding.broadlink.handler.BroadlinkSocketModel2Handler.getStatusFromDevice(BroadlinkSocketModel2Handler.java:66)
at org.openhab.binding.broadlink.handler.BroadlinkSocketModel2Handler.updateItemStatus(BroadlinkSocketModel2Handler.java:87)
at org.openhab.binding.broadlink.handler.BroadlinkBaseThingHandler$1.run(BroadlinkBaseThingHandler.java:92)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

Anyone with an idea? I’ve been struggling with this and it’s driving me nuts!!!

/etc/openhab2/transforms/broadlink.map

1 Like

Can anybody please confirm if the binding uses ARP resolution (I.e. support DHCP assigned IPs on plugs) or not? (i.e. it is necessary to use fixed IPs)
The doubt comes because thing properties include IP address, what normally changes after a power outage

can I use Broadlink RM3 with openhab 1.8?
how should the configuration be done?

Anyone has success to use it with Alexa with hue emulation?
We use STRING for the items hence its not working.
Any ideas?

Thanks

I have same question/concern. Looks like auto discovery doesn’t work.

Yes the AutoDiscovery will not work because of string property. I was able to fix it using rules

Items
String LOUNGE_AIRCON “LOUNGE AIRCON” { channel=“broadlink:rm3:xxxxxx:commmand” }
Switch LOUNGE_AIRCON_A “LOUNGE AIRCON” [“Switchable”]

Rules
rule "LOUNGE_AIRCON_A"
when
Item LOUNGE_AIRCON_A changed
then
if (LOUNGE_AIRCON_A.state == ON)
{
sendCommand(LOUNGE_AIRCON,“AIRCON COOL ON”)
}else if (LOUNGE_AIRCON_A.state == OFF)
{
sendCommand(LOUNGE_AIRCON,“AIRCOON COOL OFF”)
}
end

sitemap
Switch item=LOUNGE_AIRCON_A label=“LOUNGE AIRCON”

I hope it makes sense.
With this I can use Alexa with Openhab without the RM plugin

I guess you misunderstood me. I have rules and I can control mini. My problem is: Every time Mini restarts, it gets new IP and OH can’t auto discover device. I have to manually update IP in binding settings.

Another strange thing I noticed, not related to OH, if I have static IP on my router for Mini, I can’t reach it. It looks like it expects new IP after each reboot. But I didn’t spend enough time to troubleshoot this problem.

I’ve just had to reset an RM2 that I’ve had working fine for ages, and it wouldn’t work after the reset with the old binding settings so I deleted that, and now it won’t rediscover (which in the past wasn’t a problem). It’s on my network OK.

I’ve also tried restarts of the server and of OH, and when I’ve deleted the cache & tmp files, with no luck.

I’ve tried manual config,and it says ‘online’ but the device doesn’t respond.

Does anyone have any ideas please?

ooooo … and suddenly, auto-discovery. :slight_smile:

edit: that was after i’d removed static IP from the device, and updated the firmware - so it might have been either.

Binding provided by Cato works like a charm. Thank you for creating BETA version. When will you upload the code to the GitHub? It really deserves to be part of the official distribution.

For the IR codes - the best database is GlobalCache You can download max 5 code sets per day (via email).
Then you can convert received codes using pronto2broadlink.py or hxxps://gist.github.com/appden/42d5272bf128125b019c45bc2ed3311f and put the generated code in the broadlink.map file.

Hi

it works but a lot of errors in the log. who else suffers from this issue?

9 02:08:16.515 [ERROR] [nk.handler.BroadlinkBaseThingHandler] - IO error: Broadlink Device: Socket is closed
2018-02-09 02:08:46.576 [ERROR] [nk.handler.BroadlinkBaseThingHandler] - IO error: Broadlink Device: Socket is closed
2018-02-09 02:09:16.630 [ERROR] [nk.handler.BroadlinkBaseThingHandler] - IO error: Broadlink Device: Socket is closed
2018-02-09 02:09:46.672 [ERROR] [nk.handler.BroadlinkBaseThingHandler] - IO error: Broadlink Device: Socket is closed
2018-02-09 02:10:16.718 [ERROR] [nk.handler.BroadlinkBaseThingHandler] - IO error: Broadlink Device: Socket is closed
2018-02-09 02:10:46.765 [ERROR] [nk.handler.BroadlinkBaseThingHandler] - IO error: Broadlink Device: Socket is closed
2018-02-09 02:11:16.812 [ERROR] [nk.handler.BroadlinkBaseThingHandler] - IO error for device 'broadlink:sp2:34-ea-34-f5-ae-aa' during UDP command sending: Socket is closed
2018-02-09 02:11:16.818 [ERROR] [nk.handler.BroadlinkBaseThingHandler] - IO error: Broadlink Device: Socket is closed
2018-02-09 02:11:46.853 [ERROR] [nk.handler.BroadlinkBaseThingHandler] - IO error: Broadlink Device: Socket is closed
2018-02-09 02:12:16.906 [ERROR] [nk.handler.BroadlinkBaseThingHandler] - IO error: Broadlink Device: Socket is closed
2018-02-09 02:12:47.010 [ERROR] [nk.handler.BroadlinkBaseThingHandler] - IO error: Broadlink Device: Socket is closed
2018-02-09 02:13:17.060 [ERROR] [nk.handler.BroadlinkBaseThingHandler] - IO error: Broadlink Device: Socket is closed
2018-02-09 02:13:47.109 [ERROR] [nk.handler.BroadlinkBaseThingHandler] - IO error: Broadlink Device: Socket is closed
2018-02-09 02:14:17.162 [ERROR] [nk.handler.BroadlinkBaseThingHandler] - IO error: Broadlink Device: Socket closed
2018-02-09 02:14:47.214 [ERROR] [nk.handler.BroadlinkBaseThingHandler] - IO error: Broadlink Device: Socket is closed
2018-02-09 02:15:17.262 [ERROR] [nk.handler.BroadlinkBaseThingHandler] - IO error: Broadlink Device: Socket is closed
2018-02-09 02:15:47.308 [ERROR] [nk.handler.BroadlinkBaseThingHandler] - IO error: Broadlink Device: Socket is closed
2018-02-09 02:16:17.395 [ERROR] [nk.handler.BroadlinkBaseThingHandler] - IO error: Broadlink Device: Socket is closed
2018-02-09 02:16:47.441 [ERROR] [nk.handler.BroadlinkBaseThingHandler] - IO error: Broadlink Device: Socket is closed
2018-02-09 02:17:17.486 [ERROR] [nk.handler.BroadlinkBaseThingHandler] - IO error: Broadlink Device: Socket is closed
2018-02-09 02:17:47.531 [ERROR] [nk.handler.BroadlinkBaseThingHandler] - IO error: Broadlink Device: Socket is closed
2018-02-09 02:18:17.578 [ERROR] [nk.handler.BroadlinkBaseThingHandler] - IO error: Broadlink Device: Socket is closed
2018-02-09 02:18:52.588 [ERROR] [nk.handler.BroadlinkBaseThingHandler] - IO error: Broadlink Device: Socket is closed
2018-02-09 02:19:22.632 [ERROR] [nk.handler.BroadlinkBaseThingHandler] - IO error: Broadlink Device: Socket is closed
2018-02-09 02:19:52.681 [ERROR] [nk.handler.BroadlinkBaseThingHandl```