RF Code works with Inject but not Pico button press

I have a very weird bug I’m trying to solve.

A bit of background:
I have several Lutron Pico remotes that work great for LIFX bulbs local light control. I have them added via the Lutron Bridge Pro into my HassOS install on a RPi 4. I’m using them as glorified scene remotes and they are great.

All of my automations are done in Node-RED using the add-on in HassOS. I recently got a Broadlink RM pro+ IR/RF blaster to have control on my ceiling fan within home assistant. I was able to get the codes from the 433 MHz RF ceiling fan remote (that was a huge pain but I eventually figured it out) and I added them into my config file using broadlink switch component:

switch:
  - platform: broadlink
    host: 192.168.1.60
    mac: 'aa:aa:aa:aa:aa:aa'
    retry: 5
    switches:
      frog_fan_light_power:
        friendly_name: "Ceiling Light Power"
        command_on: 'sgDQAAAEEp8NKAwpDCgNKA0oDSgMKQwoDSgnDg0oJw0NKQwoJw4nDgwpDCgNKA0oDSgMKA0oDSgNKAwpDCkmDg0oDCknDgwoDQABjA0oDCkMKA0oDSgMKQwpDCgNKCcODCkmDg0oDSgnDicNDSgNKA0oDCgNKA0oDSgMKQwpDCgNKCcODSgMKSYPDCgNAAJfDSgNKA0oDCkMKQwoDSgNKA0oJw0NKCcODSgMKScNJw4NKA0oDCkMKA0oDSgNKAwoDSgNKA0oJw4MKA0oKA0NKA0ABdwAAAAAAAAAAA=='
        command_off: 'sgDQAAAEEp8NKAwpDCgNKA0oDSgMKQwoDSgnDg0oJw0NKQwoJw4nDgwpDCgNKA0oDSgMKA0oDSgNKAwpDCkmDg0oDCknDgwoDQABjA0oDCkMKA0oDSgMKQwpDCgNKCcODCkmDg0oDSgnDicNDSgNKA0oDCgNKA0oDSgMKQwpDCgNKCcODSgMKSYPDCgNAAJfDSgNKA0oDCkMKQwoDSgNKA0oJw0NKCcODSgMKScNJw4NKA0oDCkMKA0oDSgNKAwoDSgNKA0oJw4MKA0oKA0NKA0ABdwAAAAAAAAAAA=='

Clicking this “Ceiling Light Power” switch on the frontend works reliably everytime:
image
Great right?

So I got a Fan Pico remote (same as a regular Pico just with fan legends instead of lights) and added it as usual to my HassOS. I can see it and the button presses respond as all the other remotes. However, when I have it all set up in Node-RED and I press the button to toggle the light, the ceiling fan light does not turn on reliably. It will come on once every 20 presses or so.

The button I am using on the Fan Pico causes ‘sensor.frog_fan_pico’ to change to a string formatted “2”. Everything seems to be connected correctly, and I can even see the Broadlink RM Pro+ light blink when I press the button, except the ceiling fan light doesn’t come on reliably.

I’ve tried changing the number of retries, or changing the number of repeats at the end of the RF code (https://dimagoltsman.github.io/Random-Broadlink-RM-Code-Generator/#), but nothing seems to make it better.

Here’s the weird part, if I create an inject node with a payload of string “2” in Node-RED, it works EVERY TIME!

In the screenshots below the first two timestamps in the debug section (2:43:20 PM and 2:43:24 PM) were Fan Pico button presses and the light did NOT turn on. The second two were inject node clicks and the light DID turn on. Its the exact same trigger data (a string format “2”) but with completely different results. I feel like I’m going crazy, obviously something is different but I can’t figure it out. Please send help.

My other nodes in this flow for reference:


I figured it out. Lutron Caseta uses a “proprietary” 431 to 437 MHz RF signal. This interferes with the BroadLink 433 MHz signal. I just added a delay to the node-RED flow of 650 ms and now it works perfectly.

Hey just wanted to thank you for the solution, I was going crazy trying to figure out why my Bond commands weren’t working with my pico!