Update flow files
This commit is contained in:
+556
-412
@@ -89,14 +89,6 @@
|
|||||||
"type": "tab",
|
"type": "tab",
|
||||||
"label": "[Hallway] Lights"
|
"label": "[Hallway] Lights"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"id": "b73eb220c60f9f8b",
|
|
||||||
"type": "tab",
|
|
||||||
"label": "[Kitchen] Espresso Machine",
|
|
||||||
"disabled": false,
|
|
||||||
"info": "",
|
|
||||||
"env": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"id": "5af82cd4c44df066",
|
"id": "5af82cd4c44df066",
|
||||||
"type": "tab",
|
"type": "tab",
|
||||||
@@ -15300,410 +15292,6 @@
|
|||||||
[]
|
[]
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"id": "b1b0a80b.d1f6cf",
|
|
||||||
"type": "api-current-state",
|
|
||||||
"z": "b73eb220c60f9f8b",
|
|
||||||
"name": "Get auto standby time",
|
|
||||||
"server": "657c7463.48e1e4",
|
|
||||||
"version": 3,
|
|
||||||
"outputs": 1,
|
|
||||||
"halt_if": "",
|
|
||||||
"halt_if_type": "str",
|
|
||||||
"halt_if_compare": "is",
|
|
||||||
"entity_id": "input_number.coffee_max_standby",
|
|
||||||
"state_type": "",
|
|
||||||
"blockInputOverrides": false,
|
|
||||||
"outputProperties": [
|
|
||||||
{
|
|
||||||
"property": "payload",
|
|
||||||
"propertyType": "msg",
|
|
||||||
"value": "number",
|
|
||||||
"valueType": "entityState"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"for": 0,
|
|
||||||
"forType": "num",
|
|
||||||
"forUnits": "minutes",
|
|
||||||
"x": 440,
|
|
||||||
"y": 120,
|
|
||||||
"wires": [
|
|
||||||
[
|
|
||||||
"espresso_fn_001"
|
|
||||||
]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "espresso_fn_001",
|
|
||||||
"type": "change",
|
|
||||||
"z": "b73eb220c60f9f8b",
|
|
||||||
"name": "Store standby time",
|
|
||||||
"rules": [
|
|
||||||
{
|
|
||||||
"t": "set",
|
|
||||||
"p": "espresso_standby",
|
|
||||||
"pt": "flow",
|
|
||||||
"to": "payload",
|
|
||||||
"tot": "msg"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"action": "",
|
|
||||||
"property": "",
|
|
||||||
"from": "",
|
|
||||||
"to": "",
|
|
||||||
"reg": false,
|
|
||||||
"x": 750,
|
|
||||||
"y": 120,
|
|
||||||
"wires": [
|
|
||||||
[
|
|
||||||
"c0926692.581f73"
|
|
||||||
]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "304a933a.0c94bb",
|
|
||||||
"type": "server-state-changed",
|
|
||||||
"z": "b73eb220c60f9f8b",
|
|
||||||
"name": "Espresso machine is on",
|
|
||||||
"server": "657c7463.48e1e4",
|
|
||||||
"version": 6,
|
|
||||||
"outputs": 2,
|
|
||||||
"exposeAsEntityConfig": "",
|
|
||||||
"entities": {
|
|
||||||
"entity": [
|
|
||||||
"switch.espresso_kitchen"
|
|
||||||
],
|
|
||||||
"substring": [],
|
|
||||||
"regex": []
|
|
||||||
},
|
|
||||||
"outputInitially": false,
|
|
||||||
"stateType": "str",
|
|
||||||
"ifState": "on",
|
|
||||||
"ifStateType": "str",
|
|
||||||
"ifStateOperator": "is",
|
|
||||||
"outputOnlyOnStateChange": true,
|
|
||||||
"for": 0,
|
|
||||||
"forType": "num",
|
|
||||||
"forUnits": "minutes",
|
|
||||||
"ignorePrevStateNull": false,
|
|
||||||
"ignorePrevStateUnknown": false,
|
|
||||||
"ignorePrevStateUnavailable": false,
|
|
||||||
"ignoreCurrentStateUnknown": true,
|
|
||||||
"ignoreCurrentStateUnavailable": true,
|
|
||||||
"outputProperties": [
|
|
||||||
{
|
|
||||||
"property": "payload",
|
|
||||||
"propertyType": "msg",
|
|
||||||
"value": "string",
|
|
||||||
"valueType": "entityState"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"property": "data",
|
|
||||||
"propertyType": "msg",
|
|
||||||
"value": "",
|
|
||||||
"valueType": "eventData"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"property": "topic",
|
|
||||||
"propertyType": "msg",
|
|
||||||
"value": "",
|
|
||||||
"valueType": "triggerId"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"x": 160,
|
|
||||||
"y": 120,
|
|
||||||
"wires": [
|
|
||||||
[
|
|
||||||
"b1b0a80b.d1f6cf"
|
|
||||||
],
|
|
||||||
[]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "8b67baba.6bec7f",
|
|
||||||
"type": "api-call-service",
|
|
||||||
"z": "b73eb220c60f9f8b",
|
|
||||||
"name": "Turn off espresso",
|
|
||||||
"server": "657c7463.48e1e4",
|
|
||||||
"version": 7,
|
|
||||||
"debugenabled": false,
|
|
||||||
"action": "",
|
|
||||||
"floorId": [],
|
|
||||||
"areaId": [],
|
|
||||||
"deviceId": [],
|
|
||||||
"entityId": [
|
|
||||||
"switch.espresso_kitchen"
|
|
||||||
],
|
|
||||||
"labelId": [],
|
|
||||||
"data": "",
|
|
||||||
"dataType": "json",
|
|
||||||
"mergeContext": "",
|
|
||||||
"mustacheAltTags": false,
|
|
||||||
"outputProperties": [],
|
|
||||||
"queue": "none",
|
|
||||||
"blockInputOverrides": false,
|
|
||||||
"domain": "switch",
|
|
||||||
"service": "turn_off",
|
|
||||||
"x": 1090,
|
|
||||||
"y": 200,
|
|
||||||
"wires": [
|
|
||||||
[]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "c0926692.581f73",
|
|
||||||
"type": "stoptimer-varidelay",
|
|
||||||
"z": "b73eb220c60f9f8b",
|
|
||||||
"duration": "espresso_standby",
|
|
||||||
"durationType": "flow",
|
|
||||||
"units": "Minute",
|
|
||||||
"payloadtype": "num",
|
|
||||||
"payloadval": "",
|
|
||||||
"name": "Off timer ",
|
|
||||||
"reporting": "none",
|
|
||||||
"reportingformat": "human",
|
|
||||||
"persist": true,
|
|
||||||
"ignoretimerpass": false,
|
|
||||||
"x": 800,
|
|
||||||
"y": 200,
|
|
||||||
"wires": [
|
|
||||||
[
|
|
||||||
"8b67baba.6bec7f"
|
|
||||||
],
|
|
||||||
[],
|
|
||||||
[]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "fa64478a.97f1a8",
|
|
||||||
"type": "server-state-changed",
|
|
||||||
"z": "b73eb220c60f9f8b",
|
|
||||||
"name": "Espresso machine is off",
|
|
||||||
"server": "657c7463.48e1e4",
|
|
||||||
"version": 6,
|
|
||||||
"outputs": 2,
|
|
||||||
"exposeAsEntityConfig": "",
|
|
||||||
"entities": {
|
|
||||||
"entity": [
|
|
||||||
"switch.espresso_kitchen"
|
|
||||||
],
|
|
||||||
"substring": [],
|
|
||||||
"regex": []
|
|
||||||
},
|
|
||||||
"outputInitially": false,
|
|
||||||
"stateType": "str",
|
|
||||||
"ifState": "off",
|
|
||||||
"ifStateType": "str",
|
|
||||||
"ifStateOperator": "is",
|
|
||||||
"outputOnlyOnStateChange": true,
|
|
||||||
"for": 0,
|
|
||||||
"forType": "num",
|
|
||||||
"forUnits": "minutes",
|
|
||||||
"ignorePrevStateNull": false,
|
|
||||||
"ignorePrevStateUnknown": false,
|
|
||||||
"ignorePrevStateUnavailable": false,
|
|
||||||
"ignoreCurrentStateUnknown": true,
|
|
||||||
"ignoreCurrentStateUnavailable": true,
|
|
||||||
"outputProperties": [
|
|
||||||
{
|
|
||||||
"property": "payload",
|
|
||||||
"propertyType": "msg",
|
|
||||||
"value": "string",
|
|
||||||
"valueType": "entityState"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"property": "data",
|
|
||||||
"propertyType": "msg",
|
|
||||||
"value": "",
|
|
||||||
"valueType": "eventData"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"property": "topic",
|
|
||||||
"propertyType": "msg",
|
|
||||||
"value": "",
|
|
||||||
"valueType": "triggerId"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"x": 160,
|
|
||||||
"y": 200,
|
|
||||||
"wires": [
|
|
||||||
[
|
|
||||||
"f4b1069c.ad2569"
|
|
||||||
],
|
|
||||||
[]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "f4b1069c.ad2569",
|
|
||||||
"type": "change",
|
|
||||||
"z": "b73eb220c60f9f8b",
|
|
||||||
"name": "Send STOP",
|
|
||||||
"rules": [
|
|
||||||
{
|
|
||||||
"t": "set",
|
|
||||||
"p": "payload",
|
|
||||||
"pt": "msg",
|
|
||||||
"to": "stop",
|
|
||||||
"tot": "str"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"x": 410,
|
|
||||||
"y": 200,
|
|
||||||
"wires": [
|
|
||||||
[
|
|
||||||
"c0926692.581f73"
|
|
||||||
]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "errb73eb220_c",
|
|
||||||
"type": "catch",
|
|
||||||
"z": "b73eb220c60f9f8b",
|
|
||||||
"name": "Tab errors",
|
|
||||||
"scope": null,
|
|
||||||
"uncaught": false,
|
|
||||||
"x": 120,
|
|
||||||
"y": 2000,
|
|
||||||
"wires": [
|
|
||||||
[
|
|
||||||
"errb73eb220_f"
|
|
||||||
]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "errb73eb220_f",
|
|
||||||
"type": "function",
|
|
||||||
"z": "b73eb220c60f9f8b",
|
|
||||||
"name": "Format error",
|
|
||||||
"func": "const e = msg.error && msg.error.message ? msg.error.message : String(msg.error || 'Unknown error');\nmsg.payload = JSON.stringify({ message: e, title: \"NR Error: Espresso Machine\", data: { priority: 1 } });\nreturn msg;",
|
|
||||||
"outputs": 1,
|
|
||||||
"timeout": "",
|
|
||||||
"noerr": 0,
|
|
||||||
"initialize": "",
|
|
||||||
"finalize": "",
|
|
||||||
"libs": [],
|
|
||||||
"x": 360,
|
|
||||||
"y": 2000,
|
|
||||||
"wires": [
|
|
||||||
[
|
|
||||||
"errb73eb220_s"
|
|
||||||
]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "errb73eb220_s",
|
|
||||||
"type": "api-call-service",
|
|
||||||
"z": "b73eb220c60f9f8b",
|
|
||||||
"name": "gotify_nodered",
|
|
||||||
"server": "657c7463.48e1e4",
|
|
||||||
"version": 7,
|
|
||||||
"debugenabled": false,
|
|
||||||
"areaId": [],
|
|
||||||
"deviceId": [],
|
|
||||||
"entityId": [],
|
|
||||||
"data": "{{{payload}}}",
|
|
||||||
"dataType": "json",
|
|
||||||
"mergeContext": "",
|
|
||||||
"mustacheAltTags": false,
|
|
||||||
"outputProperties": [],
|
|
||||||
"queue": "none",
|
|
||||||
"domain": "notify",
|
|
||||||
"service": "gotify_nodered",
|
|
||||||
"x": 600,
|
|
||||||
"y": 2000,
|
|
||||||
"wires": [
|
|
||||||
[]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "3dbc0aef753068b6",
|
|
||||||
"type": "catch",
|
|
||||||
"z": "b73eb220c60f9f8b",
|
|
||||||
"name": "Tab errors",
|
|
||||||
"scope": null,
|
|
||||||
"uncaught": false,
|
|
||||||
"x": 120,
|
|
||||||
"y": 320,
|
|
||||||
"wires": [
|
|
||||||
[
|
|
||||||
"f12242c7d3a27af5"
|
|
||||||
]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "f12242c7d3a27af5",
|
|
||||||
"type": "function",
|
|
||||||
"z": "b73eb220c60f9f8b",
|
|
||||||
"name": "Format error",
|
|
||||||
"func": "const e = msg.error && msg.error.message ? msg.error.message : String(msg.error || 'Unknown error');\nmsg.payload = JSON.stringify({ message: e, title: \"NR Error: Living room\", data: { priority: 1 } });\nreturn msg;",
|
|
||||||
"outputs": 1,
|
|
||||||
"timeout": "",
|
|
||||||
"noerr": 0,
|
|
||||||
"initialize": "",
|
|
||||||
"finalize": "",
|
|
||||||
"libs": [],
|
|
||||||
"x": 390,
|
|
||||||
"y": 320,
|
|
||||||
"wires": [
|
|
||||||
[
|
|
||||||
"4abcaba467c1d59d"
|
|
||||||
]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "4abcaba467c1d59d",
|
|
||||||
"type": "api-call-service",
|
|
||||||
"z": "b73eb220c60f9f8b",
|
|
||||||
"name": "gotify_nodered",
|
|
||||||
"server": "657c7463.48e1e4",
|
|
||||||
"version": 7,
|
|
||||||
"debugenabled": false,
|
|
||||||
"action": "notify.gotify_nodered",
|
|
||||||
"floorId": [],
|
|
||||||
"areaId": [],
|
|
||||||
"deviceId": [],
|
|
||||||
"entityId": [],
|
|
||||||
"labelId": [],
|
|
||||||
"data": "{{{payload}}}",
|
|
||||||
"dataType": "json",
|
|
||||||
"mergeContext": "",
|
|
||||||
"mustacheAltTags": false,
|
|
||||||
"outputProperties": [],
|
|
||||||
"queue": "none",
|
|
||||||
"blockInputOverrides": false,
|
|
||||||
"domain": "notify",
|
|
||||||
"service": "gotify_nodered",
|
|
||||||
"x": 640,
|
|
||||||
"y": 320,
|
|
||||||
"wires": [
|
|
||||||
[]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "bcbc032dc0da76b5",
|
|
||||||
"type": "inject",
|
|
||||||
"z": "b73eb220c60f9f8b",
|
|
||||||
"name": "",
|
|
||||||
"props": [
|
|
||||||
{
|
|
||||||
"p": "payload"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"repeat": "",
|
|
||||||
"crontab": "",
|
|
||||||
"once": false,
|
|
||||||
"onceDelay": 0.1,
|
|
||||||
"topic": "",
|
|
||||||
"payload": "5",
|
|
||||||
"payloadType": "num",
|
|
||||||
"x": 410,
|
|
||||||
"y": 260,
|
|
||||||
"wires": [
|
|
||||||
[
|
|
||||||
"espresso_fn_001"
|
|
||||||
]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"id": "970f66c027cf1bda",
|
"id": "970f66c027cf1bda",
|
||||||
"type": "server-state-changed",
|
"type": "server-state-changed",
|
||||||
@@ -21748,5 +21336,561 @@
|
|||||||
[]
|
[]
|
||||||
],
|
],
|
||||||
"action": "select.select_option"
|
"action": "select.select_option"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "tab",
|
||||||
|
"label": "[Kitchen] Espresso Machine",
|
||||||
|
"id": "b73eb220c60f9f8b",
|
||||||
|
"info": "",
|
||||||
|
"disabled": false,
|
||||||
|
"env": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "b1b0a80b.d1f6cf",
|
||||||
|
"type": "api-current-state",
|
||||||
|
"z": "b73eb220c60f9f8b",
|
||||||
|
"name": "Get auto standby time",
|
||||||
|
"server": "657c7463.48e1e4",
|
||||||
|
"version": 3,
|
||||||
|
"outputs": 1,
|
||||||
|
"halt_if": "",
|
||||||
|
"halt_if_type": "str",
|
||||||
|
"halt_if_compare": "is",
|
||||||
|
"entity_id": "input_number.coffee_max_standby",
|
||||||
|
"state_type": "",
|
||||||
|
"blockInputOverrides": false,
|
||||||
|
"outputProperties": [
|
||||||
|
{
|
||||||
|
"property": "payload",
|
||||||
|
"propertyType": "msg",
|
||||||
|
"value": "number",
|
||||||
|
"valueType": "entityState"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"for": 0,
|
||||||
|
"forType": "num",
|
||||||
|
"forUnits": "minutes",
|
||||||
|
"x": 440,
|
||||||
|
"y": 120,
|
||||||
|
"wires": [
|
||||||
|
[
|
||||||
|
"espresso_fn_001"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "espresso_fn_001",
|
||||||
|
"type": "change",
|
||||||
|
"z": "b73eb220c60f9f8b",
|
||||||
|
"name": "Store standby time",
|
||||||
|
"rules": [
|
||||||
|
{
|
||||||
|
"t": "set",
|
||||||
|
"p": "espresso_standby",
|
||||||
|
"pt": "flow",
|
||||||
|
"to": "payload",
|
||||||
|
"tot": "msg"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"action": "",
|
||||||
|
"property": "",
|
||||||
|
"from": "",
|
||||||
|
"to": "",
|
||||||
|
"reg": false,
|
||||||
|
"x": 750,
|
||||||
|
"y": 120,
|
||||||
|
"wires": [
|
||||||
|
[
|
||||||
|
"c0926692.581f73"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "304a933a.0c94bb",
|
||||||
|
"type": "server-state-changed",
|
||||||
|
"z": "b73eb220c60f9f8b",
|
||||||
|
"name": "Espresso machine is on",
|
||||||
|
"server": "657c7463.48e1e4",
|
||||||
|
"version": 6,
|
||||||
|
"outputs": 2,
|
||||||
|
"exposeAsEntityConfig": "",
|
||||||
|
"entities": {
|
||||||
|
"entity": [
|
||||||
|
"switch.espresso_kitchen"
|
||||||
|
],
|
||||||
|
"substring": [],
|
||||||
|
"regex": []
|
||||||
|
},
|
||||||
|
"outputInitially": false,
|
||||||
|
"stateType": "str",
|
||||||
|
"ifState": "on",
|
||||||
|
"ifStateType": "str",
|
||||||
|
"ifStateOperator": "is",
|
||||||
|
"outputOnlyOnStateChange": true,
|
||||||
|
"for": 0,
|
||||||
|
"forType": "num",
|
||||||
|
"forUnits": "minutes",
|
||||||
|
"ignorePrevStateNull": false,
|
||||||
|
"ignorePrevStateUnknown": false,
|
||||||
|
"ignorePrevStateUnavailable": false,
|
||||||
|
"ignoreCurrentStateUnknown": true,
|
||||||
|
"ignoreCurrentStateUnavailable": true,
|
||||||
|
"outputProperties": [
|
||||||
|
{
|
||||||
|
"property": "payload",
|
||||||
|
"propertyType": "msg",
|
||||||
|
"value": "string",
|
||||||
|
"valueType": "entityState"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"property": "data",
|
||||||
|
"propertyType": "msg",
|
||||||
|
"value": "",
|
||||||
|
"valueType": "eventData"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"property": "topic",
|
||||||
|
"propertyType": "msg",
|
||||||
|
"value": "",
|
||||||
|
"valueType": "triggerId"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"x": 160,
|
||||||
|
"y": 120,
|
||||||
|
"wires": [
|
||||||
|
[
|
||||||
|
"c0926692.581f73"
|
||||||
|
],
|
||||||
|
[]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "8b67baba.6bec7f",
|
||||||
|
"type": "api-call-service",
|
||||||
|
"z": "b73eb220c60f9f8b",
|
||||||
|
"name": "Turn off espresso",
|
||||||
|
"server": "657c7463.48e1e4",
|
||||||
|
"version": 7,
|
||||||
|
"debugenabled": false,
|
||||||
|
"action": "",
|
||||||
|
"floorId": [],
|
||||||
|
"areaId": [],
|
||||||
|
"deviceId": [],
|
||||||
|
"entityId": [
|
||||||
|
"switch.espresso_kitchen"
|
||||||
|
],
|
||||||
|
"labelId": [],
|
||||||
|
"data": "",
|
||||||
|
"dataType": "json",
|
||||||
|
"mergeContext": "",
|
||||||
|
"mustacheAltTags": false,
|
||||||
|
"outputProperties": [],
|
||||||
|
"queue": "none",
|
||||||
|
"blockInputOverrides": false,
|
||||||
|
"domain": "switch",
|
||||||
|
"service": "turn_off",
|
||||||
|
"x": 1090,
|
||||||
|
"y": 200,
|
||||||
|
"wires": [
|
||||||
|
[]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "c0926692.581f73",
|
||||||
|
"type": "stoptimer-varidelay",
|
||||||
|
"z": "b73eb220c60f9f8b",
|
||||||
|
"duration": "espresso_standby",
|
||||||
|
"durationType": "flow",
|
||||||
|
"units": "Minute",
|
||||||
|
"payloadtype": "num",
|
||||||
|
"payloadval": "",
|
||||||
|
"name": "Off timer ",
|
||||||
|
"reporting": "none",
|
||||||
|
"reportingformat": "human",
|
||||||
|
"persist": true,
|
||||||
|
"ignoretimerpass": false,
|
||||||
|
"x": 800,
|
||||||
|
"y": 200,
|
||||||
|
"wires": [
|
||||||
|
[
|
||||||
|
"8b67baba.6bec7f"
|
||||||
|
],
|
||||||
|
[],
|
||||||
|
[]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "fa64478a.97f1a8",
|
||||||
|
"type": "server-state-changed",
|
||||||
|
"z": "b73eb220c60f9f8b",
|
||||||
|
"name": "Espresso machine is off",
|
||||||
|
"server": "657c7463.48e1e4",
|
||||||
|
"version": 6,
|
||||||
|
"outputs": 2,
|
||||||
|
"exposeAsEntityConfig": "",
|
||||||
|
"entities": {
|
||||||
|
"entity": [
|
||||||
|
"switch.espresso_kitchen"
|
||||||
|
],
|
||||||
|
"substring": [],
|
||||||
|
"regex": []
|
||||||
|
},
|
||||||
|
"outputInitially": false,
|
||||||
|
"stateType": "str",
|
||||||
|
"ifState": "off",
|
||||||
|
"ifStateType": "str",
|
||||||
|
"ifStateOperator": "is",
|
||||||
|
"outputOnlyOnStateChange": true,
|
||||||
|
"for": 0,
|
||||||
|
"forType": "num",
|
||||||
|
"forUnits": "minutes",
|
||||||
|
"ignorePrevStateNull": false,
|
||||||
|
"ignorePrevStateUnknown": false,
|
||||||
|
"ignorePrevStateUnavailable": false,
|
||||||
|
"ignoreCurrentStateUnknown": true,
|
||||||
|
"ignoreCurrentStateUnavailable": true,
|
||||||
|
"outputProperties": [
|
||||||
|
{
|
||||||
|
"property": "payload",
|
||||||
|
"propertyType": "msg",
|
||||||
|
"value": "string",
|
||||||
|
"valueType": "entityState"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"property": "data",
|
||||||
|
"propertyType": "msg",
|
||||||
|
"value": "",
|
||||||
|
"valueType": "eventData"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"property": "topic",
|
||||||
|
"propertyType": "msg",
|
||||||
|
"value": "",
|
||||||
|
"valueType": "triggerId"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"x": 160,
|
||||||
|
"y": 200,
|
||||||
|
"wires": [
|
||||||
|
[
|
||||||
|
"f4b1069c.ad2569"
|
||||||
|
],
|
||||||
|
[]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "f4b1069c.ad2569",
|
||||||
|
"type": "change",
|
||||||
|
"z": "b73eb220c60f9f8b",
|
||||||
|
"name": "Send STOP",
|
||||||
|
"rules": [
|
||||||
|
{
|
||||||
|
"t": "set",
|
||||||
|
"p": "payload",
|
||||||
|
"pt": "msg",
|
||||||
|
"to": "stop",
|
||||||
|
"tot": "str"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"x": 410,
|
||||||
|
"y": 200,
|
||||||
|
"wires": [
|
||||||
|
[
|
||||||
|
"c0926692.581f73"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "errb73eb220_c",
|
||||||
|
"type": "catch",
|
||||||
|
"z": "b73eb220c60f9f8b",
|
||||||
|
"name": "Tab errors",
|
||||||
|
"scope": null,
|
||||||
|
"uncaught": false,
|
||||||
|
"x": 120,
|
||||||
|
"y": 2000,
|
||||||
|
"wires": [
|
||||||
|
[
|
||||||
|
"errb73eb220_f"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "errb73eb220_f",
|
||||||
|
"type": "function",
|
||||||
|
"z": "b73eb220c60f9f8b",
|
||||||
|
"name": "Format error",
|
||||||
|
"func": "const e = msg.error && msg.error.message ? msg.error.message : String(msg.error || 'Unknown error');\nmsg.payload = JSON.stringify({ message: e, title: \"NR Error: Espresso Machine\", data: { priority: 1 } });\nreturn msg;",
|
||||||
|
"outputs": 1,
|
||||||
|
"timeout": "",
|
||||||
|
"noerr": 0,
|
||||||
|
"initialize": "",
|
||||||
|
"finalize": "",
|
||||||
|
"libs": [],
|
||||||
|
"x": 360,
|
||||||
|
"y": 2000,
|
||||||
|
"wires": [
|
||||||
|
[
|
||||||
|
"errb73eb220_s"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "errb73eb220_s",
|
||||||
|
"type": "api-call-service",
|
||||||
|
"z": "b73eb220c60f9f8b",
|
||||||
|
"name": "gotify_nodered",
|
||||||
|
"server": "657c7463.48e1e4",
|
||||||
|
"version": 7,
|
||||||
|
"debugenabled": false,
|
||||||
|
"areaId": [],
|
||||||
|
"deviceId": [],
|
||||||
|
"entityId": [],
|
||||||
|
"data": "{{{payload}}}",
|
||||||
|
"dataType": "json",
|
||||||
|
"mergeContext": "",
|
||||||
|
"mustacheAltTags": false,
|
||||||
|
"outputProperties": [],
|
||||||
|
"queue": "none",
|
||||||
|
"domain": "notify",
|
||||||
|
"service": "gotify_nodered",
|
||||||
|
"x": 600,
|
||||||
|
"y": 2000,
|
||||||
|
"wires": [
|
||||||
|
[]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "3dbc0aef753068b6",
|
||||||
|
"type": "catch",
|
||||||
|
"z": "b73eb220c60f9f8b",
|
||||||
|
"name": "Tab errors",
|
||||||
|
"scope": null,
|
||||||
|
"uncaught": false,
|
||||||
|
"x": 120,
|
||||||
|
"y": 320,
|
||||||
|
"wires": [
|
||||||
|
[
|
||||||
|
"f12242c7d3a27af5"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "f12242c7d3a27af5",
|
||||||
|
"type": "function",
|
||||||
|
"z": "b73eb220c60f9f8b",
|
||||||
|
"name": "Format error",
|
||||||
|
"func": "const e = msg.error && msg.error.message ? msg.error.message : String(msg.error || 'Unknown error');\nmsg.payload = JSON.stringify({ message: e, title: \"NR Error: Living room\", data: { priority: 1 } });\nreturn msg;",
|
||||||
|
"outputs": 1,
|
||||||
|
"timeout": "",
|
||||||
|
"noerr": 0,
|
||||||
|
"initialize": "",
|
||||||
|
"finalize": "",
|
||||||
|
"libs": [],
|
||||||
|
"x": 390,
|
||||||
|
"y": 320,
|
||||||
|
"wires": [
|
||||||
|
[
|
||||||
|
"4abcaba467c1d59d"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "4abcaba467c1d59d",
|
||||||
|
"type": "api-call-service",
|
||||||
|
"z": "b73eb220c60f9f8b",
|
||||||
|
"name": "gotify_nodered",
|
||||||
|
"server": "657c7463.48e1e4",
|
||||||
|
"version": 7,
|
||||||
|
"debugenabled": false,
|
||||||
|
"action": "notify.gotify_nodered",
|
||||||
|
"floorId": [],
|
||||||
|
"areaId": [],
|
||||||
|
"deviceId": [],
|
||||||
|
"entityId": [],
|
||||||
|
"labelId": [],
|
||||||
|
"data": "{{{payload}}}",
|
||||||
|
"dataType": "json",
|
||||||
|
"mergeContext": "",
|
||||||
|
"mustacheAltTags": false,
|
||||||
|
"outputProperties": [],
|
||||||
|
"queue": "none",
|
||||||
|
"blockInputOverrides": false,
|
||||||
|
"domain": "notify",
|
||||||
|
"service": "gotify_nodered",
|
||||||
|
"x": 640,
|
||||||
|
"y": 320,
|
||||||
|
"wires": [
|
||||||
|
[]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "bcbc032dc0da76b5",
|
||||||
|
"type": "inject",
|
||||||
|
"z": "b73eb220c60f9f8b",
|
||||||
|
"name": "",
|
||||||
|
"props": [
|
||||||
|
{
|
||||||
|
"p": "payload"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"repeat": "",
|
||||||
|
"crontab": "",
|
||||||
|
"once": false,
|
||||||
|
"onceDelay": 0.1,
|
||||||
|
"topic": "",
|
||||||
|
"payload": "5",
|
||||||
|
"payloadType": "num",
|
||||||
|
"x": 410,
|
||||||
|
"y": 260,
|
||||||
|
"wires": [
|
||||||
|
[
|
||||||
|
"espresso_fn_001"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "espresso_cmt_sync",
|
||||||
|
"type": "comment",
|
||||||
|
"z": "b73eb220c60f9f8b",
|
||||||
|
"name": "Keep flow.espresso_standby in sync (fixes race condition)",
|
||||||
|
"info": "",
|
||||||
|
"x": 250,
|
||||||
|
"y": 320,
|
||||||
|
"wires": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "espresso_inj_init",
|
||||||
|
"type": "inject",
|
||||||
|
"z": "b73eb220c60f9f8b",
|
||||||
|
"name": "Init: read standby time",
|
||||||
|
"props": [
|
||||||
|
{
|
||||||
|
"p": "payload"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"repeat": "",
|
||||||
|
"crontab": "",
|
||||||
|
"once": true,
|
||||||
|
"onceDelay": 0.5,
|
||||||
|
"topic": "",
|
||||||
|
"payload": "",
|
||||||
|
"payloadType": "date",
|
||||||
|
"x": 200,
|
||||||
|
"y": 360,
|
||||||
|
"wires": [
|
||||||
|
[
|
||||||
|
"espresso_acs_init"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "espresso_acs_init",
|
||||||
|
"type": "api-current-state",
|
||||||
|
"z": "b73eb220c60f9f8b",
|
||||||
|
"name": "Get standby time",
|
||||||
|
"server": "657c7463.48e1e4",
|
||||||
|
"version": 3,
|
||||||
|
"outputs": 1,
|
||||||
|
"halt_if": "",
|
||||||
|
"halt_if_type": "str",
|
||||||
|
"halt_if_compare": "is",
|
||||||
|
"entity_id": "input_number.coffee_max_standby",
|
||||||
|
"state_type": "",
|
||||||
|
"blockInputOverrides": false,
|
||||||
|
"outputProperties": [
|
||||||
|
{
|
||||||
|
"property": "payload",
|
||||||
|
"propertyType": "msg",
|
||||||
|
"value": "number",
|
||||||
|
"valueType": "entityState"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"for": 0,
|
||||||
|
"forType": "num",
|
||||||
|
"forUnits": "minutes",
|
||||||
|
"override_topic": false,
|
||||||
|
"state_location": "payload",
|
||||||
|
"override_payload": "msg",
|
||||||
|
"entity_location": "data",
|
||||||
|
"override_data": "msg",
|
||||||
|
"x": 460,
|
||||||
|
"y": 360,
|
||||||
|
"wires": [
|
||||||
|
[
|
||||||
|
"espresso_chg_store"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "espresso_ssc_standby",
|
||||||
|
"type": "server-state-changed",
|
||||||
|
"z": "b73eb220c60f9f8b",
|
||||||
|
"name": "Standby time changed",
|
||||||
|
"server": "657c7463.48e1e4",
|
||||||
|
"version": 6,
|
||||||
|
"outputs": 1,
|
||||||
|
"exposeAsEntityConfig": "",
|
||||||
|
"entities": {
|
||||||
|
"entity": [
|
||||||
|
"input_number.coffee_max_standby"
|
||||||
|
],
|
||||||
|
"substring": [],
|
||||||
|
"regex": []
|
||||||
|
},
|
||||||
|
"outputInitially": false,
|
||||||
|
"stateType": "",
|
||||||
|
"ifState": "",
|
||||||
|
"ifStateType": "str",
|
||||||
|
"ifStateOperator": "is",
|
||||||
|
"outputOnlyOnStateChange": true,
|
||||||
|
"for": 0,
|
||||||
|
"forType": "num",
|
||||||
|
"forUnits": "minutes",
|
||||||
|
"ignorePrevStateNull": false,
|
||||||
|
"ignorePrevStateUnknown": false,
|
||||||
|
"ignorePrevStateUnavailable": false,
|
||||||
|
"ignoreCurrentStateUnknown": true,
|
||||||
|
"ignoreCurrentStateUnavailable": true,
|
||||||
|
"outputProperties": [
|
||||||
|
{
|
||||||
|
"property": "payload",
|
||||||
|
"propertyType": "msg",
|
||||||
|
"value": "number",
|
||||||
|
"valueType": "entityState"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"x": 200,
|
||||||
|
"y": 420,
|
||||||
|
"wires": [
|
||||||
|
[
|
||||||
|
"espresso_chg_store"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "espresso_chg_store",
|
||||||
|
"type": "change",
|
||||||
|
"z": "b73eb220c60f9f8b",
|
||||||
|
"name": "Update flow.espresso_standby",
|
||||||
|
"rules": [
|
||||||
|
{
|
||||||
|
"t": "set",
|
||||||
|
"p": "espresso_standby",
|
||||||
|
"pt": "flow",
|
||||||
|
"to": "payload",
|
||||||
|
"tot": "msg"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"action": "",
|
||||||
|
"property": "",
|
||||||
|
"from": "",
|
||||||
|
"to": "",
|
||||||
|
"reg": false,
|
||||||
|
"x": 760,
|
||||||
|
"y": 390,
|
||||||
|
"wires": [
|
||||||
|
[]
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
Reference in New Issue
Block a user