I’m working on trying to read values from an ASM1-6 Analog to Digital EndNode, and have been trying to piece together the proper input for the Wireless Gateway node from other posts (like EndNode 4ch Relay Input Commands Node red - #2 by TravisE_NCD_Technica).
I’ve come up with this so far, but unfortunately, I’m still not getting any output from the Wireless Gateway node.
Any advice?
Thanks in advance!
[
{
"id": "53ee41c1.bd371",
"type": "tab",
"label": "Flow 2",
"disabled": false,
"info": ""
},
{
"id": "5011ad9e.68fc74",
"type": "ncd-gateway-node",
"z": "53ee41c1.bd371",
"name": "",
"connection": "837142ce.132b28",
"unknown_devices": true,
"outputs": 2,
"x": 790,
"y": 440,
"wires": [
[
"e76cd18b.8ffd3"
],
[
"bd6ed65e.b78308"
]
]
},
{
"id": "bd6ed65e.b78308",
"type": "debug",
"z": "53ee41c1.bd371",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"x": 1010,
"y": 460,
"wires": []
},
{
"id": "e76cd18b.8ffd3",
"type": "debug",
"z": "53ee41c1.bd371",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"x": 1020,
"y": 420,
"wires": []
},
{
"id": "99814a71.f0a798",
"type": "inject",
"z": "53ee41c1.bd371",
"name": "",
"topic": "",
"payload": "",
"payloadType": "str",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 130,
"y": 380,
"wires": [
[
"46756e84.86d5f"
]
]
},
{
"id": "46756e84.86d5f",
"type": "function",
"z": "53ee41c1.bd371",
"name": "Set address and command",
"func": "msg = {};\nmsg.payload = {};\nmsg.payload.address = \"00:13:A2:00:41:FF:43:AE\";\nmsg.payload.data = [0x35, 0x09, 0x01, 0x01, 0x00];\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 340,
"y": 400,
"wires": [
[
"52515058.9698"
]
]
},
{
"id": "52515058.9698",
"type": "function",
"z": "53ee41c1.bd371",
"name": "Add Checksum",
"func": "var command = msg.payload.data;\nvar sum = 0x00;\nfor(i = 0; i < command.length; i++){\n sum+=command[i];\n}\ncommand.push(sum&0xFF);\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 580,
"y": 420,
"wires": [
[
"5011ad9e.68fc74"
]
]
},
{
"id": "837142ce.132b28",
"type": "ncd-gateway-config",
"z": "",
"name": "",
"comm_type": "serial",
"ip_address": "",
"tcp_port": "2101",
"port": "/dev/ttyS1",
"baudRate": "115200",
"pan_id": "7FFF",
"rssi": true
}
]