Hi,
I have a PowerGenerator, which is automatically starting, if there is an power outage and stopping again, when the power is restored.
Unfortunatley I cannot monitor remotley if the Power Generator is running.
Therefore I bought a Shelly 3PM and created a flow in Nodered.
I have two issues with my flow:
-
Sometimes I get the message multiple times after around each 20 to 30 minutes, that the Power Generator is running although I got already the first message.
-
I am currently monitoring only one phase of the 3PM. I am not sure how to add the 2 other ones as well, I guess via a FUNCTION?
[
{
"id": "44f3ae8fb3a783ff",
"type": "inject",
"z": "253be448.e51e8c",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 140,
"y": 860,
"wires": [
[
"bc8a2e03959c54f3"
]
]
},
{
"id": "a2aab6305a42668a",
"type": "switch",
"z": "253be448.e51e8c",
"name": "Check Groups",
"property": "payload.emeters[0].current",
"propertyType": "msg",
"rules": [
{
"t": "lte",
"v": "0.05",
"vt": "num"
},
{
"t": "gt",
"v": "0.05",
"vt": "num"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 540,
"y": 820,
"wires": [
[
"147c8283e4947bf5"
],
[
"a56edfe302467644"
]
]
},
{
"id": "147c8283e4947bf5",
"type": "throttle",
"z": "253be448.e51e8c",
"name": "",
"throttleType": "reset",
"timeLimit": 0,
"timeLimitType": "seconds",
"countLimit": 0,
"blockSize": 0,
"locked": true,
"x": 760,
"y": 840,
"wires": [
[
"2d8548fb8c4852fe"
]
]
},
{
"id": "a56edfe302467644",
"type": "throttle",
"z": "253be448.e51e8c",
"name": "",
"throttleType": "reset",
"timeLimit": 0,
"timeLimitType": "seconds",
"countLimit": 0,
"blockSize": 0,
"locked": false,
"x": 760,
"y": 900,
"wires": [
[
"161b677a73ed958c",
"b7f85ed2a7217c93"
]
]
},
{
"id": "161b677a73ed958c",
"type": "change",
"z": "253be448.e51e8c",
"name": "",
"rules": [
{
"t": "set",
"p": "reset",
"pt": "msg",
"to": "Generator ein",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1120,
"y": 900,
"wires": [
[
"147c8283e4947bf5"
]
]
},
{
"id": "023a06011e705659",
"type": "change",
"z": "253be448.e51e8c",
"name": "",
"rules": [
{
"t": "set",
"p": "reset",
"pt": "msg",
"to": "Generator aus",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1120,
"y": 840,
"wires": [
[
"a56edfe302467644"
]
]
},
{
"id": "b7f85ed2a7217c93",
"type": "change",
"z": "253be448.e51e8c",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "Generator läuft",
"tot": "str"
},
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "Generator",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1120,
"y": 940,
"wires": [
[
"d2317caaa6012905"
]
]
},
{
"id": "802642fd25fd1f05",
"type": "change",
"z": "253be448.e51e8c",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "Generator aus",
"tot": "str"
},
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "Generator",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1120,
"y": 800,
"wires": [
[
"2d61fe43a54845e4"
]
]
},
{
"id": "c2c38bdf244b2632",
"type": "switch",
"z": "253be448.e51e8c",
"name": "Check Groups",
"property": "payload.emeters[1].current",
"propertyType": "msg",
"rules": [
{
"t": "lte",
"v": "0.05",
"vt": "num"
},
{
"t": "gt",
"v": "0.05",
"vt": "num"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 540,
"y": 860,
"wires": [
[],
[]
]
},
{
"id": "07980bcf29a5f0a4",
"type": "switch",
"z": "253be448.e51e8c",
"name": "Check Groups",
"property": "payload.emeters[2].current",
"propertyType": "msg",
"rules": [
{
"t": "lte",
"v": "0.05",
"vt": "num"
},
{
"t": "gt",
"v": "0.05",
"vt": "num"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 540,
"y": 900,
"wires": [
[],
[]
]
},
{
"id": "59f011f341325a63",
"type": "http request",
"z": "253be448.e51e8c",
"name": "",
"method": "use",
"ret": "txt",
"paytoqs": "ignore",
"url": "",
"tls": "",
"persist": false,
"proxy": "",
"authType": "",
"senderr": false,
"x": 1530,
"y": 880,
"wires": [
[]
]
},
{
"id": "d2317caaa6012905",
"type": "change",
"z": "253be448.e51e8c",
"name": "",
"rules": [
{
"t": "set",
"p": "method",
"pt": "msg",
"to": "post",
"tot": "str"
},
{
"t": "set",
"p": "url",
"pt": "msg",
"to": "https://API",
"tot": "str"
},
{
"t": "set",
"p": "headers.content-type",
"pt": "msg",
"to": "application/json",
"tot": "str"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "{\"username\":\"XYZ\",\"password\":\"XYZ)2jd!Br43\",\"customerId\":\"XYZ\",\"hideTriggerDetails\":false,\"alarmText\":\"Notstromaggregat Rüsthaus läuft\",\"type\":\"info\",\"needsAcknowledgement\":false,\"duration\":60,\"recipientConfirmation\":false,\"groupCodes\":[\"G12\"]}",
"tot": "json"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1320,
"y": 920,
"wires": [
[
"59f011f341325a63"
]
]
},
{
"id": "2d61fe43a54845e4",
"type": "change",
"z": "253be448.e51e8c",
"name": "",
"rules": [
{
"t": "set",
"p": "method",
"pt": "msg",
"to": "post",
"tot": "str"
},
{
"t": "set",
"p": "url",
"pt": "msg",
"to": "https://API",
"tot": "str"
},
{
"t": "set",
"p": "headers.content-type",
"pt": "msg",
"to": "application/json",
"tot": "str"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "{\"username\":\"ag-ff-metnitz\",\"password\":\"fw4)2jd!Br43\",\"customerId\":\"105050\",\"hideTriggerDetails\":false,\"alarmText\":\"Notstromaggregat RĂĽsthaus wieder ausgeschalten\",\"type\":\"info\",\"needsAcknowledgement\":false,\"duration\":60,\"recipientConfirmation\":false,\"groupCodes\":[\"G12\"]}",
"tot": "json"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1320,
"y": 820,
"wires": [
[
"59f011f341325a63"
]
]
},
{
"id": "bc8a2e03959c54f3",
"type": "shelly-gen1",
"z": "253be448.e51e8c",
"hostname": "x.x.x.x",
"description": "",
"mode": "polling",
"server": "",
"outputmode": "event",
"uploadretryinterval": 5000,
"pollinginterval": 5000,
"pollstatus": true,
"getstatusoncommand": true,
"devicetype": "Measure",
"outputs": 2,
"x": 320,
"y": 860,
"wires": [
[
"a2aab6305a42668a",
"c2c38bdf244b2632",
"07980bcf29a5f0a4"
],
[]
]
},
{
"id": "2d8548fb8c4852fe",
"type": "delay",
"z": "253be448.e51e8c",
"name": "",
"pauseType": "delay",
"timeout": "30",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 900,
"y": 840,
"wires": [
[
"802642fd25fd1f05",
"023a06011e705659"
]
]
}
]