BroadLink Mark II plugin

Yes, that would be the Veraplus.
You were right that the Veraplus and Broadlink were on different subnets. I have now moved the Veraplus onto the same subnet as the Broadlink and performed the same procedure as the last time.

25 07/02/20 2:17:51.748 LuImplementation::StartLua device: 57 file:I_BroadLink_Mk2_1.xml startup:luaStartUp pLuaInterface: 0x13d28e0 ip: port 0 protocol: raw <0x76c90520>
25 07/02/20 2:17:51.749 LuImplementation::StartLua running startup code for 57 I_BroadLink_Mk2_1.xml <0x76c90520>
50 07/02/20 2:17:51.750 luup_log:57: BroadLink_Mk2 debug: Initialising plugin: BroadLink_Mk2 <0x76c90520>
50 07/02/20 2:17:51.750 luup_log:57: BroadLink_Mk2 debug: Using: Lua 5.1 <0x76c90520>
50 07/02/20 2:17:51.750 luup_log:57: BroadLink_Mk2 debug: 0.55 → PluginVersion <0x76c90520>
50 07/02/20 2:17:51.768 luup_log:57: BroadLink_Mk2 debug: Using: dkjson <0x76c90520>
50 07/02/20 2:17:51.779 luup_log:57: BroadLink_Mk2 debug: 300 → PollInterval <0x76c90520>
50 07/02/20 2:17:51.782 luup_log:57: BroadLink_Mk2 debug: Broadcasting discovery message <0x76c90520>
50 07/02/20 2:17:51.783 luup_log:57: BroadLink_Mk2 debug: redacted <0x76c90520>
50 07/02/20 2:17:52.784 luup_log:57: BroadLink_Mk2 debug: {} → BroadLinkDevices <0x76c90520>
10 07/02/20 2:17:52.789 XXX-UpdateSystemMessagesTasks StartupTask #7 = 4 All OK / BroadLink_Mk2 <0x76a90520>
10 07/02/20 2:17:52.811 XXX-UpdateSystemMessagesTasks StartupTask #7 = 4 OK / BroadLink_Mk2 <0x76a90520>
10 07/02/20 2:17:59.914 mg_callback from IP:127.0.0.1:51044 /port_3480/data_request id=lr_ALTUI_Handler&command=oscommand&oscommand=tail%20-n%201500%20%2Fvar%2Flog%2Fcmh%2FLuaUPnP.log%20%7C%20grep%20-i%20BroadLink_Mk2&_=1593652515951 start id: 52 <0x72a19520>
12 07/02/20 2:17:59.914 luvd_get_info_data_request starting /data_request?id=lr_ALTUI_Handler&command=oscommand&oscommand=tail%20-n%201500%20%2Fvar%2Flog%2Fcmh%2FLuaUPnP.log%20%7C%20grep%20-i%20BroadLink_Mk2&_=1593652515951 pMem 0x164c000/23379968 diff: 7598080 <0x72a19520>

OK - same as before. The BroadLink device is not responding to the broadcasts. May be a router issue? Can you Ping it from the Vera Edge? Using AltUI go to Misc–>OsCommand then enter a ping command and see what happens.

The plugin needs to id your BroadLink device - until it can, it’s a problem. In previous cases we knew the BroadLink device type and could manually enter as you previously tried with the json code. However with a brand new device (which yours appears to be) we need the magic BroadLink device type code in order to proceed.

Ping from ALTUI I get ‘failed to execute’
Tried pinging from laptop on the same subnet and I get ‘No route to host’
I can ping other devices like Veraplus.
Not sure how to resolve?

I did that and crashed my system. I think we need a network engineer to chime in?

The newest class of Broadlink devices will not respond locally if they have been “provisioned” with the Broadlink cloud via the Broadlink app. You have to disable cloud access first. Here is how others have done it - Red RM Mini 3 does not work · Issue #30215 · home-assistant/core · GitHub. Try that and then see if the discovery works.

Not 100% clear but I tried to follow the suggestions and I got to the stage where its looks like the Broadlink is broadcasting on WI-FI the device Universal Remote (unsecured, also interesting in their doc they say the device should be named BroadLink_??? or a variation).

I then re-ran as before but still not picked up

50 07/02/20 14:40:35.705 luup_log:57: BroadLink_Mk2 debug: Initialising plugin: BroadLink_Mk2 <0x77594520>
50 07/02/20 14:40:35.705 luup_log:57: BroadLink_Mk2 debug: Using: Lua 5.1 <0x77594520>
50 07/02/20 14:40:35.716 luup_log:57: BroadLink_Mk2 debug: 0.55 → PluginVersion <0x77594520>
50 07/02/20 14:40:35.733 luup_log:57: BroadLink_Mk2 debug: Using: dkjson <0x77594520>
50 07/02/20 14:40:35.734 luup_log:57: BroadLink_Mk2 debug: 300 → PollInterval <0x77594520>
50 07/02/20 14:40:35.737 luup_log:57: BroadLink_Mk2 debug: Broadcasting discovery message <0x77594520>
50 07/02/20 14:40:35.738 luup_log:57: BroadLink_Mk2 debug: redacted <0x77594520>
50 07/02/20 14:40:36.739 luup_log:57: BroadLink_Mk2 debug: {} → BroadLinkDevices <0x77594520>
10 07/02/20 14:40:36.745 XXX-UpdateSystemMessagesTasks StartupTask #7 = 4 All OK / BroadLink_Mk2 <0x77394520>
10 07/02/20 14:40:36.766 XXX-UpdateSystemMessagesTasks StartupTask #7 = 4 OK / BroadLink_Mk2 <0x77394520>
10 07/02/20 14:40:42.772 mg_callback from IP:127.0.0.1:59250 /port_3480/data_request id=lr_ALTUI_Handler&command=oscommand&oscommand=tail%20-n%201500%20%2Fvar%2Flog%2Fcmh%2FLuaUPnP.log%20%7C%20grep%20-i%20Broadlink_mk2&_=1593693361516 start id: 60 <0x72f1d520>
12 07/02/20 14:40:42.772 luvd_get_info_data_request starting /data_request?id=lr_ALTUI_Handler&command=oscommand&oscommand=tail%20-n%201500%20%2Fvar%2Flog%2Fcmh%2FLuaUPnP.log%20%7C%20grep%20-i%20Broadlink_mk2&_=1593693361516 pMem 0x12cb000/19705856 diff: 7593984 <0x72f1d520>

Step forward?

25 07/03/20 0:16:17.127 LuImplementation::StartLua running startup code for 57 I_BroadLink_Mk2_1.xml <0x77476520>
50 07/03/20 0:16:17.127 luup_log:57: BroadLink_Mk2 debug: Initialising plugin: BroadLink_Mk2 <0x77476520>
50 07/03/20 0:16:17.127 luup_log:57: BroadLink_Mk2 debug: Using: Lua 5.1 <0x77476520>
50 07/03/20 0:16:17.128 luup_log:57: BroadLink_Mk2 debug: 0.55 → PluginVersion <0x77476520>
50 07/03/20 0:16:17.148 luup_log:57: BroadLink_Mk2 debug: Using: dkjson <0x77476520>
50 07/03/20 0:16:17.148 luup_log:57: BroadLink_Mk2 debug: 300 → PollInterval <0x77476520>
50 07/03/20 0:16:17.152 luup_log:57: BroadLink_Mk2 debug: Broadcasting discovery message <0x77476520>
50 07/03/20 0:16:17.153 luup_log:57: BroadLink_Mk2 debug: redacted Veraplus <0x77476520>
50 07/03/20 0:16:17.702 luup_log:57: BroadLink_Mk2 debug: redacted Broadlink app iPhone <0x77476520>
50 07/03/20 0:16:17.704 luup_log:57: BroadLink_Mk2 debug: **Rx’ed a discovery response: rxMsg length = 48
50 07/03/20 0:16:17.705 luup_log:57: BroadLink_Mk2 debug: Error: discovery msg - incorrect size: redacted Broadlink app iphone <0x77476520>
50 07/03/20 0:16:18.705 luup_log:57: BroadLink_Mk2 debug: {} → BroadLinkDevices <0x77476520>
10 07/03/20 0:16:18.712 XXX-UpdateSystemMessagesTasks StartupTask #7 = 4 All OK / BroadLink_Mk2 <0x77276520>
10 07/03/20 0:16:18.722 XXX-UpdateSystemMessagesTasks StartupTask #7 = 4 OK / BroadLink_Mk2 <0x77276520>
10 07/03/20 0:16:22.086 mg_callback from IP:127.0.0.1:38427 /port_3480/data_request id=lr_ALTUI_Handler&command=oscommand&oscommand=tail%20-n%201500%20%2Fvar%2Flog%2Fcmh%2FLuaUPnP.log%20%7C%20grep%20-i%20Broadlink_mk2&_=1593722570141 start id: 37 <0x7341b520>
12 07/03/20 0:16:22.086 luvd_get_info_data_request starting /data_request?id=lr_ALTUI_Handler&command=oscommand&oscommand=tail%20-n%201500%20%2Fvar%2Flog%2Fcmh%2FLuaUPnP.log%20%7C%20grep%20-i%20Broadlink_mk2&_=1593722570141 pMem 0x14c2000/21766144 diff: 7602176 <0x7341b520>

Doesn’t look it. In fact, given Blacey’s comments, looks like you are in a bit of a pickle on this one. I had a ‘quick’ read through the nearly 500 comments on the topic linked by Blacey. Didn’t come out the other side with much of a clear result. Has anyone?

I have to say, I find it really annoying that the manufacturer’s in general don’t provide a little API with just a bit of JSON to get things going. Problem is; there is virtually no money in the hardware. It’s all about getting their own little software ecosystem going, so they can value add when the figure out how to do that. Everyone ends up with about twenty apps on their phone to getting anything happening around their house.

In short until the Broadlink device can be discovered it’s probably a no go.

I figured why the ping caused me problems. It doesn’t stop until Control C if hit - bit hard through AltUI - unlike Windows that does stop by itself after a few pings. Need to put a count switch on it, like so:

ping -c 5 BroadLink_IP_address

Hmm, I think you are right. I now have to see if I should/can return the unit and get an RM3.
As you say the manufacture doesn’t provide much help, but considering that it would be in their interest that people see how easy it is to setup etc. and therefore buy never makes sense.
I am happy to get in contact with their support and try to get something sorted out. If you don’t mind giving me the exact questions I need to ask. Knowing how their support works you have to ask precise questions otherwise it becomes long drawn out exercise.

This has returned a device type?

50 07/07/20 12:48:43.907 luup_log:57: BroadLink_Mk2 debug: Rx’ed a discovery response: rxMsg length = 128
50 07/07/20 12:48:43.907 luup_log:57: BroadLink_Mk2 debug: The BroadLink device at IP address redacted and of type 0x6026 is not known to this plugin <0x76bb4520>
50 07/07/20 12:48:44.908 luup_log:57: BroadLink_Mk2 debug: {} → BroadLinkDevices <0x76bb4520>
10 07/07/20 12:48:44.914 XXX-UpdateSystemMessagesTasks StartupTask #7 = 4 All OK / BroadLink_Mk2 <0x769b4520>
10 07/07/20 12:48:44.935 XXX-UpdateSystemMessagesTasks StartupTask #7 = 4 OK / BroadLink_Mk2 <0x769b4520>
10 07/07/20 12:48:45.913 mg_callback from IP:127.0.0.1:57852 /port_3480/data_request id=lr_ALTUI_Handler&command=oscommand&oscommand=tail%20-n%201500%20%2Fvar%2Flog%2Fcmh%2FLuaUPnP.log%20%7C%20grep%20-i%20broadlink_mk2&_=1594122466138 start id: 25 <0x73759520>
12 07/07/20 12:48:45.913 luvd_get_info_data_request starting /data_request?id=lr_ALTUI_Handler&command=oscommand&oscommand=tail%20-n%201500%20%2Fvar%2Flog%2Fcmh%2FLuaUPnP.log%20%7C%20grep%20-i%20broadlink_mk2&_=1594122466138 pMem 0x166d000/23515136 diff: 7950336 <0x73759520>

You are making good progress. As @a-lurker surmised, the plugin has not yet been configured to support device id 0x6026. The following changes here should work.

You can grab this file from GitHub if you want and upload it to your Vera to see if it works. If it does, report back and @a-lurker can make the official changes.

uploaded the modified lua file and re-ran.
Got further but response from broadlink failed?
tried pinging the broadlink device but failed as well

09 07/08/20 1:48:52.708 JobHandler_LuaUPnP::Run device 57 ptr 0x1014620 Broadlink RM4 PRO room 1 type urn:schemas-a-lurker-com:device:BroadLink_Mk2:1 cat 11:-1 id parent 0/0x10b2570 upnp: 0 plugin:0 pnp:0 mac: ip: <0x775f6320>
25 07/08/20 1:48:56.716 LuImplementation::StartLua device: 57 file:I_BroadLink_Mk2_1.xml startup:luaStartUp pLuaInterface: 0x12b5160 ip: port 0 protocol: raw <0x76c20520>
25 07/08/20 1:48:56.717 LuImplementation::StartLua running startup code for 57 I_BroadLink_Mk2_1.xml <0x76c20520>
50 07/08/20 1:48:56.718 luup_log:57: BroadLink_Mk2 debug: Initialising plugin: BroadLink_Mk2 <0x76c20520>
50 07/08/20 1:48:56.718 luup_log:57: BroadLink_Mk2 debug: Using: Lua 5.1 <0x76c20520>
50 07/08/20 1:48:56.718 luup_log:57: BroadLink_Mk2 debug: 0.55 → PluginVersion <0x76c20520>
50 07/08/20 1:48:56.739 luup_log:57: BroadLink_Mk2 debug: Using: dkjson <0x76c20520>
50 07/08/20 1:48:56.740 luup_log:57: BroadLink_Mk2 debug: 300 → PollInterval <0x76c20520>
50 07/08/20 1:48:56.744 luup_log:57: BroadLink_Mk2 debug: Broadcasting discovery message <0x76c20520>
50 07/08/20 1:48:56.745 luup_log:57: BroadLink_Mk2 debug: redacted iPhone <0x76c20520>
10 07/08/20 1:48:56.783 mg_callback from IP:127.0.0.1:38810 /port_3480/data_request id=lr_ALTUI_Handler&command=oscommand&oscommand=tail%20-n%201500%20%2Fvar%2Flog%2Fcmh%2FLuaUPnP.log%20%7C%20grep%20-i%20broadlink_mk2&_=1594169302343 start id: 3 <0x72bc5520>
12 07/08/20 1:48:56.783 luvd_get_info_data_request starting /data_request?id=lr_ALTUI_Handler&command=oscommand&oscommand=tail%20-n%201500%20%2Fvar%2Flog%2Fcmh%2FLuaUPnP.log%20%7C%20grep%20-i%20broadlink_mk2&_=1594169302343 pMem 0x16cd000/23908352 diff: 7110656 <0x72bc5520>
10 07/08/20 1:48:56.784 luvd_get_info_data_request creating file buffer /data_request?id=lr_ALTUI_Handler&command=oscommand&oscommand=tail%20-n%201500%20%2Fvar%2Flog%2Fcmh%2FLuaUPnP.log%20%7C%20grep%20-i%20broadlink_mk2&_=1594169302343 pMem 0x16cd000/23908352 diff: 7110656 <0x72bc5520>
10 07/08/20 1:48:56.785 luvd_get_info_data_request done /data_request?id=lr_ALTUI_Handler&command=oscommand&oscommand=tail%20-n%201500%20%2Fvar%2Flog%2Fcmh%2FLuaUPnP.log%20%7C%20grep%20-i%20broadlink_mk2&_=1594169302343 ret 0 size 10 pMem 0x16cd000/23908352 diff: 7110656 took 0 info (nil) <0x72bc5520>
50 07/08/20 1:48:57.748 luup_log:57: BroadLink_Mk2 debug: Header to be sent follows (ex checksum):
50 07/08/20 1:48:57.751 luup_log:57: BroadLink_Mk2 debug: Payload to be sent follows (unencrypted):
50 07/08/20 1:48:57.778 luup_log:57: BroadLink_Mk2 debug: Sending: Authorisation: txMsg length = 136 <0x76c20520>
50 07/08/20 1:48:58.779 luup_log:57: BroadLink_Mk2 debug: RX of Authorisation msg response from redacted broadlink device failed: timeout <0x76c20520>
50 07/08/20 1:48:58.780 luup_log:57: BroadLink_Mk2 debug: This device is probably offline - mac address: 24:df:a7:d3:2c:05 <0x76c20520>
50 07/08/20 1:48:58.780 luup_log:57: BroadLink_Mk2 debug: k = ir <0x76c20520>
50 07/08/20 1:48:58.780 luup_log:57: BroadLink_Mk2 debug: 24:df:a7:d3:2c:05_ir <0x76c20520>
50 07/08/20 1:48:58.781 luup_log:57: BroadLink_Mk2 debug: 24:df:a7:d3:2c:05 <0x76c20520>
50 07/08/20 1:48:58.781 luup_log:57: BroadLink_Mk2 debug: RM4 Pro - IR 1 <0x76c20520>
50 07/08/20 1:48:58.781 luup_log:57: BroadLink_Mk2 debug: urn:schemas-micasaverde-com:device:IrTransmitter:1 <0x76c20520>
50 07/08/20 1:48:58.781 luup_log:57: BroadLink_Mk2 debug: D_BroadLink_Mk2_IrRf_1.xml <0x76c20520>
50 07/08/20 1:48:58.782 luup_log:57: BroadLink_Mk2 debug: type = function, value = function: 0x10c3ce8 <0x76c20520>
50 07/08/20 1:48:58.783 luup_log:57: BroadLink_Mk2 debug: {“24:df:a7:d3:2c:05”:{“blInternalId”:“???”,“blKey”:“097628343fe99e23765c1513accf8b02”,“blDeviceType”:24614,“blIp”:“redacted broadlink device”,“blDesc”:“RM4 Pro”}} → BroadLinkDevices <0x76c20520>
11 07/08/20 1:48:58.783 Child_Devices::AddChild id 24:df:a7:d3:2c:05_ir parent id pnp:0 embed:0 invis:0 device type urn:schemas-micasaverde-com:device:IrTransmitter:1 parent device: 57 devfile:D_BroadLink_Mk2_IrRf_1.xml desc:RM4 Pro - IR 1 parms: <0x76c20520>
10 07/08/20 1:48:58.789 XXX-UpdateSystemMessagesTasks StartupTask #7 = 4 All OK / BroadLink_Mk2 <0x76a20520>
10 07/08/20 1:48:58.810 XXX-UpdateSystemMessagesTasks StartupTask #7 = 4 OK / BroadLink_Mk2 <0x76a20520>
10 07/08/20 1:49:01.625 mg_callback from IP:127.0.0.1:38821 /port_3480/data_request id=lr_ALTUI_Handler&command=oscommand&oscommand=tail%20-n%201500%20%2Fvar%2Flog%2Fcmh%2FLuaUPnP.log%20%7C%20grep%20-i%20broadlink_mk2&_=1594169302347 start id: 12 <0x727a6520>
12 07/08/20 1:49:01.625 luvd_get_info_data_request starting /data_request?id=lr_ALTUI_Handler&command=oscommand&oscommand=tail%20-n%201500%20%2Fvar%2Flog%2Fcmh%2FLuaUPnP.log%20%7C%20grep%20-i%20broadlink_mk2&_=1594169302347 pMem 0x16fe000/24109056 diff: 7311360 <0x727a6520>

If you can’t ping it, it’s probably still in Access Point mode and needs to be further configured.

Edit: missed the bit where it was clear you could ping it and or get a response from it.

I can now control the broadlink device through the broadlink phone app.
I can ping the broadlink device through ALTUI.
Still issues with saying device offline
I am conscious of posting a lot of logs so please let me know if I need to be

50 07/08/20 11:00:09.636 luup_log:57: BroadLink_Mk2 debug: ??? <0x774d6520>
50 07/08/20 11:00:09.637 luup_log:57: BroadLink_Mk2 debug: 097628343fe99e23765c1513accf8b02 <0x774d6520>
50 07/08/20 11:00:10.639 luup_log:57: BroadLink_Mk2 debug: Header to be sent follows (ex checksum):
50 07/08/20 11:00:10.643 luup_log:57: BroadLink_Mk2 debug: Payload to be sent follows (unencrypted):
50 07/08/20 11:00:10.669 luup_log:57: BroadLink_Mk2 debug: Sending: Authorisation: txMsg length = 136 <0x774d6520>
50 07/08/20 11:00:10.682 luup_log:57: BroadLink_Mk2 debug: Broadlink device: 6026 replied with: 03e9 <0x774d6520>
50 07/08/20 11:00:10.682 luup_log:57: BroadLink_Mk2 debug: Error: errorMsg = ffff <0x774d6520>
50 07/08/20 11:00:10.683 luup_log:57: BroadLink_Mk2 debug: This device is probably offline - mac address: 24:df:a7:d3:2c:05 <0x774d6520>
50 07/08/20 11:00:10.683 luup_log:57: BroadLink_Mk2 debug: k = ir <0x774d6520>
50 07/08/20 11:00:10.683 luup_log:57: BroadLink_Mk2 debug: 24:df:a7:d3:2c:05_ir <0x774d6520>
50 07/08/20 11:00:10.684 luup_log:57: BroadLink_Mk2 debug: 24:df:a7:d3:2c:05 <0x774d6520>
50

You’ll appreciate the reverse engineering on all of the BroadLink devices is a little “unclear”. So this value of 0xffff may in fact be OK (I’ve not seen it before):

   BroadLink_Mk2 debug: Error: errorMsg = ffff

It may be worthwhile deleting this line in the code, restarting the Luup engine and see what happens:

    if (errorMsg ~= '0000') then debug('Error: errorMsg = '..errorMsg,50) return ok end

commented out the line and rerun
ping still worked

50 07/08/20 14:24:05.573 luup_log:57: BroadLink_Mk2 debug: Rx’ed a discovery response: rxMsg length = 128
50 07/08/20 14:24:05.574 luup_log:57: BroadLink_Mk2 debug: 24:df:a7:d3:2c:05 <0x76db6520>
50 07/08/20 14:24:05.574 luup_log:57: BroadLink_Mk2 debug: redacted <0x76db6520>
50 07/08/20 14:24:05.574 luup_log:57: BroadLink_Mk2 debug: BroadLink device type: 0x6026 <0x76db6520>
50 07/08/20 14:24:05.575 luup_log:57: BroadLink_Mk2 debug: RM4 Pro <0x76db6520>
50 07/08/20 14:24:05.575 luup_log:57: BroadLink_Mk2 debug: ??? <0x76db6520>
50 07/08/20 14:24:05.575 luup_log:57: BroadLink_Mk2 debug: 097628343fe99e23765c1513accf8b02 <0x76db6520>
50 07/08/20 14:24:06.579 luup_log:57: BroadLink_Mk2 debug: Header to be sent follows (ex checksum):
50 07/08/20 14:24:06.582 luup_log:57: BroadLink_Mk2 debug: Payload to be sent follows (unencrypted):
50 07/08/20 14:24:06.610 luup_log:57: BroadLink_Mk2 debug: Sending: Authorisation: txMsg length = 136 <0x76db6520>
50 07/08/20 14:24:06.624 luup_log:57: BroadLink_Mk2 debug: Broadlink device: 6026 replied with: 03e9 <0x76db6520>
50 07/08/20 14:24:06.625 luup_log:57: BroadLink_Mk2 debug: Received: Authorisation: rxMsg length = 56 <0x76db6520>
50 07/08/20 14:24:06.627 luup_log:57: BroadLink_Mk2 debug: No payload found. Header follows:
50 07/08/20 14:24:06.627 luup_log:57: BroadLink_Mk2 debug: This device is probably offline - mac address: 24:df:a7:d3:2c:05 <0x76db6520>
50

The newer broadlink devices can not be controlled while paired with the broad link cloud (i.e. configured to be used with the app). Did you reset the RM4 to clear the cloud bit so the Vera plugin is able to communicate with the device locally?

It has been a while but I followed the instructions I posted above to reset the device and then used the python cli here to configure it to join my WiFi and then @a-lurker’s plugin was able to communicate with it.

broadlink_cli --joinwifi MySSID MyWifiPassword

Hello Blacey

I put the code in for the AP pairing along time ago but it’s sitting there orphaned. I think it works. I wasn’t prepared to spend a lot of time on testing it, as the actual functionality of the plugin was more important at the time.

The AP pairing would also be a bit of a problem to make use of, as users would need to pass in their SSID and password, which raise security issues. Plus the user may have to play around with their wpa_supplicant.conf files, etc I thought it would be a lot easier and more reliable for users to just use their phone app but it looks as though that situation has changed.

Possibly it could be made a service with the SSID and password having to be entered each time it was used. A search on “sendPairingMsg” shows various comments about it:

sendPairingMsg()

I’m busy on other stuff, so not ready to do this myself as yet.

1 Like

So I have reset the RM4 and made sure there is no connection via the broadlink apps.
I also downloaded the broadlink_cli but am not sure if that did anything, but the logs seem to show more communication but not sure how to tell what should be happening now?

50 07/09/20 13:35:26.522 luup_log:57: BroadLink_Mk2 debug: Rx’ed a discovery response: rxMsg length = 128
50 07/09/20 13:35:26.523 luup_log:57: BroadLink_Mk2 debug: 24:df:a7:d3:2c:05 <0x77486520>
50 07/09/20 13:35:26.523 luup_log:57: BroadLink_Mk2 debug: redacted <0x77486520>
50 07/09/20 13:35:26.524 luup_log:57: BroadLink_Mk2 debug: BroadLink device type: 0x6026 <0x77486520>
50 07/09/20 13:35:26.524 luup_log:57: BroadLink_Mk2 debug: RM4 Pro <0x77486520>
50 07/09/20 13:35:26.524 luup_log:57: BroadLink_Mk2 debug: ??? <0x77486520>
50 07/09/20 13:35:26.524 luup_log:57: BroadLink_Mk2 debug: 097628343fe99e23765c1513accf8b02 <0x77486520>
50 07/09/20 13:35:27.528 luup_log:57: BroadLink_Mk2 debug: Header to be sent follows (ex checksum):
50 07/09/20 13:35:27.532 luup_log:57: BroadLink_Mk2 debug: Payload to be sent follows (unencrypted):
50 07/09/20 13:35:27.560 luup_log:57: BroadLink_Mk2 debug: Sending: Authorisation: txMsg length = 136 <0x77486520>
50 07/09/20 13:35:27.746 luup_log:57: BroadLink_Mk2 debug: Broadlink device: 6026 replied with: 03e9 <0x77486520>
50 07/09/20 13:35:27.771 luup_log:57: BroadLink_Mk2 debug: Received: Authorisation: rxMsg length = 88 decrypted msg follows:
50 07/09/20 13:35:27.772 luup_log:57: BroadLink_Mk2 debug: Rx’ed payload follows:
50 07/09/20 13:35:27.773 luup_log:57: BroadLink_Mk2 debug: blKey: d013830c784b69327ec45d2e462804d4, blInternalId: 00000001 <0x77486520>
50 07/09/20 13:35:27.773 luup_log:57: BroadLink_Mk2 debug: k = ir <0x77486520>
50 07/09/20 13:35:27.774 luup_log:57: BroadLink_Mk2 debug: 24:df:a7:d3:2c:05_ir <0x77486520>
50 07/09/20 13:35:27.775 luup_log:57: BroadLink_Mk2 debug: 24:df:a7:d3:2c:05 <0x77486520>
50 07/09/20 13:35:27.775 luup_log:57: BroadLink_Mk2 debug: RM4 Pro - IR 1 <0x77486520>
50 07/09/20 13:35:27.776 luup_log:57: BroadLink_Mk2 debug: urn:schemas-micasaverde-com:device:IrTransmitter:1 <0x77486520>
50 07/09/20 13:35:27.776 luup_log:57: BroadLink_Mk2 debug: D_BroadLink_Mk2_IrRf_1.xml <0x77486520>
50 07/09/20 13:35:27.777 luup_log:57: BroadLink_Mk2 debug: type = function, value = function: 0xa687a0 <0x77486520>
50 07/09/20 13:35:27.778 luup_log:57: BroadLink_Mk2 debug: {“24:df:a7:d3:2c:05”:{“blInternalId”:“00000001”,“blKey”:“d013830c784b69327ec45d2e462804d4”,“blDeviceType”:24614,“blIp”:“redacted”,“blDesc”:“RM4 Pro”}} → BroadLinkDevices <0x77486520>
11 07/09/20 13:35:27.779 Child_Devices::AddChild id 24:df:a7:d3:2c:05_ir parent id pnp:0 embed:0 invis:0 device type urn:schemas-micasaverde-com:device:IrTransmitter:1 parent device: 57 devfile:D_BroadLink_Mk2_IrRf_1.xml desc:RM4 Pro - IR 1 parms: <0x77486520>
10 07/09/20 13:35:27.797 XXX-UpdateSystemMessagesTasks StartupTask #7 = 4 OK / BroadLink_Mk2 <0x77286520>
10 07/09/20 13:35:27.802 XXX-UpdateSystemMessagesTasks StartupTask #7 = 4 OK / BroadLink_Mk2 <0x77286520>
10 07/09/20 13:35:27.876 mg_callback from IP:127.0.0.1:41013 /port_3480/data_request id=lr_ALTUI_Handler&command=oscommand&oscommand=tail%20-n%201500%20%2Fvar%2Flog%2Fcmh%2FLuaUPnP.log%20%7C%20grep%20-i%20broadlink_mk2&_=1594290862290 start id: 23 <0x7342b520>
12 07/09/20 13:35:27.876 luvd_get_info_data_request starting /data_request?id=lr_ALTUI_Handler&command=oscommand&oscommand=tail%20-n%201500%20%2Fvar%2Flog%2Fcmh%2FLuaUPnP.log%20%7C%20grep%20-i%20broadlink_mk2&_=1594290862290 pMem 0x1061000/17174528 diff: 7688192 <0x7342b520>

Yeah, I saw the pairing code there but never tried it. That would be good if it worked and I thought that you had set it up so user’s would place their username and password in the plugin source code - they could do that temporarily to pair it and then re-upload the file lua plugin file to remove it.

I know the feeling of busy on other stuff - we are in the midst of a sizable home remodel project that is consuming literally all of my disposable time so I can’t auger into it right now either.

That looks better. What you should do now is to try learning and IR code on the RM4 and look at the communication in the logs. If it is working, you will see the learning sequence along with IR code in the logs.

Thanks for forging the RM4 path and sharing with others here. I’m feeling confident that you are pretty close, if not already there.