Alles innerhalb von NodeRed auf dem Cerbo
War auch mein erster Weg aber die Pflege der unterschiedlichen “Stationen” war mir zu aufwendig und bei der Companion hat es mir immer wieder mit der Zeit einige Entitäten zerlegt, keine Ahnung warum
Hier ein Beispiel mit Max charge power (W) vom Multiplus2 und einer number.entity.
Kannst ja mal in NodeRed auf dem Cerbo importieren und dir ansehen. Die eigentliche config für HA-Mqtt-discovery habe ich dir in die Funktion-Node gepackt, damit es übersichtlicher ist. Topic und Payload können natürlich auch anders erzeugt werden. Brauchst eigentlich nur die Mqtt-Nodes (IP+PW) anpassen und einmalig Auslösen, dann sollte das Gerät und die Entity unter der Integration HA-Mqtt erscheinen
[
{
"id": "f90a644ea13a976c",
"type": "victron-output-ess",
"z": "25715679fb8a5255",
"service": "com.victronenergy.settings",
"path": "/Settings/CGwacs/MaxChargePower",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "Venus settings"
},
"pathObj": {
"path": "/Settings/CGwacs/MaxChargePower",
"type": "integer",
"name": "Max charge power (W)",
"writable": true,
"remarks": "<p>Not used with DVCC.</p>"
},
"initial": "",
"name": "",
"onlyChanges": false,
"x": 750,
"y": 2900,
"wires": []
},
{
"id": "af36c19d80b27e1a",
"type": "victron-input-ess",
"z": "25715679fb8a5255",
"service": "com.victronenergy.settings",
"path": "/Settings/CGwacs/MaxChargePower",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "Venus settings"
},
"pathObj": {
"path": "/Settings/CGwacs/MaxChargePower",
"type": "integer",
"name": "Max charge power (W)",
"remarks": "<p>Not used with DVCC.</p>"
},
"name": "",
"onlyChanges": false,
"x": 190,
"y": 2680,
"wires": [
[
"f2fe14c85ad068b5"
]
]
},
{
"id": "aa35b315c770806a",
"type": "function",
"z": "25715679fb8a5255",
"name": "[config] number.max_laden_power",
"func": "msg.topic = \"homeassistant/number/Energiespeichersystem/max_laden_power/config\"\n\nmsg.payload = {\n \"name\": \"max laden power\",\n \"unique_id\": \"Energiespeichersystem.max_laden_power\",\n \"state_topic\": \"homeassistant/number/Energiespeichersystem/max_laden_power/state\",\n \"command_topic\": \"cerbo_gx/number/Energiespeichersystem/max_laden_power/state\",\n \"icon\": \"mdi:flash-outline\",\n \"unit_of_measurement\": \"W\",\n \"entity_category\": \"config\",\n \"mode\": \"box\",\n \"min\": \"0\",\n \"max\": \"2000\",\n \"step\": \"50\",\n \"device\": {\n \"identifiers\": \"Energiespeichersystem\",\n \"name\": \"Energiespeichersystem\",\n \"manufacturer\": \"Victron Energy\",\n \"model\": \"CerboGX\",\n \"sw_version\": \"VenusOS\",\n \"configuration_url\": \"http://192.168.1.60\"\n }\n}\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 400,
"y": 2500,
"wires": [
[
"e744ff1f0f011b11"
]
]
},
{
"id": "f2fe14c85ad068b5",
"type": "mqtt out",
"z": "25715679fb8a5255",
"name": "",
"topic": "homeassistant/number/Energiespeichersystem/max_laden_power/state",
"qos": "",
"retain": "true",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "c39ac142fe95c0ee",
"x": 860,
"y": 2680,
"wires": []
},
{
"id": "653f8c069d01668c",
"type": "inject",
"z": "25715679fb8a5255",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 120,
"y": 2500,
"wires": [
[
"aa35b315c770806a"
]
]
},
{
"id": "e744ff1f0f011b11",
"type": "mqtt out",
"z": "25715679fb8a5255",
"name": "",
"topic": "",
"qos": "",
"retain": "",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "c39ac142fe95c0ee",
"x": 690,
"y": 2500,
"wires": []
},
{
"id": "f9a543f82493b0f8",
"type": "mqtt in",
"z": "25715679fb8a5255",
"name": "",
"topic": "cerbo_gx/number/Energiespeichersystem/max_laden_power/state",
"qos": "2",
"datatype": "auto-detect",
"broker": "c39ac142fe95c0ee",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 280,
"y": 2900,
"wires": [
[
"f90a644ea13a976c"
]
]
},
{
"id": "a2906c3997576986",
"type": "comment",
"z": "25715679fb8a5255",
"name": "1. Gerät & Entitäten in HA erstellen",
"info": "",
"x": 180,
"y": 2340,
"wires": []
},
{
"id": "cfa61d7c30cf4546",
"type": "comment",
"z": "25715679fb8a5255",
"name": "# nur einmaliges Auslösen notwendig, ausser es muss in HA wiederhergestellt werden.",
"info": "",
"x": 340,
"y": 2380,
"wires": []
},
{
"id": "2f6947622f5b70b0",
"type": "comment",
"z": "25715679fb8a5255",
"name": "2. Werte von Cerbo zu HA senden",
"info": "",
"x": 180,
"y": 2600,
"wires": []
},
{
"id": "4104678ca709690c",
"type": "comment",
"z": "25715679fb8a5255",
"name": "# Mqtt-Server.-, Topic´s.-, Entitäten.- und Geräteeigenschaften anpassen",
"info": "",
"x": 300,
"y": 2420,
"wires": []
},
{
"id": "3908f5a55b735d17",
"type": "comment",
"z": "25715679fb8a5255",
"name": "3. Werte von HA zu Cerbo senden",
"info": "",
"x": 180,
"y": 2820,
"wires": []
},
{
"id": "86c5c1056671e1b9",
"type": "comment",
"z": "25715679fb8a5255",
"name": "# Mqtt-Topic´s wie in 1. \"state_topic\" configuriert",
"info": "",
"x": 220,
"y": 2640,
"wires": []
},
{
"id": "4a80cca563674dcc",
"type": "comment",
"z": "25715679fb8a5255",
"name": "# Mqtt-Topic´s wie in 1. \"command_topic\" configuriert",
"info": "",
"x": 240,
"y": 2860,
"wires": []
},
{
"id": "c39ac142fe95c0ee",
"type": "mqtt-broker",
"name": "",
"broker": "192.168.1.20",
"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": ""
}
]