Hi guis,
im verry new in the Node-Red programming. Can you help me to compare the slider value with the sensore value.
10x
[
{
"id": "7c559bef.0cf194",
"type": "inject",
"z": "200e10c3.91d01",
"name": "",
"topic": "",
"payload": "10",
"payloadType": "num",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 70,
"y": 120,
"wires": [
[
"4e855904.8b62d8"
]
]
},
{
"id": "2a2b9e73.577fb2",
"type": "ui_slider",
"z": "200e10c3.91d01",
"name": "",
"label": "slider",
"tooltip": "",
"group": "15ead4d7.0fe35b",
"order": 3,
"width": 0,
"height": 0,
"passthru": true,
"outs": "end",
"topic": "",
"min": 0,
"max": "20",
"step": 1,
"x": 70,
"y": 40,
"wires": [
[
"3f52dfeb.aa6f2"
]
]
},
{
"id": "3f52dfeb.aa6f2",
"type": "function",
"z": "200e10c3.91d01",
"name": "pl1",
"func": "var msg1 = { payload1:msg.payload };\n\nreturn msg1;",
"outputs": 1,
"noerr": 0,
"x": 250,
"y": 80,
"wires": [
[
"77abb4d6.081cdc"
]
]
},
{
"id": "4e855904.8b62d8",
"type": "function",
"z": "200e10c3.91d01",
"name": "pl2",
"func": "var msg2 = { payload2:msg.payload };\n\nreturn msg2;",
"outputs": 1,
"noerr": 0,
"x": 250,
"y": 140,
"wires": [
[
"77abb4d6.081cdc"
]
]
},
{
"id": "77abb4d6.081cdc",
"type": "function",
"z": "200e10c3.91d01",
"name": "Temperature1",
"func": "if(msg.payload1>msg.payload2){\nmsg.payload = '0';\nreturn msg;\n}\nelse {\nmsg.payload = '1';\nreturn msg;\n}",
"outputs": 1,
"noerr": 0,
"x": 460,
"y": 120,
"wires": [
[
"6eb6eca2.e3ce54"
]
]
},
{
"id": "6eb6eca2.e3ce54",
"type": "rpi-gpio out",
"z": "200e10c3.91d01",
"name": "",
"pin": "11",
"set": "",
"level": "0",
"freq": "",
"out": "out",
"x": 660,
"y": 120,
"wires": []
},
{
"id": "15ead4d7.0fe35b",
"type": "ui_group",
"z": "",
"name": "weather",
"tab": "d3408c2f.0311b",
"order": 1,
"disp": false,
"width": "6",
"collapse": false
},
{
"id": "d3408c2f.0311b",
"type": "ui_tab",
"z": "",
"name": "weather",
"icon": "dashboard",
"order": 1,
"disabled": false,
"hidden": false
}
]