It's a mystery, because it looks like the events from the switch are working (no duplicates), and it works when sending a single command from the Broadlink device page (so saved code and commands to the device seem correct).
What does the logic in the Rule Machine rule look like?
Nothing is jumping out at me, and as tomw said earlier, it looks like the integration here is working properly overall.
IR stuff can be frustratingly finicky to nail down. You could try Switchbot and see if it works better for your particular setup (it might). I can vouch that it's a good option -- I used tomw's equally awesome SwitchBot integration for a year or so before moving over to BroadLink here, and it was a very reliable setup.
Hi! Does this integration automatically export the saved devices on the BL app to Hubitat? I've already managed to learn a few codes for an LG A/C, tested them and everything is OK, but the thing is that I don't see the buttons for those codes, or is anything else that I must do to make them appear?
It doesn't create buttons, I assume you mean on the BL device page? You use the send code attributes to send your saved code in RM.
I use the BL to control an old Delonghi unit in the office of my shop. All I can do is turn it on and off. I created a virtual power switch and when that switch is turned on and off it calls the codes I learned and saved. Shop AC is the BL remote device, Shop AC Power is the virtual switch. I use a virtual thermostat to monitor the temp and turn the switch on and off when AC is needed.
I assumed you meant you saved the codes using the BL device driver, but after re-reading and seeing @tomw's comment I think you just went through what I went through. You have to save your codes using the HE BL driver, you can't use the codes you generated in the BL app itself. It's pretty straight forward and easy to do, especially if you have the remote. I had to save mine using a harmony hub that I was using. I wanted to use the codes from the BL app because they had a set of user codes that worked so I didn't need to learn anything. Like you have found out you can't bring those codes over.
After you save your codes you can then use the method I just posted to send those commands to your device.
Does the BroadLink RM4 Pro (USD 45) that you comment on in this post replace the InteO ZRTSI (USD 441) for controlling roller shutter motors? This InteO controls the motors of the RTS controllers on the 433mHz frequency.
Are you replying to a specific post somewhere in this thread? If so, it's not clear who you are asking your question to.
The RM4 Pro does do 433mHz, but I don't know if it will work with that specific device. If (for instance), that device uses rolling codes instead of a fixed code, it would not work. You may want to contact Broadlink to confirm compatibility.
The InteO ZRTSI is a converter, which receives a signal as a Z-Wave device and then controls 433 mHz RTS devices such as roller shutter motors.
What I'm reading about the RM4 seems to have the same function, but with a value of 10%, so I think it would have the same function as a hub.
My question would then be whether the RM4 can control roller shutters, it seems to me that it can. How does RM4 integrate with Hubitart? Is it a drive that connects to an application on the internet? Is it a local Hubitat RM4 integration?
Well, I can answer part of your question. So, I know the RM4 can control roller shutters because I do it with mine. The roller shutters only accept an RF signal and the RM4 sits two rooms away from the roller shutters. Amazingly, the RF signal goes through two walls just fine.
So, I think for basic on / off commands it isn't all that challenging for someone who is somewhat technical, but for other commands, I'm completely lost and it feels more challenging. I've tried a number of times to use my RM4 to adjust my fan speed in some way. It can turn the fan off / on just fine, but I need to leverage the command that turns the fan speed up / down one increment. I've followed the process here many times and I'm still falling short. I know Hubitat posts on YouTube quite often. This topic would sure be nice to cover there or if there was a YouTube video that walked someone through accomplishing this from start to finish. Yes, I know I'm probably asking too much here, but I do think it would help.
Another option might be the Bond Bridge, I use it to control my roller shades,Leviosa brand. The learning process for the RF remotes was pretty straight forward, it also integrates to HE locally. It works in the 433 MHZ range.
This is going to depend on the specific roller/shutter/blind (or other RF device). The Somfy protocol seems to utilize a specific packet format which utilizes rolling codes. My integration as currently written will not support this natively, so whether or not a specific RF device can be supported is really a case-by-case situation.
It is possible but technically complicated to get the codes stored in the Broadlink app. Do not do this if you can just relearn the codes through Hubitat.
In my case, I had an RF remote that cycled through each of 8 modes; each press sent a different signal until the cycle repeated. For this reason, I was unable to learn the codes in Hubitat because I could only press the remote button once and the smart app seems to require more than one press for confirmation. I was able to learn all of the codes in the Broadlink app which required only a single remote button press, but I had to do some work to get the hex codes out for use in Hubitat.
@tomw is there a way to learn from just a single button press? That would be great as an option even if it's less reliable.
For anyone with codes stuck in the BL app that for whatever reason cannot be relearned in Hubitat...
Run mitmweb which will open a browser window allowing you to inspect web requests that pass through your proxy (press Ctrl+C to stop the proxy at any time, it's not doing anything until you connect a device to it).
On your mobile device where the BL app is installed, update your current WiFi connection to use that IP address and the port shown by mitmweb (usually 8080).
In the system browser on your mobile device (e.g. Safari on iOS) go to http://mitm.it
Follow the instructions there to trust the SSL certificate used by your mitmweb proxy.
a. If you see "traffic is not passing through mitmproxy" verify that you completed step 4 and that web traffic is showing up in your mitmweb browser.
b. On iOS 17 the instructions are outdated; after installing the certificate go to Settings > General > VPN & Device Management to trust it. Then go to Settings > General > About > Certificate Trust Settings and toggle the switch to enable full trust for the mitmproxy root certificate.
Go to an HTTPS web site in your mobile browser, like https://community.hubitat.com/, to make sure the proxy is configured correctly. If you see the web site you're good to go otherwise double-check the certificate trusting instructions for your platform.
Open the Broadlink app
Tap the device you wish to export
Tap the ... menu for the device then tap "Edit button" to reorder and rename buttons.
Tap any of the learned commands
Change the name of the command (any change is fine, we just need the app to issue a save command) then press OK
In the mitmweb browser window on your computer, look for a POST request ending in ircode/add (same for IR or RF devices). If you do not see it, try editing another command name.
Click the ircode/add request and take a look at the request data which should show all of the commands for that device.
Open the Broadlink System Manager app in Hubitat and click "Manage saved codes and import new codes into this app"
For each command:
a. Copy the code value. You can double-click the code to select all, then copy.
b. In the "Import hex codes" field type the code in this format: Command Name=b1c044, pasting the actual code in place of b1c044. Ensure that there is a comma between each command and code pair.
Click "Press to import hex codes"
Click "Return to previous page"
Click "Sync codes from this app out to virtual devices"
Select device and commands to sync then click "Press to proceed"
Once you have no further devices to migrate:
Update wifi settings on your device to stop using the proxy.
Update security settings to not trust the mitmproxy certificate.
Press Ctrl+C in the mitmweb proxy console to shut it down.
Remove the line of code that was added to the device handler.
I support this in the import page of my Broadlink System Manager app. The advantage there is that you can add them all and then batch sync them out to the virtual device(s).
I don't understand what you mean here. Will you please explain?
Thanks, the instructions were updated to use the app rather than the learnedCode hack.
I must have been doing something wrong or gotten into a weird state yesterday. The RMC4 Pro Hubitat device was refusing to learn commands with a single remote button press. I was only able to learn one button that sent the same code on each press, the "mode" button sends a different code on each press cycling through 8 options. It did work in the Broadlink app with just one press which is how I ended up down that rabbit hole. I even tried learning in Hubitat again several times after successfully learning codes in the Broadlink app in an attempt to not have to hijack the codes from the app.
Sorry for the confusion, I thought when it said "press the button multiple times" that it might be a requirement. It is working fine now learning from just a single RF button press.