I have this R428A01 relay board wich respond to AT commands. I can switch the relay with commands "AT+O1" and AT+C1" with an inject node no problem, but if i use a change node for say replace 0 with AT+O1 it gives me AT+OAT+C1. Wy is that? I tried all datatype available in the node.
Here is the flow:
[
{
"id": "f9783b6bec9f4ca0",
"type": "inject",
"z": "f263a8a04f1e1636",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "\"AT+O1\"",
"payloadType": "str",
"x": 1200,
"y": 1360,
"wires": [
[
"66239b4a814b6531"
]
]
},
{
"id": "8e78d6e23f8c7079",
"type": "inject",
"z": "f263a8a04f1e1636",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "\"AT+C1\"",
"payloadType": "str",
"x": 1200,
"y": 1180,
"wires": [
[
"66239b4a814b6531"
]
]
},
{
"id": "24c297e519e13faa",
"type": "debug",
"z": "f263a8a04f1e1636",
"name": "debug 5",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 1020,
"y": 1320,
"wires": []
},
{
"id": "54b0efb64de42987",
"type": "change",
"z": "f263a8a04f1e1636",
"name": "",
"rules": [
{
"t": "change",
"p": "payload",
"pt": "msg",
"from": "0",
"fromt": "num",
"to": "AT+O1",
"tot": "str"
},
{
"t": "change",
"p": "payload",
"pt": "msg",
"from": "1",
"fromt": "str",
"to": "AT+C1",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1000,
"y": 1260,
"wires": [
[
"24c297e519e13faa",
"66239b4a814b6531"
]
]
},
{
"id": "5c2ec6133bc9287a",
"type": "inject",
"z": "f263a8a04f1e1636",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "0",
"payloadType": "str",
"x": 830,
"y": 1220,
"wires": [
[
"54b0efb64de42987"
]
]
},
{
"id": "0c14bfd09078cffe",
"type": "inject",
"z": "f263a8a04f1e1636",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "1",
"payloadType": "str",
"x": 830,
"y": 1300,
"wires": [
[
"54b0efb64de42987"
]
]
},
{
"id": "66239b4a814b6531",
"type": "serial out",
"z": "f263a8a04f1e1636",
"name": "",
"serial": "7fec6f8d91aefaea",
"x": 1270,
"y": 1260,
"wires": []
},
{
"id": "7fec6f8d91aefaea",
"type": "serial-port",
"name": "",
"serialport": "/dev/ttyAMA1",
"serialbaud": "9600",
"databits": "8",
"parity": "none",
"stopbits": "1",
"waitfor": "",
"dtr": "none",
"rts": "none",
"cts": "none",
"dsr": "none",
"newline": "\\n",
"bin": "false",
"out": "char",
"addchar": "",
"responsetimeout": "10000"
}