@mickym
Habe den ersten Schuss so gelöst:
a15dc5a7-f04d-4ce9-9b19-c1da9c1639c5-image.png
Spoiler
[
{
"id": "00519bd9e9975550",
"type": "inject",
"z": "79c2861ec6e321b9",
"name": "alle 5min",
"props": [
{
"p": "payload"
}
],
"repeat": "300",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "",
"payload": "true",
"payloadType": "bool",
"x": 150,
"y": 820,
"wires": [
[
"5bd17fe8b83ef863",
"dea708d0212a15d6"
]
]
},
{
"id": "5bd17fe8b83ef863",
"type": "ioBroker get",
"z": "79c2861ec6e321b9",
"name": "1-0:1_8_0__255.value",
"topic": "smartmeter.0.1-0:1_8_0__255.value",
"attrname": "payload",
"payloadType": "value",
"x": 380,
"y": 820,
"wires": [
[
"613ebe1d09cf6cbd",
"8a05b813586187ab"
]
]
},
{
"id": "613ebe1d09cf6cbd",
"type": "ioBroker out",
"z": "79c2861ec6e321b9",
"name": "aktVerbrauch",
"topic": "0_userdata.0.Energiemanagement.aktVerbrauch",
"ack": "true",
"autoCreate": "false",
"stateName": "",
"role": "",
"payloadType": "",
"readonly": "",
"stateUnit": "",
"stateMin": "",
"stateMax": "",
"x": 590,
"y": 880,
"wires": []
},
{
"id": "8a05b813586187ab",
"type": "delay",
"z": "79c2861ec6e321b9",
"name": "",
"pauseType": "delay",
"timeout": "10",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 650,
"y": 820,
"wires": [
[
"c690c5bcb4bb6f3e"
]
]
},
{
"id": "c690c5bcb4bb6f3e",
"type": "ioBroker out",
"z": "79c2861ec6e321b9",
"name": "gespVerbrauch",
"topic": "0_userdata.0.Energiemanagement.gespVerbrauch",
"ack": "true",
"autoCreate": "false",
"stateName": "",
"role": "",
"payloadType": "",
"readonly": "",
"stateUnit": "",
"stateMin": "",
"stateMax": "",
"x": 860,
"y": 820,
"wires": []
},
{
"id": "d52ee9ff24d86ea7",
"type": "ioBroker get",
"z": "79c2861ec6e321b9",
"name": "gespVerbrauch",
"topic": "0_userdata.0.Energiemanagement.gespVerbrauch",
"attrname": "payload",
"payloadType": "value",
"errOnInvalidState": "nothing",
"x": 360,
"y": 940,
"wires": [
[
"d61a122c6bb43c72"
]
]
},
{
"id": "d61a122c6bb43c72",
"type": "change",
"z": "79c2861ec6e321b9",
"name": "",
"rules": [
{
"t": "move",
"p": "payload",
"pt": "msg",
"to": "gespeichert",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 560,
"y": 940,
"wires": [
[
"28596c3ca84ac5d2"
]
]
},
{
"id": "28596c3ca84ac5d2",
"type": "ioBroker get",
"z": "79c2861ec6e321b9",
"name": "aktVerbrauch",
"topic": "0_userdata.0.Energiemanagement.aktVerbrauch",
"attrname": "aktuell",
"payloadType": "value",
"errOnInvalidState": "nothing",
"x": 770,
"y": 940,
"wires": [
[
"997e11b298c357b9"
]
]
},
{
"id": "997e11b298c357b9",
"type": "change",
"z": "79c2861ec6e321b9",
"name": "berechne",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "(aktuell - gespeichert) * 12000",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 960,
"y": 940,
"wires": [
[
"c9e89e065e8115de"
]
]
},
{
"id": "c9e89e065e8115de",
"type": "ioBroker out",
"z": "79c2861ec6e321b9",
"name": "errechnBezug",
"topic": "0_userdata.0.Energiemanagement.errechnVerbrauch",
"ack": "true",
"autoCreate": "false",
"stateName": "",
"role": "",
"payloadType": "",
"readonly": "",
"stateUnit": "",
"stateMin": "",
"stateMax": "",
"x": 1120,
"y": 940,
"wires": []
},
{
"id": "dea708d0212a15d6",
"type": "delay",
"z": "79c2861ec6e321b9",
"name": "",
"pauseType": "delay",
"timeout": "5",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 180,
"y": 940,
"wires": [
[
"d52ee9ff24d86ea7"
]
]
}
]
es sieht erstmal ganz gut aus