mlfunston / node-red-contrib-broadlink-control

Set of node-red nodes to manage the Broadlink home automation device suite
MIT License
44 stars 24 forks source link

Long press IR button #61

Open aamoroso opened 3 years ago

aamoroso commented 3 years ago

Hi,

Sorry if this is the wrong place to ask this.

My aircon units have a single power button on the remote - for turning on and off. I can turn the aircon on using the BASE64 code I learnt. However, I cannot turn it off again. I can actually replicate this manually using the remote control. To turn the unit off I need to hold the power button down for twice as long as when turning it on. I have no idea why this is, but it happens on two of the same brand units (Daikin).

Is there a way to simulate a long press of the power button? I have tried larger values of 'repeat' in the json as below but it doesn't seem to have any effect

msg.payload = {
    "mac": remote.mac,  // Optional if configured in the RM node
    "host": remote.ip,  // Optional if configured in the RM node
    "action": "send",
    "data": command.power,
    "repeat":2
};

Thanks very much!

Adrian

mlfunston commented 3 years ago

Actually, the repeat function had never been set up to do anything as far as I can see from the original code. I will need to look into it and see.

In the meantime, had you tried tying two RM Nodes together and send it twice? Just to see if that works? Or had you tried recording the long press command in case it does something different?

aamoroso commented 3 years ago

Thanks for the reply :)

I hadn't tried stringing two nodes together. Good idea... I'll give that a go.

I've tried recording the long press via HomeAssistant before and it just gets the same code.

Cheers, Adrian

aamoroso commented 3 years ago

Update: Tried chaining a bunch of nodes together but the aircon unit sees them as lots of single press events and it doesn't turn off :(

donchesworth commented 1 year ago

Not sure if this will work for you, but when I use a long press with my Samsung TV, it's so long that it gets truncated by node-red's debug. BUT, when you are watching the console, the entire message comes through, and that worked for me! Long press was definitely a different code than multiple presses.