[ {
"id": "4ebcbdcf.aa1cf4",
"type": "tab",
"label": "Holzverbrauch",
"disabled": false,
"info": ""
},
{
"id": "2ec7c24a.63074e",
"type": "inject",
"z": "4ebcbdcf.aa1cf4",
"name": "",
"topic": "",
"payload": "",
"payloadType": "date",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 168,
"y": 165,
"wires": [
[
"8b1070a0.39ed8"
]
]
},
{
"id": "8b1070a0.39ed8",
"type": "ioBroker get",
"z": "4ebcbdcf.aa1cf4",
"name": "Holz_Menge_",
"topic": "Hilfsvariablen.0.Holz_Menge",
"attrname": "Menge",
"payloadType": "value",
"x": 384,
"y": 161,
"wires": [
[
"733c2f56.baa76"
]
]
},
{
"id": "733c2f56.baa76",
"type": "ioBroker get",
"z": "4ebcbdcf.aa1cf4",
"name": "Holz_Tagesverbrauch_",
"topic": "Hilfsvariablen.0.Holz_Tagesverbrauch",
"attrname": "verbrauch",
"payloadType": "value",
"x": 601,
"y": 163,
"wires": [
[
"99094c23.75388"
]
]
},
{
"id": "3b4336ee.f8fc2a",
"type": "debug",
"z": "4ebcbdcf.aa1cf4",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"x": 1110,
"y": 440,
"wires": []
},
{
"id": "99094c23.75388",
"type": "function",
"z": "4ebcbdcf.aa1cf4",
"name": "math",
"func": "var math = Number(msg.Menge) - Number(msg.verbrauch);\nmsg.payload = math;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 816,
"y": 163,
"wires": [
[
"b821d042.611b9"
]
]
},
{
"id": "b821d042.611b9",
"type": "function",
"z": "4ebcbdcf.aa1cf4",
"name": "runden auf 2 komma stellen",
"func": "msg.payload = Math.round(msg.payload * 100) / 100;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 822,
"y": 224,
"wires": [
[
"ed536e9a.32a42"
]
]
},
{
"id": "ed536e9a.32a42",
"type": "ioBroker out",
"z": "4ebcbdcf.aa1cf4",
"name": "Holz_Menge_",
"topic": "Hilfsvariablen.0.Holz_Menge",
"ack": "false",
"autoCreate": "false",
"x": 889,
"y": 310,
"wires": []
},
{
"id": "b5efbb1.0e73548",
"type": "cron",
"z": "4ebcbdcf.aa1cf4",
"name": "30 22 * * *",
"crontab": "30 22 * * *",
"x": 76,
"y": 228,
"wires": [
[
"4cecd62.33bb228"
]
]
},
{
"id": "4cecd62.33bb228",
"type": "ioBroker get",
"z": "4ebcbdcf.aa1cf4",
"name": "Sommer_Winter",
"topic": "Hilfsvariablen.0.Sommer_Winter",
"attrname": "payload",
"payloadType": "value",
"x": 235,
"y": 226,
"wires": [
[
"9d8547d.e0ee1b8"
]
]
},
{
"id": "9d8547d.e0ee1b8",
"type": "switch",
"z": "4ebcbdcf.aa1cf4",
"name": "Sommer_Winter",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "true",
"vt": "str"
},
{
"t": "eq",
"v": "false",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 438,
"y": 241,
"wires": [
[
"8b1070a0.39ed8"
],
[]
]
},
{
"id": "71152b0c.74adc4",
"type": "function",
"z": "4ebcbdcf.aa1cf4",
"name": "math",
"func": "var math = Number(msg.Menge) / Number(msg.verbrauch);\nmsg.payload = math;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 866,
"y": 478,
"wires": [
[
"a2fa00dd.3f8f6"
]
]
},
{
"id": "a2fa00dd.3f8f6",
"type": "function",
"z": "4ebcbdcf.aa1cf4",
"name": "runden auf 0 komma stellen",
"func": "msg.payload = Math.round(msg.payload * 1) / 1;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 580,
"y": 530,
"wires": [
[
"4717eb1a.0f00f4"
]
]
},
{
"id": "130fc60d.8ddb7a",
"type": "ioBroker get",
"z": "4ebcbdcf.aa1cf4",
"name": "Holz_Menge_",
"topic": "Hilfsvariablen.0.Holz_Menge",
"attrname": "Menge",
"payloadType": "value",
"x": 612,
"y": 400,
"wires": [
[
"7de652d2.a6cadc"
]
]
},
{
"id": "7de652d2.a6cadc",
"type": "ioBroker get",
"z": "4ebcbdcf.aa1cf4",
"name": "Holz_Tagesverbrauch_",
"topic": "Hilfsvariablen.0.Holz_Tagesverbrauch",
"attrname": "verbrauch",
"payloadType": "value",
"x": 820,
"y": 417,
"wires": [
[
"71152b0c.74adc4"
]
]
},
{
"id": "b294585d.ec8108",
"type": "cron",
"z": "4ebcbdcf.aa1cf4",
"name": "00 22 * * 6",
"crontab": "00 22 * * 6",
"x": 67,
"y": 430,
"wires": [
[
"56398eff.ba818"
]
]
},
{
"id": "56398eff.ba818",
"type": "ioBroker get",
"z": "4ebcbdcf.aa1cf4",
"name": "Sommer_Winter",
"topic": "Hilfsvariablen.0.Sommer_Winter",
"attrname": "payload",
"payloadType": "value",
"x": 232,
"y": 401,
"wires": [
[
"171af65f.18810a"
]
]
},
{
"id": "171af65f.18810a",
"type": "switch",
"z": "4ebcbdcf.aa1cf4",
"name": "Sommer_Winter",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "true",
"vt": "str"
},
{
"t": "eq",
"v": "false",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 435,
"y": 416,
"wires": [
[
"130fc60d.8ddb7a"
],
[]
]
},
{
"id": "bda2f4e1.f94468",
"type": "ioBroker out",
"z": "4ebcbdcf.aa1cf4",
"name": "speak",
"topic": "alexa2.0.Echo-Devices.90F00818732500U1.Commands.speak",
"ack": "false",
"autoCreate": "false",
"x": 985,
"y": 590,
"wires": []
},
{
"id": "8f415bb7.15e688",
"type": "inject",
"z": "4ebcbdcf.aa1cf4",
"name": "",
"topic": "",
"payload": "",
"payloadType": "date",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 82,
"y": 365,
"wires": [
[
"56398eff.ba818"
]
]
},
{
"id": "4717eb1a.0f00f4",
"type": "function",
"z": "4ebcbdcf.aa1cf4",
"name": "text bauen",
"func": "msg.payload = 'Der Holzvorrat reicht noch ' + msg.payload + ' Tage';\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 683,
"y": 588,
"wires": [
[
"bda2f4e1.f94468",
"3b4336ee.f8fc2a"
]
]
},
{
"id": "13835a4f.c8e8a6",
"type": "inject",
"z": "4ebcbdcf.aa1cf4",
"name": "",
"topic": "",
"payload": "",
"payloadType": "date",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 190,
"y": 679,
"wires": [
[
"65ff30e0.03e91"
]
]
},
{
"id": "65ff30e0.03e91",
"type": "ioBroker get",
"z": "4ebcbdcf.aa1cf4",
"name": "Holz_Menge_",
"topic": "Hilfsvariablen.0.Holz_Menge",
"attrname": "Menge",
"payloadType": "value",
"x": 406,
"y": 675,
"wires": [
[
"a017de85.cca92"
]
]
},
{
"id": "a017de85.cca92",
"type": "ioBroker get",
"z": "4ebcbdcf.aa1cf4",
"name": "Holz_Tagesverbrauch_",
"topic": "Hilfsvariablen.0.Holz_Tagesverbrauch",
"attrname": "verbrauch",
"payloadType": "value",
"x": 623,
"y": 677,
"wires": [
[
"3d56e6b.f35531a"
]
]
},
{
"id": "3d56e6b.f35531a",
"type": "function",
"z": "4ebcbdcf.aa1cf4",
"name": "math",
"func": "var math = Number(msg.Menge) / Number(msg.verbrauch);\nmsg.payload = math;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 838,
"y": 677,
"wires": [
[
"cb1aed35.a6ffd"
]
]
},
{
"id": "cb1aed35.a6ffd",
"type": "function",
"z": "4ebcbdcf.aa1cf4",
"name": "runden auf 0 komma stellen",
"func": "msg.payload = Math.round(msg.payload * 1) / 1;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 844,
"y": 738,
"wires": [
[
"100f669a.f26069",
"da6732b.a6c60d"
]
]
},
{
"id": "100f669a.f26069",
"type": "ioBroker out",
"z": "4ebcbdcf.aa1cf4",
"name": "Holz_Tage_",
"topic": "Hilfsvariablen.0.Holz_Tage",
"ack": "false",
"autoCreate": "false",
"x": 901,
"y": 824,
"wires": []
},
{
"id": "a36ae73d.9c09a8",
"type": "cron",
"z": "4ebcbdcf.aa1cf4",
"name": "20 22 * * *",
"crontab": "20 22 * * *",
"x": 98,
"y": 742,
"wires": [
[
"f0e1a0a1.90993"
]
]
},
{
"id": "f0e1a0a1.90993",
"type": "ioBroker get",
"z": "4ebcbdcf.aa1cf4",
"name": "Sommer_Winter",
"topic": "Hilfsvariablen.0.Sommer_Winter",
"attrname": "payload",
"payloadType": "value",
"x": 257,
"y": 740,
"wires": [
[
"2e3a263b.32703a"
]
]
},
{
"id": "2e3a263b.32703a",
"type": "switch",
"z": "4ebcbdcf.aa1cf4",
"name": "Sommer_Winter",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "true",
"vt": "str"
},
{
"t": "eq",
"v": "false",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 460,
"y": 755,
"wires": [
[
"65ff30e0.03e91"
],
[]
]
},
{
"id": "da6732b.a6c60d",
"type": "debug",
"z": "4ebcbdcf.aa1cf4",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"x": 1087,
"y": 677,
"wires": []
}
]