BroadLink Mark II plugin

Can not seem to through the Tapatalk app:-(
Other forums using Tapatalk I can tho

I gave him a +1 for you.

@a-lurker,

I tried to install (version 0.54) but can’t get it to work. The new vera device does show up, but with no tabs / controls on it, and no Broadlinks are being discovered.

I found the bellow in the log. Maybe I did something wrong when creating the new device? I just entered ‘D_BroadLink_Mk2_1.xml’ as device_file, and ‘I_BroadLink_Mk2_1.xml’ as impl_file, both at ‘Create Device’ from ALTUI.

[code]JobHandler_LuaUPnP::HandleActionRequest argument UpnpDevFilename=D_BroadLink_Mk2_1.xml <0x2ffa9680>
08 04/02/18 21:24:10.577 JobHandler_LuaUPnP::HandleActionRequest argument UpnpImplFilename=I_BroadLink_Mk2_1.xml <0x2ffa9680>
09 04/02/18 21:24:22.563 JobHandler_LuaUPnP::Run device 635 ptr 0xac1050 RM Pro2 room 0 type urn:schemas-a-lurker-com:device:BroadLink_Mk2:1 cat 11:-1 id parent 0/0xb87060 upnp: 0 plugin:0 pnp:0 mac: ip: <0x2b694310>
50 04/02/18 21:24:36.253 luup_log:635: BroadLink_Mk2 debug: Initialising plugin: BroadLink_Mk2 <0x2c0d6680>
50 04/02/18 21:24:36.253 luup_log:635: BroadLink_Mk2 debug: Using: Lua 5.1 <0x2c0d6680>
50 04/02/18 21:24:36.254 luup_log:635: BroadLink_Mk2 debug: 0.54 → PluginVersion <0x2c0d6680>
06 04/02/18 21:24:36.255 Device_Variable::m_szValue_set device: 635 service: urn:a-lurker-com:serviceId:BroadLink_Mk2_1 variable: ePluginVersione was: EMPTY now: 0.54 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:0 <0x2c0d6680>
50 04/02/18 21:24:36.255 luup_log:635: BroadLink_Mk2 debug: 0 → DebugEnabled <0x2c0d6680>
06 04/02/18 21:24:36.256 Device_Variable::m_szValue_set device: 635 service: urn:a-lurker-com:serviceId:BroadLink_Mk2_1 variable: eDebugEnablede was: EMPTY now: 0 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:0 <0x2c0d6680>
06 04/02/18 21:24:36.257 Device_Variable::m_szValue_set device: 635 service: urn:a-lurker-com:serviceId:BroadLink_Mk2_1 variable: ePluginEnablede was: EMPTY now: 1 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:0 <0x2c0d6680>
06 04/02/18 21:24:36.280 Device_Variable::m_szValue_set device: 635 service: urn:a-lurker-com:serviceId:BroadLink_Mk2_1 variable: eBroadLinkDevicese was: EMPTY now: {} #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:0 <0x2c0d6680>
06 04/02/18 21:24:36.281 Device_Variable::m_szValue_set device: 635 service: urn:a-lurker-com:serviceId:BroadLink_Mk2_1 variable: ePollEnablee was: EMPTY now: 1 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:0 <0x2c0d6680>
06 04/02/18 21:24:36.292 Device_Variable::m_szValue_set device: 635 service: urn:a-lurker-com:serviceId:BroadLink_Mk2_1 variable: ePollIntervale was: EMPTY now: 300 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:0 <0x2c0d6680>
50 04/02/18 21:24:36.297 luup_log:635: BroadLink_Mk2 debug: Error: discovery msg - incorrect size <0x2c0d6680>
06 04/02/18 21:24:37.299 Device_Variable::m_szValue_set device: 635 service: urn:a-lurker-com:serviceId:BroadLink_Mk2_1 variable: eBroadLinkDevicese was: {} now: [ ] #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:0 <0x2c0d6680>

[/code]

@rvendrame - looks OK so far but with no devices discovered.

In AltUI, under the ‘Variables’ for the device, set DebugEnabled to 1 and restart the Luup engine, then post the log here.

And a question: - have you also been using any BroadLink bridge apps with your device(s)?

[quote=“a-lurker, post:44, topic:198239”]@rvendrame - looks OK so far but with no devices discovered.

In AltUI, under the ‘Variables’ for the device, set DebugEnabled to 1 and restart the Luup engine, then post the log here.

And a question: - have you also been using any BroadLink bridge apps with your device(s)?[/quote]

@a-lurker,

Yes, I had another Broadlink plugin in my Vera (which never worked as well). The e-control app works fine in my Android, so for sure the broadlink is working.

Here’s the log, is that ‘incorrect size’ message right?

Thanks for your support!

06 04/03/18 7:25:27.864 Device_Variable::m_szValue_set device: 635 service: urn:a-lurker-com:serviceId:BroadLink_Mk2_1 variable: eDebugEnablede was: 0 now: 1 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:0 <0x2f18f680> 09 04/03/18 7:25:57.910 JobHandler_LuaUPnP::Run device 635 ptr 0x11047a0 RM Pro2 room 1 type urn:schemas-a-lurker-com:device:BroadLink_Mk2:1 cat 11:-1 id parent 0/0x11ca7a0 upnp: 0 plugin:0 pnp:0 mac: ip: <0x2aafe310> 50 04/03/18 7:26:14.077 luup_log:635: BroadLink_Mk2 debug: Initialising plugin: BroadLink_Mk2 <0x2b540680> 50 04/03/18 7:26:14.078 luup_log:635: BroadLink_Mk2 debug: Using: Lua 5.1 <0x2b540680> 50 04/03/18 7:26:14.078 luup_log:635: BroadLink_Mk2 debug: 0.54 --> PluginVersion <0x2b540680> 50 04/03/18 7:26:14.103 luup_log:635: BroadLink_Mk2 debug: Using: dkjson <0x2b540680> 50 04/03/18 7:26:14.114 luup_log:635: BroadLink_Mk2 debug: 300 --> PollInterval <0x2b540680> 50 04/03/18 7:26:14.117 luup_log:635: BroadLink_Mk2 debug: Broadcasting discovery message <0x2b540680> 50 04/03/18 7:26:14.118 luup_log:635: BroadLink_Mk2 debug: 192.168.81.1 <0x2b540680> 50 04/03/18 7:26:14.121 luup_log:635: BroadLink_Mk2 debug: Rx'ed a discovery response: rxMsg length = 48 50 04/03/18 7:26:14.122 luup_log:635: BroadLink_Mk2 debug: Error: discovery msg - incorrect size <0x2b540680> 50 04/03/18 7:26:15.124 luup_log:635: BroadLink_Mk2 debug: [ ] --> BroadLinkDevices <0x2b540680>

Error: discovery msg - incorrect size

The above is just a check to make sure we have a BroadLink device (we don’t). In this case device 192.168.81.1 is replying. It’s just ignored. What sort of device is 192.168.81.1 - a router?

And the rest of the log says what?

No BroadLink devices are being discovered. Possibly a router issue?

[quote=“a-lurker, post:46, topic:198239”]

Error: discovery msg - incorrect size

The above is just a check to make sure we have a BroadLink device (we don’t). In this case device 192.168.81.1 is replying. It’s just ignored. What sort of device is 192.168.81.1 - a router?

And the rest of the log says what?

No BroadLink devices are being discovered. Possibly a router issue?[/quote]

192.168.81.1 is not in my DHCP range (192.168.1.xxx) , it should be the UPNP autodiscovery of one of my routers/modem.
I could not find anything else relevant in the logs.
The broadlink is in the same network as vera, I was able to ping it (192.168.1.95) via SSH on Vera. It is still working via e-control android app.
Can I force it manually into the plugin variables, just to test it?

Can I force it manually into the plugin variables, just to test it?

You haven’t said what sort of BroadLink device you have. The plugin knows of about thirty. Assuming you have a ‘RM2 Pro Plus 2’ or a ‘RM Mini’ you can try one of the following:

In the variable ‘BroadLinkDevices’ you probably find {} or [] Please take note and let know which type of bracket/braces were there. Update this variable by replacing the existing with the json code for either the ‘RM2 Pro Plus 2’ or a ‘RM Mini’ below with these two modifications:

  1. the device’s mac address ie replace this “3d:8e:43:43:ea:3d” with your device’s mac
  2. the the device’s ip address ie replace this “192.168.1.95” if/as necessary

Leave the rest as is - be careful to edit carefully.

Save the updated ‘BroadLinkDevices’ variable and do a restart and browser refresh - check the log. If this doesn’t work, I can look at a plan B.

{ "3d:8e:43:43:ea:3d": { "blInternalId": "????", "blKey": "097628343fe99e23765c1513accf8b02", "blDeviceType": 10119, "blIp": "192.168.1.95", "blDesc": "RM2 Pro Plus 2" } }

{ "3d:8e:43:43:ea:3d": { "blInternalId": "????", "blKey": "097628343fe99e23765c1513accf8b02", "blDeviceType": 10039, "blIp": "192.168.1.95", "blDesc": "RM Mini" } }

@a-lurker,

I have a “Broadlink RM Pro” , you can check the specs here: Broadlink RM Pro Smart Home Automation Phone Wireless Remote Universal Controlle Sale - Banggood USA sold out-arrival notice-arrival notice

The variable had ‘[ ]’, I replaced it like you mentioned, and now I got this in the logs (besides the other regular messages):

50 04/04/18 7:16:18.204 luup_log:635: BroadLink_Mk2 debug: Header to be sent follows (ex checksum): 50 04/04/18 7:16:18.208 luup_log:635: BroadLink_Mk2 debug: Payload to be sent follows (unencrypted): 50 04/04/18 7:16:18.532 luup_log:635: BroadLink_Mk2 debug: Sending: Authorisation: txMsg length = 136 <0x2b596680> 50 04/04/18 7:16:18.711 luup_log:635: BroadLink_Mk2 debug: Broadlink device: 2787 replied with: 03e9 <0x2b596680>

And no child device, nor any panel where I can operate the plugin.

Maybe my device isn’t supported (yet)?

Maybe my device isn't supported (yet)?

It is because “Broadlink device: 2787 replied with: 03e9” 2787hex which is 10119dec – refer to “blDeviceType” in json code.

It appears that Vera is communicating with your device. You may find that the json code you placed in ‘BroadLinkDevices’ variable has now changed. eg “blInternalId”: “? ? ? ?”, probably no longer contains ? ? ? ? If the json code has changed please post it here.

Possibly just need to restart the Luup engine again and refresh the browser? Keep an eye on the log and all the messages.

@a-lurker,

My mistake, sorry! The new devices were created at ‘no room’ , so I didn’t seem them before… Now I have both IR & Temp sensors!

The ‘Control’ tab at IR sensor is empty on both ALTUI & UI7, is this correct? . I can go to ‘Actions’ tab and trigger ‘LearnIRCode’ action, the broadlink lights up the yellow led (correctly), I get a popup “response ok (200)” in ALTUI but I can see the IR code anywhere. Maybe another ‘user error’?

Thanks again!

50 04/04/18 9:29:55.731 luup_log:635: BroadLink_Mk2 debug: Initialising plugin: BroadLink_Mk2 <0x2c1ac680> 50 04/04/18 9:29:55.732 luup_log:635: BroadLink_Mk2 debug: Using: Lua 5.1 <0x2c1ac680> 50 04/04/18 9:29:55.733 luup_log:635: BroadLink_Mk2 debug: 0.54 --> PluginVersion <0x2c1ac680> 50 04/04/18 9:29:55.751 luup_log:635: BroadLink_Mk2 debug: Using: dkjson <0x2c1ac680> 50 04/04/18 9:29:55.751 luup_log:635: BroadLink_Mk2 debug: 300 --> PollInterval <0x2c1ac680> 50 04/04/18 9:29:55.756 luup_log:635: BroadLink_Mk2 debug: Broadcasting discovery message <0x2c1ac680> 50 04/04/18 9:29:55.757 luup_log:635: BroadLink_Mk2 debug: 192.168.81.1 <0x2c1ac680> 50 04/04/18 9:29:55.760 luup_log:635: BroadLink_Mk2 debug: Rx'ed a discovery response: rxMsg length = 48 50 04/04/18 9:29:55.761 luup_log:635: BroadLink_Mk2 debug: Error: discovery msg - incorrect size <0x2c1ac680> 50 04/04/18 9:29:56.766 luup_log:635: BroadLink_Mk2 debug: Header to be sent follows (ex checksum): 50 04/04/18 9:29:56.770 luup_log:635: BroadLink_Mk2 debug: Payload to be sent follows (unencrypted): 50 04/04/18 9:29:56.822 luup_log:635: BroadLink_Mk2 debug: Sending: Authorisation: txMsg length = 136 <0x2c1ac680> 50 04/04/18 9:29:56.841 luup_log:635: BroadLink_Mk2 debug: Broadlink device: 2787 replied with: 03e9 <0x2c1ac680> 50 04/04/18 9:29:56.842 luup_log:635: BroadLink_Mk2 debug: Error: errorMsg = fff9 <0x2c1ac680> 50 04/04/18 9:29:56.842 luup_log:635: BroadLink_Mk2 debug: This device is probably offline - mac address: 34:ea:34:88:f5:db <0x2c1ac680> 50 04/04/18 9:29:56.843 luup_log:635: BroadLink_Mk2 debug: k = rf433 <0x2c1ac680> 50 04/04/18 9:29:56.844 luup_log:635: BroadLink_Mk2 debug: k = rf433 has no associated code at this time <0x2c1ac680> 50 04/04/18 9:29:56.844 luup_log:635: BroadLink_Mk2 debug: k = ir <0x2c1ac680> 50 04/04/18 9:29:56.845 luup_log:635: BroadLink_Mk2 debug: 34:ea:34:88:f5:db_ir <0x2c1ac680> 50 04/04/18 9:29:56.845 luup_log:635: BroadLink_Mk2 debug: 34:ea:34:88:f5:db <0x2c1ac680> 50 04/04/18 9:29:56.856 luup_log:635: BroadLink_Mk2 debug: RM Pro - IR 1 <0x2c1ac680> 50 04/04/18 9:29:56.857 luup_log:635: BroadLink_Mk2 debug: urn:schemas-micasaverde-com:device:IrTransmitter:1 <0x2c1ac680> 50 04/04/18 9:29:56.857 luup_log:635: BroadLink_Mk2 debug: D_BroadLink_Mk2_IrRf_1.xml <0x2c1ac680> 50 04/04/18 9:29:56.858 luup_log:635: BroadLink_Mk2 debug: type = function, value = function: 0x1a7a7b8 <0x2c1ac680> 50 04/04/18 9:29:56.858 luup_log:635: BroadLink_Mk2 debug: k = rf315 <0x2c1ac680> 50 04/04/18 9:29:56.859 luup_log:635: BroadLink_Mk2 debug: k = rf315 has no associated code at this time <0x2c1ac680> 50 04/04/18 9:29:56.860 luup_log:635: BroadLink_Mk2 debug: k = temp <0x2c1ac680> 50 04/04/18 9:29:56.861 luup_log:635: BroadLink_Mk2 debug: 34:ea:34:88:f5:db_temp <0x2c1ac680> 50 04/04/18 9:29:56.861 luup_log:635: BroadLink_Mk2 debug: 34:ea:34:88:f5:db <0x2c1ac680> 50 04/04/18 9:29:56.862 luup_log:635: BroadLink_Mk2 debug: RM Pro - temperature 1 <0x2c1ac680> 50 04/04/18 9:29:56.862 luup_log:635: BroadLink_Mk2 debug: urn:schemas-micasaverde-com:device:TemperatureSensor:1 <0x2c1ac680> 50 04/04/18 9:29:56.863 luup_log:635: BroadLink_Mk2 debug: D_TemperatureSensor1.xml <0x2c1ac680> 50 04/04/18 9:29:56.863 luup_log:635: BroadLink_Mk2 debug: type = function, value = function: 0x144ee78 <0x2c1ac680> 50 04/04/18 9:29:56.865 luup_log:635: BroadLink_Mk2 debug: { "34:ea:34:88:f5:db": { "blInternalId": "00000003", "blKey": "c54a800bfcbdf67a32316d6a69a4e359", "blDeviceType": 10119, "blIp": "192.168.1.100", "blDesc": "RM Pro" } } --> BroadLinkDevices <0x2c1ac680>

The 'Control' tab at IR sensor is empty on both ALTUI & UI7, is this correct?
Yes.
I get a popup "response ok (200)"
Not sure about this one but it sounds OK! A screen capture would be good.

Have a look in the parent variables for “LearntIRCode” and “LearntRFCode”. The codes should also be seen in the log.

@a-lurker, alright, thanks a lot for your support!

I wish to thank a-lurker for this awesome and incredible plugin! I was about to send my Vera Plus back to Amazon.
Let me just say that as a complete newbie (I got my Vera Plus yesterday) I had to struggle quite a bit to understand how the whole thing works (and I’m still sure I’m missing mosto of it). It would be great to had a guide for dummies :slight_smile:

Anyway, thanx once more, I’m gonna buy my next Broadlink :slight_smile:

Hi All,

I am not a VERA expert and not an IT person. Does anyone have a step by step manual (with sort of screenshot) how to set up the Broadlink RM2 with the Vera app?

Thanks a lot.

I’m getting an error installing to openLuup. I downloaded the latest plugin files from Github:

2018-04-16 17:05:14.846 openLuup.http:: GET /data_request?id=action&output_format=json&DeviceNum=0&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=CreateDevice&Description=Broadlink&UpnpDevFilename=D_BroadLink_Mk2_1.xml&UpnpImplFilename=I_BroadLink_Mk2_1.xml&RoomNum=0&Reload=1 HTTP/1.1 tcp{client}: 0x350c24a8 2018-04-16 17:05:14.848 luup.call_action:: 0.urn:micasaverde-com:serviceId:HomeAutomationGateway1.CreateDevice 2018-04-16 17:05:14.862 luup.create_device:: ERROR [74] D_BroadLink_Mk2_1.xml / I_BroadLink_Mk2_1.xml / : ./openLuup/loader.lua:330: bad argument #1 to 'ipairs' (table expected, got string)

Looks like openLuup doesn’t like empty action lists. So in the file “S_BroadLink_Mk2_1.xml” is this:

.... 
    <actionList>
        <action>
            <!-- <name>Test</name>
            <argumentList>
                <argument>
                    <name>Var1</name>
                    <direction>in</direction>
                    <relatedStateVariable>A_ARG_TYPE_Var1</relatedStateVariable>
                </argument>
                <argument>
                    <name>Var2</name>
                    <direction>in</direction>
                    <relatedStateVariable>A_ARG_TYPE_Var2</relatedStateVariable>
                </argument>
            </argumentList> -->
        </action>
    </actionList>
.... 

First thing to try is to remove the xml comment, so that the code looks like the following; upload the modified file and restart the Luup Engine.

.... 
    <actionList>
        <action>
        </action>
    </actionList>
.... 

If that doesn’t work try removing the actionList section completely. ie the code shown above. Then upload and restart. Be careful when editing not to remove anything else.

AFAIK, this is not the case.

Looks like openLuup doesn't like empty action lists.

Perhaps I should be more precise: doesn’t like “xml comments” in empty action lists. Hope to see what @Buxton finds out.

[quote=“nrv, post:55, topic:198239”]Hi All,

I am not a VERA expert and not an IT person. Does anyone have a step by step manual (with sort of screenshot) how to set up the Broadlink RM2 with the Vera app?

Thanks a lot.[/quote]
Let’s see if I remember all the steps…
Go to github page (first post) and download the files (all the xml and Json).
Then go to Vera web page under Apps->Develop Apps and select Luup files
There you can upload all the files. Once finished select create device and add D_BroadLink_Mk2_1.xml as device_file and I_BroadLink_Mk2_1.xml as impl_file
Your physical broadlink should be then discovered.

Regards