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

Confirmation for RM4 PRO IR sending is not working #47

Open luigijava opened 4 years ago

luigijava commented 4 years ago

The learn returns data. But I can't even know if they're right because it says "data sent" but the air conditioner doesn't respond.

luigijava commented 4 years ago

typeid: "6026" type: "RM4 Pro"

GeorgeLee888 commented 4 years ago

RM4 Pro IR learn data -> RM4 Pro send data = Unstable . (TV remote control OK , air conditioning no response Or just send out a very short code) RM4 Pro IR learn data -> RM2 Pro Plus3 send data = OK. RM2 Pro Plus3 IR learn data -> RM4 Pro send data = OK.

mlfunston commented 4 years ago

Odd - Learning should provide the same IR data string from both hardware types. Is that the case?

thermseekr commented 3 years ago

hello

I've been using an RM4 Pro for a few months now. First thing I noticed is that I can't read full codes from my air Samsung air conditioner remote. The reading gets halted, as if it reaches a max time or bit count, then stops reading. Code from the remote is 2x 7 byte bursts.

Also, sending IR codes is kinda unstable. I couldn't yet trace it but for some reason when I reboot Home Assistant it stops transmitting long codes as the one for the Fujitsu aircon I have in the room where the RM4 Pro is installed. Shorter codes as TV and cable decoders work well. For the long codes, I can see the LED going on so it's transmitting something, maybe it's halting the Tx code as it seems to do with the Rx. Again, couldn't pinpoint it yet but there's something that triggers it get back to working with long codes. Maybe when I re-deploy nodes after editing the RM nodes.

Sorry for such vague information but I haven't been able to touch my system in the last two months and I'm trying to recall whatever I can from memory. If you can direct me as to where/how to look I may be able to provide more accurate information.

Thank you for your time&effort on writing these nodes. Regards Tales

sirhideo commented 3 years ago

I have a new RM4 pro type 653c. I can learn code from node red no problem, send the base64 from Home Assistant no problem, but cannot send through node-red. The red LED on device never turn on when clicking the inject node :(

mikecay commented 2 years ago

I have the same issue. I have a RM4 Pro type 649b. It seems to learn all codes but when it comes to sending only things like TV or light remotes work. I have a remote to control my spit AC/Heating unit, the RM 4 Pro seems to learn the code and when I send the code the red LED come on but nothing happens on the AC/Heating unit.

mondedos commented 2 years ago

Odd - Learning should provide the same IR data string from both hardware types. Is that the case?

Hello,

I definitely confirm that it is a bug of this development. The problem is that it does not send long lR codes, neither in base 64 nor in array format.

I have performed the following test. I have two broadlink at home, the mini 3 and the mini 4 and I have tried the following scenarios.

Case 1 Code => [38,0,88,0,0,1,33,148,19,18,18,56,17,20,18,19,17,19,18,19,18,19,18,19, 19,55,19,18,18,56,17,56,19,55,19,55,18,19,18,55,19,55,19,55,18,19,18,19,18, 55,19,18,18,56,18,19,19,18,19,18,18,56,17,56,19,18,18,56,19,18,19,55,17,0, 5,62,0,1,38,74,19,0,12,82,0,1,39,73,18,0,13,5,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0]

I put the mini 3 in learning mode and send from the mini 4 a short frame, then the mini 3 receives the code correctly.

I put the mini 4 in learning mode and send from the mini 3 a short frame, then the mini 4 receives the code correctly.

case 2 Code =>

[38,0,6,1,103,54,13,14,13,14,13,40,14,14,13,40,14,13,14,14,13,14,14,40, 13,40,14,13,14,14,13,14,13,40,14,40,14,14,13,14,13,17,14,14,13,14,13,14,13, 14,14,13,14,14,13,14,13,14,14,13,14,14,13,40,14,13,14,14,13,14,14,13,14,13, 14,14,13,14,13,40,14,14,13,14,13,14,13,15,13,41,13,40,14,40,14,40,13,40,14, 40,13,41,13,40,14,14,13,14,13,41,13,14,13,14,13,14,13,15,13,14,13,14,13,14, 13,14,14,40,13,40,14,14,13,14,13,41,13,14,13,14,13,14,14,13,14,14,13,14,13, 41,13,40,14,13,14,14,13,14,13,14,13,14,14,13,14,14,13,14,13,14,14,40,13,14, 13,14,14,13,14,14,13,14,14,13,14,13,14,14,13,14,13,14,13,14,14,13,14,14,13, 14,13,14,14,13,14,14,13,14,13,14,13,14,14,14,13,14,13,14,13,14,14,14,13,14, 15,12,13,14,14,14,13,14,13,14,13,14,14,13,14,14,13,40,14,13,14,14,13,14,13, 41,13,14,13,40,14,14,13,40,15,12,14,14,13,0,13,5,13,5]

I put the mini 3 in learning mode and send from the mini 4 a long frame, then the mini 3 does not receive the code.

I put the mini 4 in learning mode and send from the mini 3 a long frame, then the mini 4 does not receive the code.

Therefore, I interpret that it is not a problem with the mini 3 or the mini 4 because from the broadlink application I can turn on the devices that have a long code. In this case it is clear that it is a bug of this development.

Please could you find out the problem and correct it?

After reviewing the code, I think the problem may be focused on the following function of the Device.js class

sendPacket(command, payload) { this.count = (this.count + 1) & 0xffff; var packet = Buffer.alloc(0x38, 0); //Is it possible to increase the buffer? packet[0x00] = 0x5a;

I don't know if it is possible or not to increase the buffer.

var packet = Buffer.alloc(0x38, 0); //Is it possible to increase the buffer?

I don't know how I could test this modification because I don't know how to program in this language, nor do I know how to set up a test project to verify what I say. But I understand that the length of the buffer could be calculated based on the IR code that is being sent to it.

Please, we need it corrected.

Thanks in advance.