Node Red: Send data from msg with send command (remote)

Hi all,

I’ve got a Broadlink RM Mini 3 and I can succcesfully send a message from Node Red to the unit and control the TV.

The way this works: I’ve learned the code from the remote and gave this a name ie. “power”. When selected Node Red gives a send command to HA:

As you can see, the command “power” is hardcoded.

But I also have airconditioning. There are a lot of more options so I thought it would be nice to make in the UI what you want and let Node Red make the correct command and send that again to HA (for the correct Broadlink code):

image

For above example it would be: “Cool_23C_no_swing” as the command.

image

But I can’t get this msg.value as the command. I’ve tried several things:

image

Can someone point me in the right direction?

As I see it you should remove .airco_bram from the json.

Always use the complete message when you use the debug node it will make things much clearer.
But the debug message says payload is a string of 17 characters “Cool_23C_no_swing”, and the topic is “airco_bram”.
Topic and payload does not have anything in common.

I think that was it! Have to go to work now… so will test later and get back to give results.

Thank you for replying

Hi, just got home and it worked. Thanx for the quick response.