[
{
"id": "70c7ec66.31e354",
"type": "tab",
"label": "Electricity",
"disabled": false,
"info": ""
},
{
"id": "190dc64a.a1249a",
"type": "ui_led",
"z": "70c7ec66.31e354",
"order": 1,
"group": "ca9031ed.6508",
"width": "0",
"height": "0",
"label": "LEC",
"labelPlacement": "left",
"labelAlignment": "left",
"colorForValue": [
{
"color": "#ff0000",
"value": "false",
"valueType": "bool"
},
{
"color": "#008000",
"value": "true",
"valueType": "bool"
}
],
"allowColorForValueInMessage": false,
"shape": "circle",
"showGlow": true,
"name": "",
"x": 710,
"y": 120,
"wires": []
},
{
"id": "dc628a10.7e8588",
"type": "change",
"z": "70c7ec66.31e354",
"name": "",
"rules": [
{
"t": "change",
"p": "payload",
"pt": "msg",
"from": "1",
"fromt": "num",
"to": "false",
"tot": "bool"
},
{
"t": "change",
"p": "payload",
"pt": "msg",
"from": "0",
"fromt": "num",
"to": "true",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 480,
"y": 120,
"wires": [
[
"190dc64a.a1249a"
]
]
},
{
"id": "b9ac64f9.cce7d8",
"type": "rpi-gpio in",
"z": "70c7ec66.31e354",
"name": "",
"pin": "5",
"intype": "tri",
"debounce": "25",
"read": true,
"bcm": true,
"x": 270,
"y": 120,
"wires": [
[
"dc628a10.7e8588"
]
]
},
{
"id": "9ea94c27.24e7d",
"type": "ui_led",
"z": "70c7ec66.31e354",
"order": 1,
"group": "ca9031ed.6508",
"width": 0,
"height": 0,
"label": "Generator 30Kva",
"labelPlacement": "left",
"labelAlignment": "left",
"colorForValue": [
{
"color": "#ff0000",
"value": "false",
"valueType": "str"
},
{
"color": "#008000",
"value": "true",
"valueType": "str"
}
],
"allowColorForValueInMessage": false,
"shape": "circle",
"showGlow": true,
"name": "",
"x": 710,
"y": 180,
"wires": []
},
{
"id": "1de9d56f.2aeb7b",
"type": "change",
"z": "70c7ec66.31e354",
"name": "",
"rules": [
{
"t": "change",
"p": "payload",
"pt": "msg",
"from": "1",
"fromt": "num",
"to": "false",
"tot": "bool"
},
{
"t": "change",
"p": "payload",
"pt": "msg",
"from": "0",
"fromt": "num",
"to": "true",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 480,
"y": 180,
"wires": [
[
"9ea94c27.24e7d"
]
]
},
{
"id": "4e327b9b.971464",
"type": "rpi-gpio in",
"z": "70c7ec66.31e354",
"name": "",
"pin": "6",
"intype": "up",
"debounce": "25",
"read": true,
"bcm": true,
"x": 280,
"y": 180,
"wires": [
[
"1de9d56f.2aeb7b"
]
]
},
{
"id": "d98fe3e107e2879b",
"type": "ui_led",
"z": "70c7ec66.31e354",
"order": 1,
"group": "ca9031ed.6508",
"width": 0,
"height": 0,
"label": "Generator 100Kva",
"labelPlacement": "left",
"labelAlignment": "left",
"colorForValue": [
{
"color": "#ff0000",
"value": "false",
"valueType": "str"
},
{
"color": "#008000",
"value": "true",
"valueType": "str"
}
],
"allowColorForValueInMessage": false,
"shape": "circle",
"showGlow": true,
"name": "",
"x": 710,
"y": 240,
"wires": []
},
{
"id": "cb54b3d5f07c254b",
"type": "change",
"z": "70c7ec66.31e354",
"name": "",
"rules": [
{
"t": "change",
"p": "payload",
"pt": "msg",
"from": "1",
"fromt": "num",
"to": "false",
"tot": "bool"
},
{
"t": "change",
"p": "payload",
"pt": "msg",
"from": "0",
"fromt": "num",
"to": "true",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 480,
"y": 240,
"wires": [
[
"d98fe3e107e2879b"
]
]
},
{
"id": "6659825d16a45def",
"type": "rpi-gpio in",
"z": "70c7ec66.31e354",
"name": "",
"pin": "13",
"intype": "up",
"debounce": "25",
"read": true,
"bcm": true,
"x": 280,
"y": 240,
"wires": [
[
"cb54b3d5f07c254b"
]
]
},
{
"id": "3b506a80a3120bc7",
"type": "ui_led",
"z": "70c7ec66.31e354",
"order": 1,
"group": "ca9031ed.6508",
"width": 0,
"height": 0,
"label": "Generator 150Kva",
"labelPlacement": "left",
"labelAlignment": "left",
"colorForValue": [
{
"color": "#ff0000",
"value": "false",
"valueType": "str"
},
{
"color": "#008000",
"value": "true",
"valueType": "str"
}
],
"allowColorForValueInMessage": false,
"shape": "circle",
"showGlow": true,
"name": "",
"x": 710,
"y": 300,
"wires": []
},
{
"id": "c3ea82460537377a",
"type": "change",
"z": "70c7ec66.31e354",
"name": "",
"rules": [
{
"t": "change",
"p": "payload",
"pt": "msg",
"from": "1",
"fromt": "num",
"to": "false",
"tot": "bool"
},
{
"t": "change",
"p": "payload",
"pt": "msg",
"from": "0",
"fromt": "num",
"to": "true",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 480,
"y": 300,
"wires": [
[
"3b506a80a3120bc7"
]
]
},
{
"id": "03d9a3e67fd73930",
"type": "rpi-gpio in",
"z": "70c7ec66.31e354",
"name": "",
"pin": "19",
"intype": "up",
"debounce": "25",
"read": true,
"bcm": true,
"x": 280,
"y": 300,
"wires": [
[
"c3ea82460537377a"
]
]
},
{
"id": "41f146119cbcf39f",
"type": "rpi-gpio out",
"z": "70c7ec66.31e354",
"name": "",
"pin": "18",
"set": "",
"level": "0",
"freq": "",
"out": "out",
"bcm": true,
"x": 680,
"y": 440,
"wires": []
},
{
"id": "9eaa6f3e139ba62b",
"type": "ui_button",
"z": "70c7ec66.31e354",
"name": "",
"group": "ca9031ed.6508",
"order": 4,
"width": 0,
"height": 0,
"passthru": false,
"label": "Gen-1",
"tooltip": "",
"color": "",
"bgcolor": "",
"className": "",
"icon": "",
"payload": "",
"payloadType": "str",
"topic": "topic",
"topicType": "msg",
"x": 230,
"y": 440,
"wires": [
[
"a0bbc5ad3e9b1f08"
]
]
},
{
"id": "fd5c83a62e5c1c0f",
"type": "ui_button",
"z": "70c7ec66.31e354",
"name": "",
"group": "ca9031ed.6508",
"order": 5,
"width": 0,
"height": 0,
"passthru": false,
"label": "Gen-2",
"tooltip": "",
"color": "",
"bgcolor": "",
"className": "",
"icon": "",
"payload": "",
"payloadType": "str",
"topic": "topic",
"topicType": "msg",
"x": 230,
"y": 500,
"wires": [
[
"a0bbc5ad3e9b1f08"
]
]
},
{
"id": "a644075eda60c72b",
"type": "ui_button",
"z": "70c7ec66.31e354",
"name": "",
"group": "ca9031ed.6508",
"order": 6,
"width": 0,
"height": 0,
"passthru": false,
"label": "Gen-3",
"tooltip": "",
"color": "",
"bgcolor": "",
"className": "",
"icon": "",
"payload": "",
"payloadType": "str",
"topic": "topic",
"topicType": "msg",
"x": 230,
"y": 580,
"wires": [
[
"a0bbc5ad3e9b1f08"
]
]
},
{
"id": "a0bbc5ad3e9b1f08",
"type": "function",
"z": "70c7ec66.31e354",
"name": "function 1",
"func": "\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 460,
"y": 500,
"wires": [
[
"41f146119cbcf39f",
"dfc5f88f4dd54dcf",
"37b2b3f5d5d6106b"
]
]
},
{
"id": "dfc5f88f4dd54dcf",
"type": "rpi-gpio out",
"z": "70c7ec66.31e354",
"name": "",
"pin": "23",
"set": "",
"level": "0",
"freq": "",
"out": "out",
"bcm": true,
"x": 680,
"y": 520,
"wires": []
},
{
"id": "37b2b3f5d5d6106b",
"type": "rpi-gpio out",
"z": "70c7ec66.31e354",
"name": "",
"pin": "24",
"set": "",
"level": "0",
"freq": "",
"out": "out",
"bcm": true,
"x": 680,
"y": 600,
"wires": []
},
{
"id": "ca9031ed.6508",
"type": "ui_group",
"name": "Electricity",
"tab": "91457eaf.c4e2c",
"order": 1,
"disp": true,
"width": "6",
"collapse": false
},
{
"id": "91457eaf.c4e2c",
"type": "ui_tab",
"name": "Electricity",
"icon": "dashboard",
"order": 16,
"disabled": false,
"hidden": false
}
]```[quote="Colin, post:6, topic:66729, full:true"]
How are you driving the relays from node-red? Is it one output for each relay, or have you got a coded output so that from node red you output something like 0 to 4 when 0 means no relays, 1 means relay 1, 2 means relay 2 etc?
[/quote]
is it possible like this ?