Kód: Vybrat vše
[
{
"id": "9ef7ece0ab2ec02f",
"type": "tab",
"label": "Klima kancelar",
"disabled": false,
"info": "",
"env": []
},
{
"id": "e01fec0f0a73be6c",
"type": "api-current-state",
"z": "9ef7ece0ab2ec02f",
"name": "battery SOC >90",
"server": "c10ba6d.0704058",
"version": 3,
"outputs": 2,
"halt_if": "90",
"halt_if_type": "num",
"halt_if_compare": "gt",
"entity_id": "sensor.battery_state_of_charge",
"state_type": "str",
"blockInputOverrides": false,
"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": 450,
"y": 80,
"wires": [
[
"7ef24478b5e92616"
],
[]
]
},
{
"id": "da76fe8e6f02d4b1",
"type": "inject",
"z": "9ef7ece0ab2ec02f",
"name": "",
"props": [
{
"p": "payload"
}
],
"repeat": "30",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 130,
"y": 80,
"wires": [
[
"e01fec0f0a73be6c",
"a294e3337feccd65",
"ab7fd9384aa5b1f6"
]
]
},
{
"id": "2046e80e05cac6f0",
"type": "api-call-service",
"z": "9ef7ece0ab2ec02f",
"name": "",
"server": "c10ba6d.0704058",
"version": 5,
"debugenabled": false,
"domain": "climate",
"service": "turn_on",
"areaId": [],
"deviceId": [
"56422900c10f7bbb1a233e689b7a1f96"
],
"entityId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1040,
"y": 300,
"wires": [
[
"52db68c481010120"
]
]
},
{
"id": "ab03bfcd277cbeef",
"type": "catch",
"z": "9ef7ece0ab2ec02f",
"name": "",
"scope": null,
"uncaught": false,
"x": 440,
"y": 180,
"wires": [
[]
]
},
{
"id": "dac4bfeefb79a92d",
"type": "comment",
"z": "9ef7ece0ab2ec02f",
"name": "Jednou za 30 sekund",
"info": "",
"x": 140,
"y": 40,
"wires": []
},
{
"id": "5376473fbda4bf2f",
"type": "comment",
"z": "9ef7ece0ab2ec02f",
"name": "nastaveni hvac",
"info": "",
"x": 1040,
"y": 600,
"wires": []
},
{
"id": "178828aa65c6bc96",
"type": "api-call-service",
"z": "9ef7ece0ab2ec02f",
"name": "",
"server": "c10ba6d.0704058",
"version": 5,
"debugenabled": true,
"domain": "climate",
"service": "turn_off",
"areaId": [],
"deviceId": [
"56422900c10f7bbb1a233e689b7a1f96"
],
"entityId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1020,
"y": 720,
"wires": [
[]
]
},
{
"id": "682d0a53f9ba229b",
"type": "api-current-state",
"z": "9ef7ece0ab2ec02f",
"name": "",
"server": "c10ba6d.0704058",
"version": 3,
"outputs": 2,
"halt_if": "off",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "climate.9424b8b1111",
"state_type": "str",
"blockInputOverrides": false,
"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": 1110,
"y": 160,
"wires": [
[
"17034f88a89a8d28"
],
[]
]
},
{
"id": "0f4a4cc1a93d00d3",
"type": "api-current-state",
"z": "9ef7ece0ab2ec02f",
"name": "",
"server": "c10ba6d.0704058",
"version": 3,
"outputs": 2,
"halt_if": "off",
"halt_if_type": "str",
"halt_if_compare": "is_not",
"entity_id": "climate.9424b8b1111",
"state_type": "str",
"blockInputOverrides": false,
"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": 730,
"y": 420,
"wires": [
[
"bb7f5b7022d7a388"
],
[]
]
},
{
"id": "8c6c01c976733707",
"type": "comment",
"z": "9ef7ece0ab2ec02f",
"name": "nastaveni hvac",
"info": "",
"x": 1040,
"y": 240,
"wires": []
},
{
"id": "a244e84790d9adbb",
"type": "comment",
"z": "9ef7ece0ab2ec02f",
"name": "zapinam hvac pokud je vypnuta (if state==off )",
"info": "",
"x": 1130,
"y": 120,
"wires": []
},
{
"id": "be41baea409e90e5",
"type": "comment",
"z": "9ef7ece0ab2ec02f",
"name": "pokud je hvac zapnuta vypinam (if state<>off)",
"info": "",
"x": 750,
"y": 380,
"wires": []
},
{
"id": "d38c125cd68d0c8c",
"type": "comment",
"z": "9ef7ece0ab2ec02f",
"name": "payload > 600 Watt",
"info": "",
"x": 830,
"y": 120,
"wires": []
},
{
"id": "8dc1a0e48fd8e7b2",
"type": "api-call-service",
"z": "9ef7ece0ab2ec02f",
"name": "",
"server": "c10ba6d.0704058",
"version": 5,
"debugenabled": true,
"domain": "climate",
"service": "set_temperature",
"areaId": [],
"deviceId": [
"56422900c10f7bbb1a233e689b7a1f96"
],
"entityId": [
"climate.9424b8b1111"
],
"data": "{\"temperature\":\" 25\"}",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": true,
"outputProperties": [],
"queue": "none",
"x": 1070,
"y": 440,
"wires": [
[
"b93baafc73dd1d3b"
]
]
},
{
"id": "52db68c481010120",
"type": "api-call-service",
"z": "9ef7ece0ab2ec02f",
"name": "",
"server": "c10ba6d.0704058",
"version": 5,
"debugenabled": true,
"domain": "climate",
"service": "set_hvac_mode",
"areaId": [],
"deviceId": [
"56422900c10f7bbb1a233e689b7a1f96"
],
"entityId": [
"climate.9424b8b1111"
],
"data": "{\"hvac_mode\":\"heat\"}",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": true,
"outputProperties": [],
"queue": "none",
"x": 1070,
"y": 360,
"wires": [
[
"8dc1a0e48fd8e7b2"
]
]
},
{
"id": "b93baafc73dd1d3b",
"type": "api-call-service",
"z": "9ef7ece0ab2ec02f",
"name": "",
"server": "c10ba6d.0704058",
"version": 5,
"debugenabled": true,
"domain": "climate",
"service": "set_fan_mode",
"areaId": [],
"deviceId": [
"56422900c10f7bbb1a233e689b7a1f96"
],
"entityId": [
"climate.9424b8b1111"
],
"data": "{\"fan_mode\":\"low\"}",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": true,
"outputProperties": [],
"queue": "none",
"x": 1060,
"y": 500,
"wires": [
[]
]
},
{
"id": "9632d4c02d0ba62a",
"type": "comment",
"z": "9ef7ece0ab2ec02f",
"name": "battery SOC >90 %",
"info": "",
"x": 450,
"y": 40,
"wires": []
},
{
"id": "d8262de394f45965",
"type": "api-current-state",
"z": "9ef7ece0ab2ec02f",
"name": "battery SOC <80",
"server": "c10ba6d.0704058",
"version": 3,
"outputs": 2,
"halt_if": "80",
"halt_if_type": "num",
"halt_if_compare": "lt",
"entity_id": "sensor.battery_state_of_charge",
"state_type": "str",
"blockInputOverrides": false,
"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": 450,
"y": 220,
"wires": [
[
"f794314f9c88d40d"
],
[]
]
},
{
"id": "f794314f9c88d40d",
"type": "delay",
"z": "9ef7ece0ab2ec02f",
"name": "",
"pauseType": "delay",
"timeout": "5",
"timeoutUnits": "minutes",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 540,
"y": 300,
"wires": [
[
"0f4a4cc1a93d00d3",
"e1123dd9f65d4b61"
]
]
},
{
"id": "e002f3cc42af120d",
"type": "smooth",
"z": "9ef7ece0ab2ec02f",
"name": "",
"property": "payload",
"action": "mean",
"count": "10",
"round": "",
"mult": "single",
"reduce": false,
"x": 660,
"y": 160,
"wires": [
[
"a4c0697d0553797b",
"79b11d097335d035"
]
]
},
{
"id": "a4c0697d0553797b",
"type": "switch",
"z": "9ef7ece0ab2ec02f",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "gt",
"v": "600",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 810,
"y": 160,
"wires": [
[
"682d0a53f9ba229b",
"2a286f6e466ee55c"
]
]
},
{
"id": "b77b2b84fbb6a922",
"type": "comment",
"z": "9ef7ece0ab2ec02f",
"name": "average 10",
"info": "",
"x": 660,
"y": 120,
"wires": []
},
{
"id": "2a286f6e466ee55c",
"type": "debug",
"z": "9ef7ece0ab2ec02f",
"name": "dbg10",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "payload",
"targetType": "msg",
"statusVal": "payload",
"statusType": "auto",
"x": 830,
"y": 240,
"wires": []
},
{
"id": "7ef24478b5e92616",
"type": "api-current-state",
"z": "9ef7ece0ab2ec02f",
"name": "",
"server": "c10ba6d.0704058",
"version": 3,
"outputs": 1,
"halt_if": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "sensor.active_power",
"state_type": "str",
"blockInputOverrides": false,
"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": 740,
"y": 60,
"wires": [
[
"e002f3cc42af120d"
]
]
},
{
"id": "79b11d097335d035",
"type": "debug",
"z": "9ef7ece0ab2ec02f",
"name": "dbg11",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "payload",
"targetType": "msg",
"statusVal": "payload",
"statusType": "auto",
"x": 670,
"y": 240,
"wires": []
},
{
"id": "0284c61f7c24828c",
"type": "file",
"z": "9ef7ece0ab2ec02f",
"name": "",
"filename": "/homeassistant/nodered/file.txt",
"filenameType": "str",
"appendNewline": true,
"createDir": false,
"overwriteFile": "false",
"encoding": "none",
"x": 630,
"y": 660,
"wires": [
[]
]
},
{
"id": "e1123dd9f65d4b61",
"type": "function",
"z": "9ef7ece0ab2ec02f",
"d": true,
"name": "function 1",
"func": "\n\n//msg.payload = { \"data\": { \"title\": \"off: \" + msg.payload } }\n\n\nvar date=new Date();\nvar hour =date.getHours();\nhour=hour+2;\ndate.setHours(hour);\n\n\nmsg.payload = { \"data\": { \"title\": \"off: \" + date.toUTCString() } };\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 400,
"y": 660,
"wires": [
[
"0284c61f7c24828c"
]
]
},
{
"id": "bb7f5b7022d7a388",
"type": "api-current-state",
"z": "9ef7ece0ab2ec02f",
"name": "",
"server": "c10ba6d.0704058",
"version": 3,
"outputs": 2,
"halt_if": "unavailable",
"halt_if_type": "str",
"halt_if_compare": "is_not",
"entity_id": "climate.9424b8b1111",
"state_type": "str",
"blockInputOverrides": false,
"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": 730,
"y": 520,
"wires": [
[
"949c0a24cb1f8de0",
"ac4b8304d68580eb"
],
[]
]
},
{
"id": "cb3763a634414d13",
"type": "comment",
"z": "9ef7ece0ab2ec02f",
"name": "plus jeste podminka state<>unavailable",
"info": "",
"x": 730,
"y": 480,
"wires": []
},
{
"id": "19adf8f4d5d517fd",
"type": "comment",
"z": "9ef7ece0ab2ec02f",
"name": " [‘auto’, ‘cool’, ‘dry’, ‘fan_only’, ‘heat’, ‘heat_cool’, ‘off’] ",
"info": "",
"x": 1410,
"y": 360,
"wires": []
},
{
"id": "3184cbeccfb30170",
"type": "comment",
"z": "9ef7ece0ab2ec02f",
"name": "Auto, Low, Medium-Low, Medium, Medium-High, High, Turbo",
"info": "",
"x": 1420,
"y": 500,
"wires": []
},
{
"id": "0805de54c03933c9",
"type": "comment",
"z": "9ef7ece0ab2ec02f",
"name": "{\"temperature\":\" 24\"}",
"info": "",
"x": 1310,
"y": 440,
"wires": []
},
{
"id": "949c0a24cb1f8de0",
"type": "debug",
"z": "9ef7ece0ab2ec02f",
"name": "debug 15",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "payload",
"targetType": "msg",
"statusVal": "payload",
"statusType": "auto",
"x": 700,
"y": 620,
"wires": []
},
{
"id": "79761c60576e62df",
"type": "api-current-state",
"z": "9ef7ece0ab2ec02f",
"name": "",
"server": "c10ba6d.0704058",
"version": 3,
"outputs": 2,
"halt_if": "14",
"halt_if_type": "num",
"halt_if_compare": "lt",
"entity_id": "sensor.energy_production_tomorrow",
"state_type": "str",
"blockInputOverrides": false,
"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": 190,
"y": 300,
"wires": [
[
"d8262de394f45965"
],
[
"c82a2001ead09312"
]
]
},
{
"id": "a294e3337feccd65",
"type": "function",
"z": "9ef7ece0ab2ec02f",
"name": "enable/disable",
"func": "// 0 for prediction off\nmsg.payload=1;\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 120,
"y": 200,
"wires": [
[
"6cccfa943b5d9356"
]
]
},
{
"id": "6cccfa943b5d9356",
"type": "switch",
"z": "9ef7ece0ab2ec02f",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "0",
"vt": "str"
},
{
"t": "neq",
"v": "0",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 110,
"y": 240,
"wires": [
[
"d8262de394f45965"
],
[
"79761c60576e62df"
]
]
},
{
"id": "c82a2001ead09312",
"type": "api-current-state",
"z": "9ef7ece0ab2ec02f",
"name": "battery SOC >65",
"server": "c10ba6d.0704058",
"version": 3,
"outputs": 2,
"halt_if": "65",
"halt_if_type": "num",
"halt_if_compare": "gt",
"entity_id": "sensor.battery_state_of_charge",
"state_type": "str",
"blockInputOverrides": false,
"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": 350,
"y": 460,
"wires": [
[],
[
"f794314f9c88d40d"
]
]
},
{
"id": "ed7e63a3725303c3",
"type": "comment",
"z": "9ef7ece0ab2ec02f",
"name": "enable/disable prediction 0 to disable",
"info": "",
"x": 180,
"y": 160,
"wires": []
},
{
"id": "25b5af4bc6851931",
"type": "comment",
"z": "9ef7ece0ab2ec02f",
"name": "forecast > 14 then podminka na SOC=60",
"info": "",
"x": 180,
"y": 360,
"wires": []
},
{
"id": "ab7fd9384aa5b1f6",
"type": "api-current-state",
"z": "9ef7ece0ab2ec02f",
"name": "",
"server": "c10ba6d.0704058",
"version": 3,
"outputs": 1,
"halt_if": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "sensor.esphome_esp32_01_outside_temperature",
"state_type": "str",
"blockInputOverrides": false,
"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": 410,
"y": 720,
"wires": [
[]
]
},
{
"id": "17034f88a89a8d28",
"type": "api-current-state",
"z": "9ef7ece0ab2ec02f",
"name": "Nodered_enable",
"server": "c10ba6d.0704058",
"version": 3,
"outputs": 2,
"halt_if": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "input_boolean.nodered_ac_enable",
"state_type": "str",
"blockInputOverrides": false,
"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": 1230,
"y": 220,
"wires": [
[
"2046e80e05cac6f0"
],
[]
]
},
{
"id": "ac4b8304d68580eb",
"type": "api-current-state",
"z": "9ef7ece0ab2ec02f",
"name": "Nodered_enable",
"server": "c10ba6d.0704058",
"version": 3,
"outputs": 2,
"halt_if": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "input_boolean.nodered_ac_enable",
"state_type": "str",
"blockInputOverrides": false,
"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": 1030,
"y": 660,
"wires": [
[
"178828aa65c6bc96"
],
[]
]
},
{
"id": "6646757ec0bc1de5",
"type": "comment",
"z": "9ef7ece0ab2ec02f",
"name": "chybi jeste osetreni stavu, kdyz forecast ukaze chybu",
"info": "",
"x": 250,
"y": 520,
"wires": []
},
{
"id": "c10ba6d.0704058",
"type": "server",
"name": "Home Assistant",
"addon": true
}
]