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

Hi @Cato_Sognen Great binding. I have a small issue with my Velux rollershutters. Sending a command to them doesnt work, and i believe its because the pulse length is too short. When i use the remote, a simple press isnt enough, i need to hold it for a short time. Is there anyway to implement a way of telling it how long it should send the command with one press?

Thanks in advance!

Do the shutters work with the e-control app?, some shutters use a changing frequentie for security, and so do not work with the broadlink rm’s…

great. have a full range of BL products here waiting for your addon!

Edit: I just wanted to write how this binding was not working for no apparent reason. Then my OH server locked up and after a hard reboot everything started working, even Alexa worked. So thanks!

Have a look at these. https://github.com/eschava/broadlink-mqtt/tree/master/commands/tv/samsung

I believe @Cato_Sognen said they were in a consistent format to what you put in the transform.map file.

I wonder if there might be possibilities, to get the binding changed to read IR commands from files as per this mqtt control method. It would allow us to share remote code files more readily.

And by installing this script, it allows for easy recording that’s not android based. I recorded a bunch of remote commands from various remotes and have been adding them to eschava’s gitbhub (and my own version of the same script).

Hello, I am new to this binding, I found IV and key on some github page, and copied and pasted it blindly with more than 40 characters including spaces and commas. I saw on other post of yours it only contain 32 characters. Do we have to remove the first 2 characters and commas and spaces?
I tried both (with and without commas, spaces, and '0x’s) but paper UI shows that it is initializing for minutes already. Can you help me point what did I do wrong?

Check step 4 from cato’s instructions above, there’s your answer!:sushing_face:

it appears that I have to delete the thing, and re add it again to make it work. Thanks

hello again, I successfully install broadlink binding, but no action is happened, except RM2 temperature is now detected from paper UI.
here is my item on items.items (is the mac address case sensitive?)

String Light_FF_Front “Front Room Light” (Broadlinks, LightsF1, Floor1) [ “Lighting” ] { channel=“broadlink:rm2:B4-43-0D-C3-0F-F5:command” }

here is my sitemap on sitemap.sitemap

Switch item=Light_FF_Front mappings=[Front_Light_ON=“On”, Front_Light_OFF=“Off”]

here is my broadlink.map

Front_Light_ON = b20734003110112f310f112e112e112f3110112f112f310f112f310f310f310f310f310f112f112f3110310f112e112f3110112e110001e200000000
Front_Light_OFF = b20b34002f1110303011103110301030301110301030301110312f112f112f113011301110301030301130112f11103010301030100001e400000000

and here is my code extracted from RM bridge that I used before using broadlink binding, using http request

[{“data”:“b20734003110112f310f112e112e112f3110112f112f310f112f310f310f310f310f310f112f112f3110310f112e112f3110112e110001e200000000”,“mac”:“b4:43:0d:c3:0f:f5”,“name”:“front hall on”},
{“data”:“b20b34002f1110303011103110301030301110301030301110312f112f112f113011301110301030301130112f11103010301030100001e400000000”,“mac”:“b4:43:0d:c3:0f:f5”,“name”:“front hall off”}]

here is the events.log

2017-09-01 11:03:06.830 [ItemCommandEvent ] - Item ‘Light_FF_Front’ received command Front_Light_OFF
2017-09-01 11:03:06.860 [ItemStateChangedEvent ] - Light_FF_Front changed from Front_Light_ON to Front_Light_OFF

Nothing hapened. Do anybody see what is wrong here?

EDIT: I even tried to put the ‘data’ string directly to sendCommand(Light_FF_Front, ‘data’) and nothing happened

Hi guys

i have 3 questions

* air conditioner.

On my remote, the signal to turn on and to turn off is the same.

It means that remotely I send always the same command without knowing the current state.

I do think that the persistency could help me but In this case that the AC should be controlled only from openhab and I should not use anymore original remote.

Am I right?

Is there a better way?

* 2 one ways together on a same light

i know that the TC are one ways. i mean that if i turn off the first one, the second one will be still on.

is it possible to make a rule to synchronize them?

**

SmartOne Alarm & Security Kit Smart Home Automation

i have added succesfully

**
Broadlink RM Pro -RM2 [10.100.102.101]
Broadlink RM Mini -RM3 [10.100.102.102]
BroadLink SP3 Home Socket -SP2 [10.100.102.103]

but it’s impossible to add an SmartOne Alarm & Security Kit Smart Home Automation For BroadLink S1C For Phone, i am getting in the UI an error conflict

below the openhab.log
2017-09-01 11:15:48.461 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing ‘broadlink:rm2:34-ea-34-c7-c9-15’ to inbox.
2017-09-01 11:15:48.470 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing ‘broadlink:rm3:34-ea-34-c7-76-86’ to inbox.
2017-09-01 11:15:48.487 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing ‘broadlink:s1c:b4-43-0d-fe-e1-bf’ to inbox.
2017-09-01 11:15:48.495 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing ‘broadlink:sp2:34-ea-34-f5-ae-aa’ to inbox.
2017-09-01 11:15:48.504 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing ‘broadlink:sp2:b4-43-0d-ee-d6-04’ to inbox.
2017-09-01 11:15:58.370 [INFO ] [link.internal.socket.BroadlinkSocket] - Socket closed
2017-09-01 11:15:58.375 [INFO ] [link.internal.socket.BroadlinkSocket] - Receiver thread ended
2017-09-01 11:19:39.350 [ERROR] [home.core.thing.binding.ThingFactory] - Thing factory (class org.openhab.binding.broadlink.internal.BroadlinkHandlerFactory) returned null on create thing when it reports to support the thing type (broadlink:s1c).
2017-09-01 11:19:39.352 [WARN ] [g.discovery.internal.PersistentInbox] - Cannot create thing. No binding found that supports creating a thing of type broadlink:s1c.

and below the event log

2017-09-01 11:14:21.441 [ItemChannelLinkAddedEvent ] - Link ‘AC_LIVINGROOM-broadlink:rm2:34-ea-34-c7-c9-15:command’ has been added.
2017-09-01 11:14:21.453 [ItemChannelLinkAddedEvent ] - Link ‘WALL_LIVINGROOM-broadlink:rm2:34-ea-34-c7-c9-15:command’ has been added.
2017-09-01 11:14:21.455 [ItemChannelLinkAddedEvent ] - Link ‘Temperature-broadlink:rm2:34-ea-34-c7-c9-15:temperature’ has been added.
2017-09-01 11:14:21.457 [ItemChannelLinkAddedEvent ] - Link ‘AC_ROOM-broadlink:rm3:34-ea-34-c7-76-86:command’ has been added.
2017-09-01 11:14:28.709 [InboxAddedEvent ] - Discovery Result with UID ‘ntp:ntp:local’ has been added.
2017-09-01 11:15:48.463 [InboxAddedEvent ] - Discovery Result with UID ‘broadlink:rm2:34-ea-34-c7-c9-15’ has been added.
2017-09-01 11:15:48.476 [InboxAddedEvent ] - Discovery Result with UID ‘broadlink:rm3:34-ea-34-c7-76-86’ has been added.
2017-09-01 11:15:48.487 [InboxAddedEvent ] - Discovery Result with UID ‘broadlink:s1c:b4-43-0d-fe-e1-bf’ has been added.
2017-09-01 11:15:48.496 [InboxAddedEvent ] - Discovery Result with UID ‘broadlink:sp2:34-ea-34-f5-ae-aa’ has been added.
2017-09-01 11:15:48.505 [InboxAddedEvent ] - Discovery Result with UID ‘broadlink:sp2:b4-43-0d-ee-d6-04’ has been added.
2017-09-01 11:17:23.788 [InboxRemovedEvent ] - Discovery Result with UID ‘broadlink:rm2:34-ea-34-c7-c9-15’ has been removed.
2017-09-01 11:17:23.807 [ThingAddedEvent ] - Thing ‘broadlink:rm2:34-ea-34-c7-c9-15’ has been added.
2017-09-01 11:17:23.849 [hingStatusInfoChangedEvent] - ‘broadlink:rm2:34-ea-34-c7-c9-15’ changed from UNINITIALIZED to UNINITIALIZED (HANDLER_CONFIGURATION_PENDING)
2017-09-01 11:18:01.307 [InboxRemovedEvent ] - Discovery Result with UID ‘broadlink:rm3:34-ea-34-c7-76-86’ has been removed.
2017-09-01 11:18:01.313 [ThingAddedEvent ] - Thing ‘broadlink:rm3:34-ea-34-c7-76-86’ has been added.
2017-09-01 11:18:01.349 [hingStatusInfoChangedEvent] - ‘broadlink:rm3:34-ea-34-c7-76-86’ changed from UNINITIALIZED to UNINITIALIZED (HANDLER_CONFIGURATION_PENDING)
2017-09-01 11:18:22.361 [InboxRemovedEvent ] - Discovery Result with UID ‘broadlink:sp2:34-ea-34-f5-ae-aa’ has been removed.
2017-09-01 11:18:22.365 [ThingAddedEvent ] - Thing ‘broadlink:sp2:34-ea-34-f5-ae-aa’ has been added.
2017-09-01 11:18:22.394 [hingStatusInfoChangedEvent] - ‘broadlink:sp2:34-ea-34-f5-ae-aa’ changed from UNINITIALIZED to UNINITIALIZED (HANDLER_CONFIGURATION_PENDING)
2017-09-01 11:19:06.372 [InboxRemovedEvent ] - Discovery Result with UID ‘broadlink:sp2:b4-43-0d-ee-d6-04’ has been removed.
2017-09-01 11:19:06.376 [ThingAddedEvent ] - Thing ‘broadlink:sp2:b4-43-0d-ee-d6-04’ has been added.
2017-09-01 11:19:06.405 [hingStatusInfoChangedEvent] - ‘broadlink:sp2:b4-43-0d-ee-d6-04’ changed from UNINITIALIZED to UNINITIALIZED (HANDLER_CONFIGURATION_PENDING)

Thanks for your HELP!!!

With some direction for X-Ray181Ray I was able to mine up and running. When I connect it to my Alexa it says that item is not responding.

I believe that I have to send the commands from the rules file. Does anyone know the syntax to use to use in my rules file that turns

Sitemap
String item=TV_LIVINGROOM label=“Power” mappings=[=TV_POWER_ON"On", TV_POWER_OFF=“Off”]

To rules

rule "Living_Room_TV_On"
when
Item TV_LIVINGROOM received command ON
then
???
end

rule "Living_Room_TV_Off"
when
Item TV_LIVINGROOM received command OFF
then
???
end

If you want to make it work with alexa, you can add the tag [ “Switchable” ] for On/Off to your items file…

for a light you can use [ “Lighting” ] per example:

Dimmer iBox_Livingroom_Zone4_Dimmer “Kitchen Light” [ “Lighting” ] {channel=“milight:rgbwLed:xxxxxxxxxxx:4:ledbrightness”}

Alexa will respond to the text between the “” if you have discovered it through the alexa app.

Thanks again for the reply X-ray.

The problem I am having is the normal syntax is
String TV_LIVINGROOM “TV”

Alexa doesn’t recognize string. When I change it to switch then the IR blaster no longer responds

This works with setup but not Alexa
String TV_LIVINGROOM “TV” [ “Lighting” ] { channel=“broadlink:rm3:34-ea-34-bb-11-6e:command” }

This doesn’t work with setup but does work with Alexa
Switch TV_LIVINGROOM “TV” [ “Lighting” ] { channel=“broadlink:rm3:34-ea-34-bb-11-6e:command” }

Any ideas?

I would use switchable in stead of lighting, because its only on and off you need, but i don’t think it will work either cause the string calls the .map file which can contain a lot off broadlink commands.
Something that should work is an http command, u can make those with rm bridge and with the rm plugin android app
I use that to control my chinese robot vacuum cleaner, works well with a dedicated mini!
The plugin cato is building is still a beta so not everything is working or clear yet…

I have done this with switches as follows (works with alexa):

broadink.items

String Airco_Remote {channel = "broadlink:rm3:34-ea-34-c3-f8-c7:command"}
Switch Klima_Dummy "Klimaanlage" ["Switchable"] {autoupdate="false"}
Switch Klima_Realfeel_Dummy "Real Feel" ["Switchable"] {autoupdate="false"}
Switch Klima_Dehumidify_Dummy "Entfeuchten" ["Switchable"] {autoupdate="false"}
Switch Klima_Quiet_Dummy "Nachtmodus" ["Switchable"] {autoupdate="false"}

broadlink.rules

rule "aircon simple on"
    when
        Item Klima_Dummy received command ON
    then
        Airco_Remote.sendCommand("AIRCO_AUTO_26")
end

rule "aircon quiet on"
    when
        Item Klima_Quiet_Dummy received command ON
    then
        Airco_Remote.sendCommand("AIRCO_SILENT_26")
end

rule "aircon Dehumid on"
    when
        Item Klima_Dehumidify_Dummy received command ON
    then
        Airco_Remote.sendCommand("AIRCO_DEHUMIDIFY")
end

rule "aircon Realfeel on"
    when
        Item Klima_Realfeel_Dummy received command ON
    then
        Airco_Remote.sendCommand("AIRCO_REALFEEL")
end

rule "aircon off"
    when
        Item Klima_Dummy received command OFF or
        Item Klima_Realfeel_Dummy received command OFF or
        Item Klima_Dehumidify_Dummy received command OFF or
        Item Klima_Quiet_Dummy received command OFF
    then
        Airco_Remote.sendCommand("AIRCO_OFF")
end

In a later iteration, I’ll add logic to select the temp according to room temp (from my heating system).

2 Likes

Great job! That works!:clap:

Hi Ray, can you please help me on my previous post here?

Hello nakh, I’m not expert in this binding too, but I quite understand on how broadlink in general works.

Air conditioner
In order to know the current state, you’d better off installing current meter on your aircon, so if current is 0 then Aircon status is off, and if current is > 1 (or whatever low value you choose) then aircon status is on. Current is different on each aircon standby state, so you should experiment yourself.

2 one ways
I don’t understand on this question, but since broadlink switch only have 1 way communication, we can only send command the switches. If it means that we have no way to tell if the lamp is on or off without power current meter.

SmartOne Alarm
I don’t have any of these, so I cannot help

1 Like

Weirdly Chosen,
X-ray helped me so much it mine turn to return the favor. GitHub is not the correct page for the Authentication Key and IV parameter. When you look at the status of your IR blaster in things what does it show as the status? If it doesn’t says online then the configuration is not correct. I hate to be cryptic with my answer but this site can’t reference that page directly or this post would be deleted. You need to do more research to get the correct Authentication Key and IV parameter for the bindings.

Once you find the right page
Look for these key words.
Authentication key = initial key
IV parameter = Initial vector

thank you for your help, Eric. My IR blaster is online, but nothing happened. I tried both IR and RF command. No IR blasted from RM devices. Viewed using phone’s camera.

EDIT: I deleted the comma, space, and '0x’s from github’s page to achieve 32 character initial key and IV, if it may help.

1 Like