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>
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?
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).
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:
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.
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.
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>
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
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
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.
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:
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?
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>
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.