[
{
"id": "fd495236339b5cbc",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": "",
"env": []
},
{
"id": "4c14b70f4a5557f7",
"type": "debug",
"z": "fd495236339b5cbc",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 890,
"y": 260,
"wires": []
},
{
"id": "9702de48f4f9c290",
"type": "mikrotik",
"z": "fd495236339b5cbc",
"device": "81d5cece8f85c408",
"name": "",
"action": "9",
"command": "",
"command-type": "str",
"x": 360,
"y": 260,
"wires": [
[
"4c14b70f4a5557f7",
"d9e7376d13704871"
]
]
},
{
"id": "f3f8497682a3e43e",
"type": "inject",
"z": "fd495236339b5cbc",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "[\"/ip/route/print\",\"?comment=NodeRed\"]",
"payloadType": "json",
"x": 170,
"y": 260,
"wires": [
[
"9702de48f4f9c290"
]
]
},
{
"id": "d9e7376d13704871",
"type": "change",
"z": "fd495236339b5cbc",
"name": "New Raw",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "[\"/ip/route/disable\",\"?.id= msg.payload[0].distance\"]",
"tot": "json"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 620,
"y": 300,
"wires": [
[
"4c14b70f4a5557f7"
]
]
},
{
"id": "81d5cece8f85c408",
"type": "mikrotik-device",
"host": "172.16.0.34",
"port": "8729",
"username": null,
"password": null,
"ssl": "api-ssl-ignore-cert"
}
]
Here is my code. I want to use one of the values from the Mikrotik step in "New Raw" step. I am not able to use variables within it. I am still learning so apologies if something is not clear.
Here is the output from the Mikrotik step.