Im trying the /r after i send a hex buffer and i get the following error..
TypeError [ERR_INVALID_ARG_TYPE]: The "list[1]" argument must be one of type Array, Buffer, or Uint8Array. Received type string
Anyone know what I am doing wrong here?
[{"id":"f042e293.4bd948","type":"tab","label":"Flow 5","disabled":false,"info":""},{"id":"be2f3e94.08e27","type":"serial out","z":"f042e293.4bd948","name":"","serial":"6316eb55.80e3a4","x":690,"y":280,"wires":[]},{"id":"2d54136f.d45514","type":"inject","z":"f042e293.4bd948","name":"Set to EOL","topic":"","payload":"[\"0x02\",\"0x01\",\"0x01\",\"0x41\",\"0x40\",\"0x00\",\"0x08\",\"0x41\",\"0x1E\",\"0x90\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x82\",\"0x03\",\"0x45\"]","payloadType":"bin","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":440,"y":280,"wires":[["52f778b2.1c696"]]},{"id":"b9937022.701d4","type":"inject","z":"f042e293.4bd948","name":"Set Normal","topic":"","payload":"[\"0x02\",\"0x01\",\"0x01\",\"0x41\",\"0x40\",\"0x00\",\"0x08\",\"0x41\",\"0x1E\",\"0x17\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x83\",\"0x03\",\"0xC3\"]","payloadType":"bin","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":430,"y":320,"wires":[["be2f3e94.08e27"]]},{"id":"43164026.d98908","type":"inject","z":"f042e293.4bd948","name":"MainBoard-Relay1Off","topic":"","payload":"[\"0x02\",\"0x01\",\"0x01\",\"0x41\",\"0x40\",\"0x00\",\"0x22\",\"0x20\",\"0x12\",\"0x00\",\"0x5A\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x03\",\"0x4A\"]","payloadType":"bin","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":400,"y":420,"wires":[["be2f3e94.08e27"]]},{"id":"9f0a0b28.d830b","type":"inject","z":"f042e293.4bd948","name":"MainBoard-Relay2On","topic":"","payload":"[\"0x02\",\"0x01\",\"0x01\",\"0x41\",\"0x40\",\"0x00\",\"0x22\",\"0x20\",\"0x12\",\"0x00\",\"0x5A\",\"0x00\",\"0x00\",\"0x00\",\"0x01\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x03\",\"0x4B\"]","payloadType":"bin","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":400,"y":460,"wires":[["be2f3e94.08e27"]]},{"id":"47cfc409.596604","type":"inject","z":"f042e293.4bd948","name":"MainBoard-Relay1On","topic":"","payload":"[\"0x02\",\"0x01\",\"0x01\",\"0x41\",\"0x40\",\"0x00\",\"0x22\",\"0x20\",\"0x12\",\"0x00\",\"0x5A\",\"0x00\",\"0x01\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x00\",\"0x03\",\"0x4B\"]","payloadType":"bin","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":400,"y":380,"wires":[["52f778b2.1c696"]]},{"id":"13c53829.be0b88","type":"inject","z":"f042e293.4bd948","name":"fake mqtt Set to end of line mode","topic":"","payload":"0201 0141 4000 0841 1E90 0000 0000 8203 45","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":500,"wires":[["d12565c9.4d6cf8"]]},{"id":"d12565c9.4d6cf8","type":"function","z":"f042e293.4bd948","name":"Hex string to Hex buffer","func":"msg.oldPayload = msg.payload; //save it for later debugging\nvar noSpaces = msg.payload.replace(/ /g, '');// remove spaces\nmsg.payload = Buffer.from(noSpaces, \"hex\"); //convert to buffer\nreturn msg;","outputs":1,"noerr":0,"x":410,"y":520,"wires":[["be2f3e94.08e27"]]},{"id":"c8b308cb.efb1b","type":"inject","z":"f042e293.4bd948","name":"fake mqtt MainBoard-Relay1On","topic":"","payload":"0201 0141 4000 2220 1200 5A00 0100 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0003 4B","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":540,"wires":[["d12565c9.4d6cf8"]]},{"id":"52f778b2.1c696","type":"serial request","z":"f042e293.4bd948","name":"","serial":"6316eb55.80e3a4","x":690,"y":360,"wires":[["c03cb9b3.b9d49"]]},{"id":"c03cb9b3.b9d49","type":"debug","z":"f042e293.4bd948","name":"","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","x":870,"y":360,"wires":[]},{"id":"6316eb55.80e3a4","type":"serial-port","z":"","serialport":"/dev/ttyUSB0","serialbaud":"115200","databits":"8","parity":"none","stopbits":"1","waitfor":"","dtr":"none","rts":"none","cts":"none","dsr":"none","newline":"\\n","bin":"false","out":"char","addchar":"\\r","responsetimeout":"10000"}]