Skip to content

Large buffer array doesn´t work #90

@mondedos

Description

@mondedos

Hello,

From the Broadlink app, I can turn on and turn off the AC, however, when I capture the AC power on code and send it via the send command, nodered indicates ok status, yet the AC does nothing. I think there is a bug regarding the length of the code array, since I have tried with other devices that have shorter codes and it works.

Can you review the code and flow that I leave below?

I would appreciate some kind of response.

Thanks in advance and greetings

Long code not working

`var data = [38,0,6,1,107,53,13,15,13,14,14,39,14,14,13,41,12,14,14,14,13,14,14,40,13,40,13,14,14,14,13,14,14,39,14,40,13,14,14,14,13,17,13,15,13,14,14,13,13,14,14,13,14,14,14,13,14,13,14,13,14,14,13,40,14,13,13,15,12,15,13,14,14,13,14,14,13,14,13,40,14,14,13,14,14,13,14,13,14,41,13,40,13,41,13,41,13,40,13,41,13,41,13,40,13,14,13,15,13,40,13,14,13,15,14,13,14,13,14,13,14,14,14,13,14,13,14,40,13,40,13,14,14,14,14,39,13,15,13,14,13,14,14,13,14,13,14,14,14,40,13,40,13,14,14,13,13,15,14,13,13,14,14,13,14,14,13,14,14,13,14,40,13,14,14,13,14,13,14,13,14,14,14,13,14,13,14,13,14,14,13,14,14,13,14,13,14,14,14,13,14,13,14,13,14,14,13,14,13,14,14,13,14,14,13,14,14,13,14,13,13,14,14,14,13,14,13,14,14,13,14,14,13,14,14,13,14,13,13,14,14,40,13,14,14,14,13,14,14,39,13,15,13,40,13,14,14,40,13,14,13,15,14,0,13,5,13,5];

var msg = {
payload: {
"action" : 'send',
"data" : data,
"repeat":2
}
};

return msg;`

My Flow

[ { "id": "e5666be2a6ebe39b", "type": "tab", "label": "Salón", "disabled": false, "info": "", "env": [] }, { "id": "09a580a88483f434", "type": "inject", "z": "e5666be2a6ebe39b", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 240, "y": 120, "wires": [ [ "d7cd9c051fd5c1de" ] ] }, { "id": "d7cd9c051fd5c1de", "type": "function", "z": "e5666be2a6ebe39b", "name": "", "func": "var data = [38,0,6,1,107,53,13,15,13,14,14,39,14,14,13,41,12,14,14,14,13,14,14,40,13,40,13,14,14,14,13,14,14,39,14,40,13,14,14,14,13,17,13,15,13,14,14,13,13,14,14,13,14,14,14,13,14,13,14,13,14,14,13,40,14,13,13,15,12,15,13,14,14,13,14,14,13,14,13,40,14,14,13,14,14,13,14,13,14,41,13,40,13,41,13,41,13,40,13,41,13,41,13,40,13,14,13,15,13,40,13,14,13,15,14,13,14,13,14,13,14,14,14,13,14,13,14,40,13,40,13,14,14,14,14,39,13,15,13,14,13,14,14,13,14,13,14,14,14,40,13,40,13,14,14,13,13,15,14,13,13,14,14,13,14,14,13,14,14,13,14,40,13,14,14,13,14,13,14,13,14,14,14,13,14,13,14,13,14,14,13,14,14,13,14,13,14,14,14,13,14,13,14,13,14,14,13,14,13,14,14,13,14,14,13,14,14,13,14,13,13,14,14,14,13,14,13,14,14,13,14,14,13,14,14,13,14,13,13,14,14,40,13,14,14,14,13,14,14,39,13,15,13,40,13,14,14,40,13,14,13,15,14,0,13,5,13,5];\n//var data = [38,0,88,0,0,1,33,148,19,18,19,18,18,56,18,19,18,19,18,19,18,19,18,19,18,56,18,55,18,19,18,56,17,56,19,54,19,55,17,56,18,19,18,19,19,18,18,56,18,19,19,18,18,19,19,18,18,56,18,55,19,54,18,19,18,56,18,55,19,54,19,55,18,0,5,35,0,1,38,75,17,0,12,86,0,1,37,74,18,0,13,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];\nvar msg = { \n payload: {\n \"action\" : 'send',\n \"data\" : data,\n \"repeat\":2\n }\n};\n\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 460, "y": 160, "wires": [ [ "0c0c39bcd202b925", "6665408cb3f1e42e" ] ] }, { "id": "0c0c39bcd202b925", "type": "RM", "z": "e5666be2a6ebe39b", "name": "", "device": "147001dee0efa8f7", "action": "_msg_", "remote": "", "button": "", "fix": 1, "RFSweep": "false", "x": 650, "y": 160, "wires": [ [ "5bcdec6e23056e03" ] ] }, { "id": "6665408cb3f1e42e", "type": "debug", "z": "e5666be2a6ebe39b", "name": "", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "statusVal": "", "statusType": "auto", "x": 590, "y": 60, "wires": [] }, { "id": "5bcdec6e23056e03", "type": "debug", "z": "e5666be2a6ebe39b", "name": "", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "statusVal": "", "statusType": "auto", "x": 830, "y": 160, "wires": [] }, { "id": "147001dee0efa8f7", "type": "rmdevice", "folder": "", "mac": "A043B0550E3A", "host": "10.0.2.133", "devType": "5f36" } ]

flows.zip
.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions