Thanks for the extensive & detailed description, will be next step if I fail w the Admin API
I must be blind somehow, can't understand what is missing in the following example
I can GET info about the gate node but I cannot change it's state using PUT disable/enable, it says "Module not found"
I think the syntax in my call should be ok but I must have missed something, Any help is very appreciated
[
{
"id": "056c13cdd60e50f2",
"type": "http request",
"z": "c98c2efa62204262",
"name": "",
"method": "use",
"ret": "txt",
"paytoqs": "query",
"url": "",
"tls": "",
"persist": false,
"proxy": "",
"insecureHTTPParser": false,
"authType": "",
"senderr": false,
"headers": [],
"x": 710,
"y": 590,
"wires": [
[
"170c52e615582814"
]
]
},
{
"id": "170c52e615582814",
"type": "debug",
"z": "c98c2efa62204262",
"name": "debug 380",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 910,
"y": 590,
"wires": []
},
{
"id": "28653f93786fb06c",
"type": "comment",
"z": "c98c2efa62204262",
"name": "request to enable/disable a node",
"info": "",
"x": 330,
"y": 550,
"wires": []
},
{
"id": "51399a72f866f581",
"type": "inject",
"z": "c98c2efa62204262",
"name": "enable",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "{\"enabled\": true}",
"payloadType": "json",
"x": 250,
"y": 590,
"wires": [
[
"c1186cf2353dd9cc"
]
]
},
{
"id": "c1186cf2353dd9cc",
"type": "change",
"z": "c98c2efa62204262",
"name": "",
"rules": [
{
"t": "set",
"p": "url",
"pt": "msg",
"to": "\"http://localhost:1880/nodes/node-red-contrib-simple-gate\" & payload",
"tot": "jsonata"
},
{
"t": "set",
"p": "method",
"pt": "msg",
"to": "PUT",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 500,
"y": 590,
"wires": [
[
"056c13cdd60e50f2"
]
]
},
{
"id": "2f8de02fe16a3cf6",
"type": "inject",
"z": "c98c2efa62204262",
"name": "disable",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "{\"enabled\": false}",
"payloadType": "json",
"x": 250,
"y": 650,
"wires": [
[
"c1186cf2353dd9cc"
]
]
},
{
"id": "c206065ec8437241",
"type": "http request",
"z": "c98c2efa62204262",
"name": "",
"method": "use",
"ret": "txt",
"paytoqs": "query",
"url": "",
"tls": "",
"persist": false,
"proxy": "",
"insecureHTTPParser": false,
"authType": "",
"senderr": false,
"headers": [],
"x": 710,
"y": 780,
"wires": [
[
"a30a9e6c5cfdcf4e"
]
]
},
{
"id": "a30a9e6c5cfdcf4e",
"type": "debug",
"z": "c98c2efa62204262",
"name": "debug 383",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 910,
"y": 780,
"wires": []
},
{
"id": "7ada3db72c877d1b",
"type": "inject",
"z": "c98c2efa62204262",
"name": "get info",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "{}",
"payloadType": "json",
"x": 250,
"y": 780,
"wires": [
[
"631c6a587ea7804f"
]
]
},
{
"id": "631c6a587ea7804f",
"type": "change",
"z": "c98c2efa62204262",
"name": "",
"rules": [
{
"t": "set",
"p": "url",
"pt": "msg",
"to": "\"http://localhost:1880/nodes/node-red-contrib-simple-gate\"",
"tot": "jsonata"
},
{
"t": "set",
"p": "method",
"pt": "msg",
"to": "GET",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 500,
"y": 780,
"wires": [
[
"c206065ec8437241"
]
]
},
{
"id": "08a2b5132e286e00",
"type": "gate",
"z": "c98c2efa62204262",
"name": "",
"controlTopic": "control",
"defaultState": "open",
"openCmd": "open",
"closeCmd": "close",
"toggleCmd": "toggle",
"defaultCmd": "default",
"statusCmd": "status",
"persist": false,
"storeName": "memory",
"x": 910,
"y": 680,
"wires": [
[]
]
},
{
"id": "5c3ebeb7ec817d90",
"type": "comment",
"z": "c98c2efa62204262",
"name": "request node info",
"info": "",
"x": 280,
"y": 740,
"wires": []
}
]