Hey All.
First time working with JSON and I'm setting up a http request node but I don't know what URL to use. I'm working on a local network.
The JSON I'm interested in is coming from a form on the dashboard and I'm trying to show the data on the same dashboard. How do I know what URL to use for the IP address?
this is the address of my dashboard.
http://192.168.1.***:1880/ui/#!/0?socketid=5Y9uUwVVuL7ozybRAAAB
the variable I want is called deskBrightness I think it should look something like this but it doesn't work...
http://192.168.1.***:1880/ui/#!/0?socketid=5Y9uUwVVuL7ozybRAAAB{{{deskBrightness}}}
Please check out my flow if you have a minute.
Thanks
Rich
[
{
"id": "a1daf67020415503",
"type": "inject",
"z": "cb58b0f2ac83d096",
"name": "",
"props": [
{
"p": "payload"
}
],
"repeat": "3",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "8",
"payloadType": "num",
"x": 90,
"y": 600,
"wires": [
[
"1adcbd7787bbc99e"
]
]
},
{
"id": "1adcbd7787bbc99e",
"type": "ui_form",
"z": "cb58b0f2ac83d096",
"name": "",
"label": "deskBrightness",
"group": "3d153cb1a380b89c",
"order": 5,
"width": 0,
"height": 0,
"options": [
{
"label": "deskBrightness",
"value": "deskBrightness",
"type": "number",
"required": true,
"rows": null
}
],
"formValue": {
"deskBrightness": ""
},
"payload": "",
"submit": "submit",
"cancel": "",
"topic": "payload",
"topicType": "msg",
"splitLayout": "",
"className": "",
"x": 260,
"y": 600,
"wires": [
[
"faa8886a317a5867"
]
]
},
{
"id": "faa8886a317a5867",
"type": "http request",
"z": "cb58b0f2ac83d096",
"name": "HTTP Request (POST)",
"method": "GET",
"ret": "txt",
"paytoqs": "ignore",
"url": "socketid=5Y9uUwVVuL7ozybRAAAB{{{deskBrightness}}}",
"tls": "",
"persist": false,
"proxy": "",
"insecureHTTPParser": false,
"authType": "",
"senderr": false,
"headers": [],
"x": 510,
"y": 600,
"wires": [
[
"24bd94a6ca28cffd",
"3ab83c4d2a526220"
]
]
},
{
"id": "24bd94a6ca28cffd",
"type": "ui_text",
"z": "cb58b0f2ac83d096",
"group": "3d153cb1a380b89c",
"order": 6,
"width": 0,
"height": 0,
"name": "",
"label": "Brightness Level",
"format": "{{msg.payload}}",
"layout": "row-spread",
"className": "",
"x": 770,
"y": 620,
"wires": []
},
{
"id": "3ab83c4d2a526220",
"type": "debug",
"z": "cb58b0f2ac83d096",
"name": "debug 165",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "deskBrightness",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 770,
"y": 560,
"wires": []
},
{
"id": "3d153cb1a380b89c",
"type": "ui_group",
"name": "LED Switch",
"tab": "c548a45fe690539c",
"order": 1,
"disp": true,
"width": "6",
"collapse": false,
"className": ""
},
{
"id": "c548a45fe690539c",
"type": "ui_tab",
"name": "Home",
"icon": "dashboard",
"order": 1,
"disabled": false,
"hidden": true
}
]