Je gedachtegang is te ingewikkeld voor mijn brein. Ik hoop dat anderen hier wat zinnigs over kunnen zeggen. Ik ben net begonnen het DAO topic te lezen en mogelijk ga ik nog optimaliseren, maar KISS bevalt me ook wel.
[
{
"id": "7171c1d657b6e486",
"type": "tab",
"label": "Amber legionella programma op zondag wanneer prijs laagst is",
"disabled": false,
"info": "",
"env": []
},
{
"id": "inject_zondag",
"type": "inject",
"z": "7171c1d657b6e486",
"name": "Elke zondag 00:05",
"props": [],
"repeat": "",
"crontab": "05 00 * * 0",
"once": false,
"onceDelay": 0.1,
"topic": "",
"x": 210,
"y": 260,
"wires": [
[
"2709f22a3f7c7644"
]
]
},
{
"id": "moment_cheapest",
"type": "moment",
"z": "7171c1d657b6e486",
"name": "Zet tijd om naar timestamp",
"topic": "",
"input": "cheapest_time",
"inputType": "msg",
"inTz": "Europe/Amsterdam",
"adjAmount": 0,
"adjType": "hours",
"adjDir": "add",
"format": "",
"locale": "C",
"output": "cheapest_timestamp",
"outputType": "msg",
"outTz": "Europe/Amsterdam",
"x": 880,
"y": 260,
"wires": [
[
"0b953445e7c1301a",
"f505563caf0359ab"
]
]
},
{
"id": "delay_until_cheapest",
"type": "delay",
"z": "7171c1d657b6e486",
"name": "Wacht tot goedkoopste uur",
"pauseType": "delayv",
"timeout": "0",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 1320,
"y": 200,
"wires": [
[
"lees_setpoint",
"9ef1d1832f3834e9"
]
]
},
{
"id": "lees_setpoint",
"type": "api-current-state",
"z": "7171c1d657b6e486",
"name": "Lees setpoint",
"server": "83957022.c437b",
"version": 3,
"outputs": 1,
"halt_if": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "number.amber_setpoint_dhw",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "string",
"valueType": "entityState"
}
],
"for": "",
"forType": "num",
"x": 1580,
"y": 400,
"wires": [
[
"2d2e95f18b243dad",
"eb7ce402dd69cce0"
]
]
},
{
"id": "lees_mode",
"type": "api-current-state",
"z": "7171c1d657b6e486",
"name": "Lees mode",
"server": "83957022.c437b",
"version": 3,
"outputs": 1,
"halt_if": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "select.amber_working_mode",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
}
],
"for": "",
"forType": "num",
"x": 1590,
"y": 240,
"wires": [
[
"backup_opslaan",
"44d9b4d5e15dab13"
]
]
},
{
"id": "backup_opslaan",
"type": "function",
"z": "7171c1d657b6e486",
"name": "Backup opslaan",
"func": "flow.set('backup_working_mode', msg.payload);\nmsg.payload = {value: Number('70') };\nreturn msg;",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1780,
"y": 240,
"wires": [
[
"set_setpoint",
"8a3746ecc25bac88"
]
]
},
{
"id": "set_setpoint",
"type": "api-call-service",
"z": "7171c1d657b6e486",
"name": "Setpoint naar 70",
"server": "83957022.c437b",
"version": 7,
"debugenabled": true,
"action": "number.set_value",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"number.amber_setpoint_dhw"
],
"labelId": [],
"data": "{\"value\":70}",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "number",
"service": "set_value",
"x": 2000,
"y": 240,
"wires": [
[
"set_mode"
]
]
},
{
"id": "set_mode",
"type": "api-call-service",
"z": "7171c1d657b6e486",
"name": "Mode naar DHW",
"server": "83957022.c437b",
"version": 7,
"debugenabled": false,
"action": "select.select_option",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"select.amber_working_mode"
],
"labelId": [],
"data": "{\"option\":\"DHW\"}",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "select",
"service": "select_option",
"x": 2290,
"y": 240,
"wires": [
[
"f290ec3c1522105b"
]
]
},
{
"id": "delay_20min",
"type": "delay",
"z": "7171c1d657b6e486",
"name": "20 minuten wachten",
"pauseType": "delay",
"timeout": "20",
"timeoutUnits": "minutes",
"rate": "1",
"nbRateUnits": "20",
"rateUnits": "minute",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": true,
"allowrate": false,
"outputs": 1,
"x": 1540,
"y": 640,
"wires": [
[
"22b4ddc5b3d5edd9"
]
]
},
{
"id": "restore_setpoint",
"type": "api-call-service",
"z": "7171c1d657b6e486",
"name": "Herstel setpoint",
"server": "83957022.c437b",
"version": 7,
"debugenabled": false,
"action": "number.set_value",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"number.amber_setpoint_dhw"
],
"labelId": [],
"data": "msg.payload",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "number",
"service": "set_value",
"x": 1980,
"y": 640,
"wires": [
[
"31e2231c671e924f"
]
]
},
{
"id": "restore_mode",
"type": "api-call-service",
"z": "7171c1d657b6e486",
"name": "Herstel mode",
"server": "83957022.c437b",
"version": 7,
"debugenabled": false,
"action": "input_select.select_option",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"select.amber_working_mode"
],
"labelId": [],
"data": "msg.payload",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "input_select",
"service": "select_option",
"x": 2480,
"y": 640,
"wires": [
[
"51df13731386df9b"
]
]
},
{
"id": "9ef1d1832f3834e9",
"type": "api-call-service",
"z": "7171c1d657b6e486",
"name": "informeer",
"server": "83957022.c437b",
"version": 7,
"debugenabled": false,
"action": "notify.mobile_app_iphonet",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [],
"labelId": [],
"data": "{\"message\":\"Het legionella programma is gestart!\",\"title\":\"Node-RED Flow\"}",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": true,
"domain": "notify",
"service": "mobile_app_iphonet",
"x": 1580,
"y": 80,
"wires": [
[]
]
},
{
"id": "7afdcbfcbd9ed7d4",
"type": "ha-wait-until",
"z": "7171c1d657b6e486",
"name": "Wachten tot 60ºC is bereikt",
"server": "83957022.c437b",
"version": 3,
"outputs": 2,
"entities": {
"entity": [
"sensor.amber_dhw_temperture_tw"
],
"substring": [],
"regex": []
},
"property": "state",
"comparator": "gte",
"value": "60",
"valueType": "num",
"timeout": "1",
"timeoutType": "num",
"timeoutUnits": "hours",
"checkCurrentState": true,
"blockInputOverrides": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "Timer starten",
"valueType": "str"
}
],
"x": 840,
"y": 640,
"wires": [
[
"c631d71161fe9ba7"
],
[
"3efe132bd5453f44"
]
]
},
{
"id": "3efe132bd5453f44",
"type": "debug",
"z": "7171c1d657b6e486",
"name": "time out legionella programma",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1150,
"y": 720,
"wires": []
},
{
"id": "ce822e2676e2d2a2",
"type": "api-call-service",
"z": "7171c1d657b6e486",
"name": "informeer",
"server": "83957022.c437b",
"version": 7,
"debugenabled": false,
"action": "notify.mobile_app_iphonet",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [],
"labelId": [],
"data": "{\t \"message\": \"Het legionella programma is afgerond!\",\t \"title\": \"Node-RED Flow\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": true,
"domain": "notify",
"service": "mobile_app_iphonet",
"x": 2960,
"y": 640,
"wires": [
[]
]
},
{
"id": "0b953445e7c1301a",
"type": "debug",
"z": "7171c1d657b6e486",
"name": "tijdstip object",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1080,
"y": 160,
"wires": []
},
{
"id": "2709f22a3f7c7644",
"type": "api-current-state",
"z": "7171c1d657b6e486",
"name": "Lees Nordpool Sensor",
"server": "83957022.c437b",
"version": 3,
"outputs": 1,
"halt_if": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "sensor.nordpool_kwh_nl_eur_3_10_021",
"state_type": "str",
"blockInputOverrides": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 440,
"y": 260,
"wires": [
[
"be3c0d145f69b43b",
"5de5d59bb6980333"
]
]
},
{
"id": "be3c0d145f69b43b",
"type": "debug",
"z": "7171c1d657b6e486",
"name": "Payload Nordpool sensor",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 670,
"y": 360,
"wires": []
},
{
"id": "5de5d59bb6980333",
"type": "function",
"z": "7171c1d657b6e486",
"name": "Bepaal goedkoopste start uur",
"func": "// Haal Nordpool data op\nconst prijzen = msg.data.attributes.raw_today;\nif (!prijzen || !Array.isArray(prijzen)) {\n node.warn(\"Geen geldige prijsdata gevonden\");\n return null;\n}\n\n// Zoek goedkoopste opeenvolgende uren\nlet minSom = Infinity;\nlet startIndex = 0;\n\nfor (let i = 0; i < prijzen.length - 1; i++) {\n let som = prijzen[i].value + prijzen[i + 1].value;\n if (som < minSom) {\n minSom = som;\n startIndex = i;\n }\n}\n\n// Zet het starttijdstip van het goedkoopste blok in msg.cheapest_time\nmsg.cheapest_time = prijzen[startIndex].start;\n// Optioneel: geef het hele blok terug\nmsg.cheapest_hours = [prijzen[startIndex], prijzen[startIndex + 1]];\nreturn msg;",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 690,
"y": 180,
"wires": [
[
"1106549f2308f1ae",
"moment_cheapest",
"068985426ce5d717"
]
]
},
{
"id": "1106549f2308f1ae",
"type": "debug",
"z": "7171c1d657b6e486",
"name": "Goedkoopste tijdstip",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 940,
"y": 60,
"wires": []
},
{
"id": "f505563caf0359ab",
"type": "function",
"z": "7171c1d657b6e486",
"name": "vertraging berekenen",
"func": "// Zorg dat het tijdstip in een Date object zit\nlet goedkoopsteStart = new Date(msg.cheapest_timestamp);\nlet nu = new Date();\n\n// Bereken het aantal milliseconden tot het goedkoopste uur\nlet delayMs = goedkoopsteStart.getTime() - nu.getTime();\n\n// Controleer of het tijdstip in de toekomst ligt\nif (delayMs > 0) {\n msg.delay = delayMs;\n} else {\n // Tijdstip is al voorbij, geen delay nodig\n msg.delay = 0;\n}\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1120,
"y": 320,
"wires": [
[
"delay_until_cheapest",
"7f44ea33beb14717"
]
]
},
{
"id": "7f44ea33beb14717",
"type": "debug",
"z": "7171c1d657b6e486",
"name": "delay in ms",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1190,
"y": 400,
"wires": []
},
{
"id": "d4f8b35c38fac76f",
"type": "inject",
"z": "7171c1d657b6e486",
"name": "Klik start",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 1400,
"y": 400,
"wires": [
[
"lees_setpoint"
]
]
},
{
"id": "2d2e95f18b243dad",
"type": "function",
"z": "7171c1d657b6e486",
"name": "Backup opslaan",
"func": "flow.set('backup_setpoint_dhw', msg.payload)\nreturn msg;",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1780,
"y": 400,
"wires": [
[
"lees_mode"
]
]
},
{
"id": "b31f32044794b6d2",
"type": "server-state-changed",
"z": "7171c1d657b6e486",
"name": "Meet DHW temperatuur",
"server": "83957022.c437b",
"version": 6,
"outputs": 1,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"sensor.amber_dhw_temperture_tw"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": false,
"ignorePrevStateUnavailable": false,
"ignoreCurrentStateUnknown": false,
"ignoreCurrentStateUnavailable": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "eventData"
},
{
"property": "topic",
"propertyType": "msg",
"value": "",
"valueType": "triggerId"
}
],
"x": 200,
"y": 640,
"wires": [
[
"a5548b439971bef0",
"5b7e9a9187f742a7"
]
]
},
{
"id": "a5548b439971bef0",
"type": "debug",
"z": "7171c1d657b6e486",
"name": "meet temp",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 510,
"y": 700,
"wires": []
},
{
"id": "517f071c00425e22",
"type": "debug",
"z": "7171c1d657b6e486",
"name": "temp als nummer",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 810,
"y": 500,
"wires": []
},
{
"id": "516e0430069e2557",
"type": "inject",
"z": "7171c1d657b6e486",
"name": "Klik start",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 620,
"y": 800,
"wires": [
[
"7afdcbfcbd9ed7d4"
]
]
},
{
"id": "22b4ddc5b3d5edd9",
"type": "function",
"z": "7171c1d657b6e486",
"name": "function 1",
"func": "msg.payload = {\n \"value\": parseFloat(flow.get(\"backup_setpoint_dhw\")) // Zet de flow context om naar een getal\n};\nreturn msg;\n",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1760,
"y": 640,
"wires": [
[
"restore_setpoint",
"e9d271f7ccf8e2b5"
]
]
},
{
"id": "eb7ce402dd69cce0",
"type": "debug",
"z": "7171c1d657b6e486",
"name": "debug 2",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1780,
"y": 460,
"wires": []
},
{
"id": "31e2231c671e924f",
"type": "function",
"z": "7171c1d657b6e486",
"name": "function 2",
"func": "let option = flow.get('backup_working_mode');\nmsg.payload = {\n \"entity_id\": \"select.amber_working_mode\",\n \"option\": option\n};\nreturn msg;\n",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 2240,
"y": 640,
"wires": [
[
"restore_mode",
"2123c729de0d67b4"
]
]
},
{
"id": "e9d271f7ccf8e2b5",
"type": "debug",
"z": "7171c1d657b6e486",
"name": "debug 1",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1940,
"y": 720,
"wires": []
},
{
"id": "2123c729de0d67b4",
"type": "debug",
"z": "7171c1d657b6e486",
"name": "debug 3",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 2480,
"y": 740,
"wires": []
},
{
"id": "8a3746ecc25bac88",
"type": "debug",
"z": "7171c1d657b6e486",
"name": "debug 4",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 2000,
"y": 320,
"wires": []
},
{
"id": "44d9b4d5e15dab13",
"type": "debug",
"z": "7171c1d657b6e486",
"name": "debug 5",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1760,
"y": 160,
"wires": []
},
{
"id": "f290ec3c1522105b",
"type": "function",
"z": "7171c1d657b6e486",
"name": "Activeer monitoring",
"func": "flow.set('flow_active', true);\nflow.set('first_sent', false);\nglobal.set('legionella-programma-draait', true);\nreturn msg;\n",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 2590,
"y": 240,
"wires": [
[]
]
},
{
"id": "51df13731386df9b",
"type": "function",
"z": "7171c1d657b6e486",
"name": "Deactiveer monitoring",
"func": "flow.set('flow_active', false);\nflow.set('first_sent', false);\nglobal.set('legionella-programma-draait', false);\nreturn msg;\n",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 2760,
"y": 640,
"wires": [
[
"ce822e2676e2d2a2"
]
]
},
{
"id": "5b7e9a9187f742a7",
"type": "function",
"z": "7171c1d657b6e486",
"name": "controleer of de flow actief is",
"func": "// Zet de payload om naar een getal\nmsg.payload = parseFloat(msg.payload);\nif (flow.get('flow_active') === true) {\n return msg;\n} else {\n return null;\n}",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 540,
"y": 580,
"wires": [
[
"517f071c00425e22",
"7afdcbfcbd9ed7d4",
"c9bcf04a057b4a73"
]
]
},
{
"id": "9cdf3b57d9046597",
"type": "inject",
"z": "7171c1d657b6e486",
"name": "Klik start",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 1960,
"y": 140,
"wires": [
[
"set_setpoint"
]
]
},
{
"id": "8811d4497a37213c",
"type": "inject",
"z": "7171c1d657b6e486",
"name": "Klik start",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 2500,
"y": 520,
"wires": [
[
"51df13731386df9b"
]
]
},
{
"id": "b6f2df4811e2428a",
"type": "function",
"z": "7171c1d657b6e486",
"name": "Log tijdstip waarop 60ºC is bereikt",
"func": "let nu = new Date\nflow.set('reached_60_degrees_DWH_at',nu );\nreturn msg;\n",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1580,
"y": 560,
"wires": [
[]
]
},
{
"id": "c631d71161fe9ba7",
"type": "function",
"z": "7171c1d657b6e486",
"name": "alleen het 1e bericht doorsturen",
"func": "// Check of de flow actief is\nif (flow.get('flow_active') !== true) {\n // Flow is niet actief, drop alles\n return null;\n}\n\n// Check of het eerste bericht al is doorgestuurd\nif (!flow.get('first_sent')) {\n // Eerste bericht: markeer als verzonden\n flow.set('first_sent', true);\n return msg; // Laat door naar delay-node\n} else {\n // Niet het eerste bericht: drop\n return null;\n}",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1210,
"y": 640,
"wires": [
[
"delay_20min",
"b6f2df4811e2428a"
]
]
},
{
"id": "068985426ce5d717",
"type": "function",
"z": "7171c1d657b6e486",
"name": "Log tijdstip waarop programma start",
"func": "let nu = new Date\nflow.set('start_time_legionalla_prog',msg.cheapest_time );\nreturn null;\n",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 990,
"y": 100,
"wires": [
[]
]
},
{
"id": "1dca3c4c65bc6ec0",
"type": "function",
"z": "7171c1d657b6e486",
"name": "Global status bijwerken",
"func": "global.set(\"legionella-programma-draait\", false);\nreturn msg;\n",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 390,
"y": 900,
"wires": [
[]
]
},
{
"id": "899690a49ac2a965",
"type": "inject",
"z": "7171c1d657b6e486",
"name": "initieer",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "",
"payload": "false",
"payloadType": "bool",
"x": 170,
"y": 900,
"wires": [
[
"1dca3c4c65bc6ec0"
]
]
},
{
"id": "f6f18d91e971d0e8",
"type": "inject",
"z": "7171c1d657b6e486",
"name": "Klik start",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 2420,
"y": 120,
"wires": [
[
"f290ec3c1522105b"
]
]
},
{
"id": "c9bcf04a057b4a73",
"type": "api-call-service",
"z": "7171c1d657b6e486",
"name": "Setpoint naar 70",
"server": "83957022.c437b",
"version": 7,
"debugenabled": true,
"action": "number.set_value",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"number.amber_setpoint_dhw"
],
"labelId": [],
"data": "{\"value\":70}",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "number",
"service": "set_value",
"x": 800,
"y": 560,
"wires": [
[]
]
},
{
"id": "83957022.c437b",
"type": "server",
"name": "Home Assistant",
"addon": true
},
{
"id": "a4d49ce50b4f59ab",
"type": "global-config",
"env": [],
"modules": {
"node-red-contrib-moment": "5.0.0",
"node-red-contrib-home-assistant-websocket": "0.80.3"
}
}
]