Ich lasse ihm alle 2 Sekunden die Werte senden. Ein Wert von der Huawei habe ich *-1 gerechnet.
Code: Alles auswählen
[
{
"id": "b54d4ffd1e13f824",
"type": "mqtt out",
"z": "05ef9b6ff2d2232d",
"name": "",
"topic": "openWB/set/pv/8/get/power",
"qos": "",
"retain": "",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "eca40c603102ca88",
"x": 920,
"y": 140,
"wires": []
},
{
"id": "bce8f1d54263df19",
"type": "api-current-state",
"z": "05ef9b6ff2d2232d",
"name": "Inverter Eingangsleistung",
"server": "ad5ff102.51ed",
"version": 3,
"outputs": 1,
"halt_if": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "sensor.inverter_eingangsleistung",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
}
],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 450,
"y": 140,
"wires": [
[
"ebd08ea3.75c5f"
]
]
},
{
"id": "bf88582d62e42d3a",
"type": "inject",
"z": "05ef9b6ff2d2232d",
"name": "",
"props": [],
"repeat": "2",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"x": 110,
"y": 220,
"wires": [
[
"60c9a819108d7648",
"bce8f1d54263df19",
"e5ee2bb810b6e5b9",
"e844d098effc0b56",
"535076dc94ee8dda",
"44a4f5ef0c5b567c"
]
]
},
{
"id": "60c9a819108d7648",
"type": "api-current-state",
"z": "05ef9b6ff2d2232d",
"name": "Inverter Gesamtenergieertrag",
"server": "ad5ff102.51ed",
"version": 3,
"outputs": 1,
"halt_if": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "sensor.inverter_gesamtenergieertrag",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"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": 200,
"wires": [
[
"5fcffcb276a207e1"
]
]
},
{
"id": "5fcffcb276a207e1",
"type": "mqtt out",
"z": "05ef9b6ff2d2232d",
"name": "",
"topic": "openWB/set/pv/8/get/exported",
"qos": "",
"retain": "",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "eca40c603102ca88",
"x": 930,
"y": 200,
"wires": []
},
{
"id": "ebd08ea3.75c5f",
"type": "function",
"z": "05ef9b6ff2d2232d",
"name": "Berechnung",
"func": "msg.payload = msg.payload * -1;\nreturn msg;\n",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 670,
"y": 140,
"wires": [
[
"b54d4ffd1e13f824"
]
]
},
{
"id": "13caf63d52a250b8",
"type": "mqtt out",
"z": "05ef9b6ff2d2232d",
"name": "",
"topic": "openWB/set/bat/9/get/soc",
"qos": "",
"retain": "",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "eca40c603102ca88",
"x": 920,
"y": 500,
"wires": []
},
{
"id": "e5ee2bb810b6e5b9",
"type": "api-current-state",
"z": "05ef9b6ff2d2232d",
"name": "Hausakku SOC",
"server": "ad5ff102.51ed",
"version": 3,
"outputs": 1,
"halt_if": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "sensor.battery_batterieladung",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
}
],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 420,
"y": 500,
"wires": [
[
"13caf63d52a250b8"
]
]
},
{
"id": "c224ee54b4dc3f3b",
"type": "mqtt out",
"z": "05ef9b6ff2d2232d",
"name": "",
"topic": "openWB/set/bat/9/get/power",
"qos": "",
"retain": "",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "eca40c603102ca88",
"x": 930,
"y": 320,
"wires": []
},
{
"id": "e844d098effc0b56",
"type": "api-current-state",
"z": "05ef9b6ff2d2232d",
"name": "Hausakku Lade-/Entladeleistung",
"server": "ad5ff102.51ed",
"version": 3,
"outputs": 1,
"halt_if": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "sensor.battery_lade_entladeleistung",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
}
],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 470,
"y": 320,
"wires": [
[
"c224ee54b4dc3f3b"
]
]
},
{
"id": "535076dc94ee8dda",
"type": "api-current-state",
"z": "05ef9b6ff2d2232d",
"name": "Hausakku Gesamtladung",
"server": "ad5ff102.51ed",
"version": 3,
"outputs": 1,
"halt_if": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "sensor.battery_gesamtladung",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
}
],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 450,
"y": 380,
"wires": [
[
"7266e2cf59ac1beb"
]
]
},
{
"id": "7266e2cf59ac1beb",
"type": "mqtt out",
"z": "05ef9b6ff2d2232d",
"name": "",
"topic": "openWB/set/bat/9/get/imported",
"qos": "",
"retain": "",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "eca40c603102ca88",
"x": 930,
"y": 380,
"wires": []
},
{
"id": "44a4f5ef0c5b567c",
"type": "api-current-state",
"z": "05ef9b6ff2d2232d",
"name": "Hausakku Gesamtentladung",
"server": "ad5ff102.51ed",
"version": 3,
"outputs": 1,
"halt_if": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "sensor.battery_gesamtentladung",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"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": 440,
"wires": [
[
"f81c8706e2e7530a"
]
]
},
{
"id": "f81c8706e2e7530a",
"type": "mqtt out",
"z": "05ef9b6ff2d2232d",
"name": "",
"topic": "openWB/set/bat/9/get/exported",
"qos": "",
"retain": "",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "eca40c603102ca88",
"x": 930,
"y": 440,
"wires": []
},
{
"id": "eca40c603102ca88",
"type": "mqtt-broker",
"name": "OpenWB2",
"broker": "192.168.178.3",
"port": "1883",
"clientid": "",
"autoConnect": true,
"usetls": false,
"protocolVersion": "4",
"keepalive": "60",
"cleansession": true,
"autoUnsubscribe": true,
"birthTopic": "",
"birthQos": "0",
"birthRetain": "false",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closeQos": "0",
"closeRetain": "false",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willRetain": "false",
"willPayload": "",
"willMsg": {},
"userProps": "",
"sessionExpiry": ""
},
{
"id": "ad5ff102.51ed",
"type": "server",
"name": "Home Assistant",
"addon": true,
"rejectUnauthorizedCerts": true,
"ha_boolean": "",
"connectionDelay": false,
"cacheJson": false,
"heartbeat": false,
"heartbeatInterval": "",
"statusSeparator": "",
"enableGlobalContextStore": false
}
]
Ein Problem habe ich jetzt noch. Warum auch immer berechnet mir nun die OpenWB den Hausverbrauch nicht. Ich glaube das gehört eigentlich in ein anderes Thema. Wo kann der Fehler liegen?