Broadlink send in Node red

I’m very new to Node red, about one hour new.

I’m trying to set up flows that will turn on media devices that is off.
Lets say I want to watch TV, that means the TV, Set top box and receiver needs to turn on, but also if DVD is on turn it off (I don’t have a sensor on the projector, yet…).

The problem is that this is the only way I have managed to send IR codes from Node red.


Which means I need to copy paste the packet from my configuration. I already have a switch:

  - platform: broadlink
    host: 192.168.1.112
    mac: ''
    switches:

      # TV
      tv_toggle_onoff:
        friendly_name: "TV toggle on/off"
        command_on: 'JgBUAFsbERsQDRANLSoQDRANEA0QDRANEAwRDBEMEQwRDBEMHwwRGxANEAAKxlscEBsRDBEMLSoRDBEMEA0QDRANEA0QDRANEAwRDBEMHw0QGxEMEAANBQAAAAA='
        command_off: 'JgBUAFsbERsQDRANLSoQDRANEA0QDRANEAwRDBEMEQwRDBEMHwwRGxANEAAKxlscEBsRDBEMLSoRDBEMEA0QDRANEA0QDRANEAwRDBEMHw0QGxEMEAANBQAAAAA='

Can’t I toggle the switch command on/off?
If yes, how do I do that in Node red?

When I do this:


It does not work.

Did you ever work this out?

Im trying to do the same thing.

Use the “remote” instead.
What I did there was before the new Broadlink integration and remote (I think).

1 Like

Thank you! that’s what I needed

I was trying to make it way more complicated then it needed to be and put the full hex in there.

Also if its a new RM device, you need to learn the commands again to match up with the new mac address.

Thanks again :slight_smile:

You can copy the json data, if you know what you are doing.

1 Like

I was going to try that, but the doco said to not edit those files manually. Oh well, next time :slight_smile:

Yes.
Use a json validator before you save. But I still wouldn’t recommend it if you are unsure about json.