Read and Control the Daheimladen Wallbox in HomeAssistant with NodeRed via Modbus (without EVCC)

I just want to share how I integrated my Daheimladen Wallbox in my HomeAssistant so I can read all values and also control it (Start/Pause/Stop charging; Change Ampere) to use my power excess from my solar panels for charging. I wanted to have more values and more control so I decided to not use EVCC and use ModBus instead.

1: Wallbox connection

The manufactor has an instruction how to use the modbus interface. You can use ethernet or wifi. The newer versions have already enabled modbus via wifi, but if wifi is not working you can contact the manufactor for enabeling it.
But I would highly recommend the ethernet connection because it is much more stable and also the node red modbus requests seem to work smoother with ethernet.

2: Wallbox Charging Mode

You can change the Wallbox charging mode to “Plug and Charge Modus”, “RFID/OCPP/ModBus” or “Disabling charging”.
Change the mode directly via the wallbox interface to the “RFID” mode.

[OUTDATED]
Attention: It can happen, that when you use the modbus register to start and then to stop the charging you are not able to start the charging then again after stopping. The instruction (also I read somewhere where someone also has that problem) tells you, if that problem occurs you need to change the charging mode after stop charging back to mode 1 (Plug and Charge) and then again to mode 2 (RFID) and now you are able to start charging again. In my case I did not need to do this and I can stop and start without switching mode.

EDIT
After a while I noticed that the Wallbox wasn’t able to start charging again after stopping. To solve this you don’t need to change the mode. After an Update for the Wallbox you are now able to change the Ampere Setting to 0 Ampere to pause the charging - instead of stopping it completely. So in your flow just set the Ampere to 0. Before that I didn’t want the Wallbox to start/stop/start/stop the whole time and made a delay with 5 min or so. But now I can make instant changes for the Ampere Setting.

3: Wallbox Modbus Read in NodeRed

First install the “node-red-contrib-modbus” for making ModBus requests. For having Wallbox sensors in HA you also need the “node-red-contrib-home-assistant-websocket”. You also need the “node-red-contrib-calc” for calculating the correct Ampere.

Next take the “ModBus Read” node and edit it for adding the wallbox server.

  • For Reading you need the Function Code (FC) 3: Read Holding Registers.
  • The adress is 0000 and because there are 115 registers available you write 115 for the numbers.
  • Poll-Rate is for how often the values should be updated. I use 10 seconds and never had any problems with the too many requests error.

Next you need to add the Wallbox server.

  • Give it a name
  • TCP for Type
  • For the wallbox IP you should give it a static ip and enter that ip to the Host field.
  • Port: 502
  • Connection Type Default
  • Unit-Id: 255
  • Everything else is default settings and I didn’t need to change anything more.

Now you will get an array of all the 0-115 registers. You can read in the instruction which register number corresponds to which value exactly.
image

Example: The register number 0000 is the Status of the Wallbox.

Now it is on Default State so the number is 1.

To extract the values of each register number and change the value number to a text you need to use the change node (for extracting) and a function node (for giving names) and then also a HomeAssistant Sensor node (for having the wallbox sensor in HomeAssistant).



For some register numbers you need the calculator node to show the correct numbers. For example register number 0091, the ampere limit. The Ampere Limit is for example 6 Ampere, but the register shows a value of 60. To show the correct value you need to divide the 60 with 10 to get the 6 Ampere.

For the charging time the values are seconds so if you want to have it in minutes, divide with 60. Also for starting/ending time you need a join node for having the hh,mm,ss values combined.

Important: a few register numbers are wrong. For example the L1/L2/L3 charging power. In the instruction L1 should be 0016, but in my case it was 0017. Same for L2 (20>21) and L3 (24>25).

If you copy and insert the node red flow from the next comment you will have everything you need for reading the Wallbox Registers, just change the ModBus Server Settings for your own Wallbox Server.

4: Wallbox Modbus Write in NodeRed

For writing there are 4 important registers to write. The two important ones are 0095 for start/stop charging and 0091 for changing the Ampere.

0095:
First you need to create a helper boolean in HomeAssistant to turn a switch on for start charging and to turn a switch off for stopping charging.
The 0095 register number can have a value of 1 (Start charging) or 2 (Stop charging). So when the boolean helper is on, the payload should be 1 and when it is off, the payload should be 2.

Next the Modbus Write node.

  • For writing we use the FC 16: Preset Multiple Registers.
  • Adress is the 0095 register number
  • and we want to change one single value, so number 1.
  • The server is your wallbox server, which you already created in the modbus read node.

Now you should be able to control the Charging.

0091: Next controlling the Ampere.

First create a helper: input number with 6-16. (in my case).

Then a function node. Remember the register number 0091 has values 60-160, but we want real numbers so with the change node we change the input number helper values to the correct modbus values (for 6 Ampere: 6 > 60)

And for the Modbus Write node just change the adress to 0091.

Now you can control the Ampere Limitation.

EDIT
Set the Ampere to 0 and it will pause the charging without stopping the charging.

Again just copy and insert the node red flow from the next comment and you will have everything you need for writing the Wallbox Registers, just change the ModBus Server Settings for your own Wallbox Server and also other Ampere Settings if you want.

Then just make a good looking HA Card and start controlling your Wallbox.

Flow for Reading:

[{"id":"a2b812dec7acf27c","type":"group","z":"0f79f55dafbabb51","name":"Read","style":{"stroke":"#ffcf3f","fill":"#ffcf3f","fill-opacity":"0.1","label":true},"nodes":["aea456305f45d45d","376b30a3e9525eb3","a650597dbc902a19","5ce9c43862635b38","0367a2f1c9d8dba8","cccbf45c5922971a","d19df6ec676e3731","f337ca0baa37efc3","6c6a50e440ad78df","868be57fe9cbe6a1","5cc54a4bfb9a349b","dd166f9036ba19e6","e62aba201d28c5db","ff39fdbc01b769b1","bf0d6512c799f0ec","ec1b1de63f148ed7","42f75895290e8386","489164d73bfcdb50","d379f5f2bb99314c","6f3a14dadd1214e9","9c21e234109e9c17","a1649a797bb0a087","1f5a6ca0ecec6323","6ce087e12436dc1c","88d1f75fa03490a6","b9bb91a6e3279d88","1c65107feca67b23","7901bf02bb24e772","658ae3e989319215","2941b0dc69da938f","03ef28ae4f971d8e","8a036a841566bb12","ae24947309c9b1cc","41ca3d80a03870f2","aa282bc911d7aa33","d4d23a7047d50f46","f54be0519f216f71","317e91d5ebcc14b0","5f59b9311cec401f","fbef5ae6c83b1191","5b8a0e0c5ff63f5f","b2629c5db910aa22","75e7b73dd6822885","11b1bbd0d3768dcb","b68db9c05aacbd86","46cb45848749cae0","83f4d577c65f83e4","b4f180741602c95f","a65b9039c2b28e4a","4732c65ec0586fb9","72ad4407bb57762f","33061a9615402ee6","0e03a3c11b665570","51c6e2fe0cd9f74c","67462c51569bcba0","a4dc018b273d46ab","ec68e3c2e0bd97e0","de124690c22ef5eb","a950716b63f77e3d","34666805017ef1d1","db3af468f61fc622","2de8a17f0ad28e28","6539c70420afc24a","0f09fbfb255e591e"],"x":554,"y":339,"w":1792,"h":2442},{"id":"aea456305f45d45d","type":"modbus-read","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"","topic":"","showStatusActivities":true,"logIOActivities":false,"showErrors":true,"showWarnings":true,"unitid":"","dataType":"HoldingRegister","adr":"0000","quantity":"115","rate":"10","rateUnit":"s","delayOnStart":false,"startDelayTime":"","server":"","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"x":670,"y":500,"wires":[["d19df6ec676e3731","6c6a50e440ad78df","5ce9c43862635b38","0367a2f1c9d8dba8","cccbf45c5922971a","5cc54a4bfb9a349b","dd166f9036ba19e6","e62aba201d28c5db","ff39fdbc01b769b1","bf0d6512c799f0ec","ec1b1de63f148ed7","42f75895290e8386","489164d73bfcdb50","d379f5f2bb99314c","6f3a14dadd1214e9","9c21e234109e9c17","1f5a6ca0ecec6323","88d1f75fa03490a6","b9bb91a6e3279d88","1c65107feca67b23","7901bf02bb24e772","658ae3e989319215","2941b0dc69da938f","03ef28ae4f971d8e","8a036a841566bb12","ae24947309c9b1cc","376b30a3e9525eb3","a1649a797bb0a087","33061a9615402ee6","0e03a3c11b665570","6ce087e12436dc1c","67462c51569bcba0","a4dc018b273d46ab","0f09fbfb255e591e"],[]]},{"id":"376b30a3e9525eb3","type":"change","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"Register 0 (Status)","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[0]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1150,"y":500,"wires":[["a650597dbc902a19"]]},{"id":"a650597dbc902a19","type":"function","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"Status","func":"if (msg.payload == 1) {\n    msg.payload = \"Standby\";\n} else if (msg.payload == 2) {\n    msg.payload = \"Connected\";\n} else if (msg.payload == 3) {\n    msg.payload = \"Start\";\n} else if (msg.payload == 4) {\n    msg.payload = \"Charging\";\n} else if (msg.payload == 5) {\n    msg.payload = \"Start fail\";\n} else if (msg.payload == 6) {\n    msg.payload = \"Charging end\";\n} else if (msg.payload == 7) {\n    msg.payload = \"Charger system fail\";\n} else if (msg.payload == 8) {\n    msg.payload = \"Appointment\";\n} else if (msg.payload == 9) {\n    msg.payload = \"Firmware Upgrade\";\n} else if (msg.payload == 10) {\n    msg.payload = \"Power on\";\n} else if (msg.payload == 31) {\n    msg.payload = \"Station blocked\";\n} else {\n    msg.payload = \"Unknown state\";\n}\nreturn msg;\n","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1550,"y":500,"wires":[[]]},{"id":"5ce9c43862635b38","type":"change","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"Register 6 (L1 current)","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[6]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1160,"y":740,"wires":[["83f4d577c65f83e4"]]},{"id":"0367a2f1c9d8dba8","type":"change","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"Register 8 (L2 current)","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[8]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1160,"y":820,"wires":[["b4f180741602c95f"]]},{"id":"cccbf45c5922971a","type":"change","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"Register 10 (L3 current)","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[10]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1170,"y":900,"wires":[["a65b9039c2b28e4a"]]},{"id":"d19df6ec676e3731","type":"change","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"Register 2 (Status Stecker)","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[2]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1180,"y":580,"wires":[["f337ca0baa37efc3"]]},{"id":"f337ca0baa37efc3","type":"function","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"Status Stecker","func":"if (msg.payload == 0) {\n    msg.payload = \"No Connection\";\n} else if (msg.payload == 1) {\n    msg.payload = \"Connect\";\n}\nreturn msg;\n","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1580,"y":580,"wires":[[]]},{"id":"6c6a50e440ad78df","type":"change","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"Register 4 (Fehler Code)","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[4]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1170,"y":660,"wires":[["868be57fe9cbe6a1"]]},{"id":"868be57fe9cbe6a1","type":"function","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"Status (Fehler Code)","func":"if (msg.payload == 0) {\n    msg.payload = \"No fault\";\n} else if (msg.payload == 11) {\n    msg.payload = \"CP-Control Value\";\n} else if (msg.payload == 12) {\n    msg.payload = \"EStop (nur DHL Smart)\";\n} else if (msg.payload == 13) {\n    msg.payload = \"Under Voltage\";\n} else if (msg.payload == 14) {\n    msg.payload = \"Over Voltage\";\n} else if (msg.payload == 15) {\n    msg.payload = \"Over temperature\";\n} else if (msg.payload == 16) {\n    msg.payload = \"Meter Value\";\n} else if (msg.payload == 17) {\n    msg.payload = \"Leakage Fault\";\n} else if (msg.payload == 18) {\n    msg.payload = \"Output Short\";\n} else if (msg.payload == 19) {\n    msg.payload = \"Over Current\";\n} else if (msg.payload == 21) {\n    msg.payload = \"Vehicle\";\n} else if (msg.payload == 22) {\n    msg.payload = \"Vehicle Unrecognizable\";\n} else if (msg.payload == 23) {\n    msg.payload = \"Relay Adhesion\";\n} else if (msg.payload == 24) {\n    msg.payload = \"Leakage Check Device\";\n} else if (msg.payload == 25) {\n    msg.payload = \"PE fault\";\n} else if (msg.payload == 26) {\n    msg.payload = \"Start-up Charging fault\";\n} else {\n    msg.payload = \"Unknown fault code\";\n}\nreturn msg;\n","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1600,"y":660,"wires":[[]]},{"id":"5cc54a4bfb9a349b","type":"change","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"Register 13 (Ladeleistung gesamt)","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[13]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1200,"y":980,"wires":[[]]},{"id":"dd166f9036ba19e6","type":"change","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"Register 17 (L1 charging)","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[17]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1170,"y":1060,"wires":[[]]},{"id":"e62aba201d28c5db","type":"change","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"Register 21 (L2 charging)","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[21]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1170,"y":1140,"wires":[[]]},{"id":"ff39fdbc01b769b1","type":"change","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"Register 25 (L3 charging)","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[25]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1170,"y":1220,"wires":[[]]},{"id":"bf0d6512c799f0ec","type":"change","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"Register 29 (Zahlerstand)","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[29]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1170,"y":1300,"wires":[["b68db9c05aacbd86"]]},{"id":"ec1b1de63f148ed7","type":"change","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"Register 32 (Ladestrom max.)","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[32]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1190,"y":1380,"wires":[["5f59b9311cec401f"]]},{"id":"42f75895290e8386","type":"change","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"Register 34 (Ladestrom min.)","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[34]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1180,"y":1460,"wires":[["fbef5ae6c83b1191"]]},{"id":"489164d73bfcdb50","type":"change","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"Register 36 (Ladestrom max. Kabel)","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[36]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1210,"y":1540,"wires":[["5b8a0e0c5ff63f5f"]]},{"id":"d379f5f2bb99314c","type":"change","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"Register 38 (USER ID)","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[38]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1160,"y":1620,"wires":[["d4d23a7047d50f46"]]},{"id":"6f3a14dadd1214e9","type":"change","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"Register 54 (Card ID)","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[54]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1160,"y":1700,"wires":[["f54be0519f216f71"]]},{"id":"9c21e234109e9c17","type":"change","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"Register 72 (Geladene Energie)","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[72]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1190,"y":1780,"wires":[["b2629c5db910aa22"]]},{"id":"a1649a797bb0a087","type":"change","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"Register 74 (Start time hh)","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[74]","tot":"msg"},{"t":"set","p":"topic","pt":"msg","to":"Stunden","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1180,"y":1820,"wires":[["4732c65ec0586fb9"]]},{"id":"1f5a6ca0ecec6323","type":"change","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"Register 79 (Ladevorgang Dauer)","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[79]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1200,"y":1940,"wires":[["11b1bbd0d3768dcb"]]},{"id":"6ce087e12436dc1c","type":"change","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"Register 82 (End time hh)","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[82]","tot":"msg"},{"t":"set","p":"topic","pt":"msg","to":"Stunden","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1170,"y":1980,"wires":[["ec68e3c2e0bd97e0"]]},{"id":"88d1f75fa03490a6","type":"change","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"Register 87 (Ladestrom max. bei Verbindungsverlust)","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[87]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1260,"y":2100,"wires":[["34666805017ef1d1"]]},{"id":"b9bb91a6e3279d88","type":"change","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"Register 89 (Communication Timeout Time)","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[89]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1230,"y":2180,"wires":[[]]},{"id":"1c65107feca67b23","type":"change","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"Register 91 (Ladestrom max. Limitierung)","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[91]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1220,"y":2260,"wires":[["75e7b73dd6822885"]]},{"id":"7901bf02bb24e772","type":"change","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"Register 93 (RFID Leser)","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[93]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1170,"y":2340,"wires":[["41ca3d80a03870f2"]]},{"id":"658ae3e989319215","type":"change","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"Register 95 (Charge cmd)","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[95]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1170,"y":2420,"wires":[["aa282bc911d7aa33"]]},{"id":"2941b0dc69da938f","type":"change","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"Register 97 (Real time)","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[97]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1170,"y":2500,"wires":[["317e91d5ebcc14b0"]]},{"id":"03ef28ae4f971d8e","type":"change","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"Register 109 (L1 real-time Spannung)","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[109]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1210,"y":2580,"wires":[["db3af468f61fc622"]]},{"id":"8a036a841566bb12","type":"change","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"Register 111 (L2 real-time Spannung)","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[111]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1210,"y":2660,"wires":[["2de8a17f0ad28e28"]]},{"id":"ae24947309c9b1cc","type":"change","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"Register 113 (L3 real-time Spannung)","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[113]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1210,"y":2740,"wires":[["6539c70420afc24a"]]},{"id":"41ca3d80a03870f2","type":"function","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"RFID Leser","func":"if (msg.payload == 0) {\n    msg.payload = \"Plug and Charge\";\n} else if (msg.payload == 1) {\n    msg.payload = \"RFID\";\n} else if (msg.payload == 2) {\n    msg.payload = \"Ladestation gesperrt\";\n} else {\n    msg.payload = \"Unknown state\";\n}\nreturn msg;\n","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1570,"y":2340,"wires":[[]]},{"id":"aa282bc911d7aa33","type":"function","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"Charge cmd","func":"if (msg.payload == 1) {\n    msg.payload = \"Start charging\";\n} else if (msg.payload == 2) {\n    msg.payload = \"Stop charging\";\n} else {\n    msg.payload = \"Unknown state\";\n}\nreturn msg;\n","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1570,"y":2420,"wires":[[]]},{"id":"d4d23a7047d50f46","type":"debug","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"debug 84","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1560,"y":1620,"wires":[]},{"id":"f54be0519f216f71","type":"debug","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"debug 85","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1560,"y":1700,"wires":[]},{"id":"317e91d5ebcc14b0","type":"debug","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"debug 95","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1560,"y":2500,"wires":[]},{"id":"5f59b9311cec401f","type":"calculator","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"/10","inputMsgField":"payload","outputMsgField":"payload","operation":"div","constant":"10","round":false,"decimals":0,"x":1550,"y":1380,"wires":[[]]},{"id":"fbef5ae6c83b1191","type":"calculator","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"/10","inputMsgField":"payload","outputMsgField":"payload","operation":"div","constant":"10","round":false,"decimals":0,"x":1550,"y":1460,"wires":[[]]},{"id":"5b8a0e0c5ff63f5f","type":"calculator","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"/10","inputMsgField":"payload","outputMsgField":"payload","operation":"div","constant":"10","round":false,"decimals":0,"x":1550,"y":1540,"wires":[[]]},{"id":"b2629c5db910aa22","type":"calculator","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"/10","inputMsgField":"payload","outputMsgField":"payload","operation":"div","constant":"10","round":true,"decimals":"2","x":1550,"y":1780,"wires":[[]]},{"id":"75e7b73dd6822885","type":"calculator","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"/10","inputMsgField":"payload","outputMsgField":"payload","operation":"div","constant":"10","round":false,"decimals":0,"x":1550,"y":2260,"wires":[[]]},{"id":"11b1bbd0d3768dcb","type":"calculator","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"/60","inputMsgField":"payload","outputMsgField":"payload","operation":"div","constant":"60","round":true,"decimals":0,"x":1550,"y":1940,"wires":[[]]},{"id":"b68db9c05aacbd86","type":"calculator","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"/10","inputMsgField":"payload","outputMsgField":"payload","operation":"div","constant":"10","round":true,"decimals":"2","x":1550,"y":1300,"wires":[[]]},{"id":"46cb45848749cae0","type":"comment","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"READ","info":"","x":630,"y":380,"wires":[]},{"id":"83f4d577c65f83e4","type":"calculator","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"/10","inputMsgField":"payload","outputMsgField":"payload","operation":"div","constant":"10","round":true,"decimals":"2","x":1550,"y":740,"wires":[[]]},{"id":"b4f180741602c95f","type":"calculator","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"/10","inputMsgField":"payload","outputMsgField":"payload","operation":"div","constant":"10","round":true,"decimals":"2","x":1550,"y":820,"wires":[[]]},{"id":"a65b9039c2b28e4a","type":"calculator","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"/10","inputMsgField":"payload","outputMsgField":"payload","operation":"div","constant":"10","round":true,"decimals":"2","x":1550,"y":900,"wires":[[]]},{"id":"4732c65ec0586fb9","type":"join","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"3","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":1550,"y":1860,"wires":[["72ad4407bb57762f"]]},{"id":"72ad4407bb57762f","type":"function","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"Formatiere Startzeit","func":"var hours = msg.payload.Stunden.toString().padStart(2, '0');\nvar minutes = msg.payload.Minuten.toString().padStart(2, '0');\nvar seconds = msg.payload.Sekunden.toString().padStart(2, '0');\n\nvar startTime = hours + \":\" + minutes + \":\" + seconds;\n\nmsg.payload = startTime;\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":1910,"y":1860,"wires":[["51c6e2fe0cd9f74c"]]},{"id":"33061a9615402ee6","type":"change","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"Register 75 (Start time mm)","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[75]","tot":"msg"},{"t":"set","p":"topic","pt":"msg","to":"Minuten","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1180,"y":1860,"wires":[["4732c65ec0586fb9"]]},{"id":"0e03a3c11b665570","type":"change","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"Register 76 (Start time ss)","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[76]","tot":"msg"},{"t":"set","p":"topic","pt":"msg","to":"Sekunden","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1170,"y":1900,"wires":[["4732c65ec0586fb9"]]},{"id":"51c6e2fe0cd9f74c","type":"ha-time-entity","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"Wallbox Beginn Ladevorgang","version":0,"debugenabled":false,"inputs":1,"outputs":1,"entityConfig":"1a4380752707bdd3","mode":"set","value":"payload","valueType":"msg","outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"value"},{"property":"previousValue","propertyType":"msg","value":"","valueType":"previousValue"}],"x":2190,"y":1860,"wires":[[]]},{"id":"67462c51569bcba0","type":"change","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"Register 83 (End time mm)","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[83]","tot":"msg"},{"t":"set","p":"topic","pt":"msg","to":"Minuten","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1180,"y":2020,"wires":[["ec68e3c2e0bd97e0"]]},{"id":"a4dc018b273d46ab","type":"change","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"Register 84 (End time ss)","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[84]","tot":"msg"},{"t":"set","p":"topic","pt":"msg","to":"Sekunden","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1170,"y":2060,"wires":[["ec68e3c2e0bd97e0"]]},{"id":"ec68e3c2e0bd97e0","type":"join","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"3","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":1550,"y":2020,"wires":[["de124690c22ef5eb"]]},{"id":"de124690c22ef5eb","type":"function","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"Formatiere Startzeit","func":"var hours = msg.payload.Stunden.toString().padStart(2, '0');\nvar minutes = msg.payload.Minuten.toString().padStart(2, '0');\nvar seconds = msg.payload.Sekunden.toString().padStart(2, '0');\n\nvar startTime = hours + \":\" + minutes + \":\" + seconds;\n\nmsg.payload = startTime;\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":1910,"y":2020,"wires":[["a950716b63f77e3d"]]},{"id":"a950716b63f77e3d","type":"ha-time-entity","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"Wallbox Ende Ladevorgang","version":0,"debugenabled":false,"inputs":1,"outputs":1,"entityConfig":"c79b84cdfe809fd8","mode":"set","value":"payload","valueType":"msg","outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"value"},{"property":"previousValue","propertyType":"msg","value":"","valueType":"previousValue"}],"x":2200,"y":2020,"wires":[[]]},{"id":"34666805017ef1d1","type":"calculator","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"/10","inputMsgField":"payload","outputMsgField":"payload","operation":"div","constant":"10","round":false,"decimals":0,"x":1550,"y":2100,"wires":[[]]},{"id":"db3af468f61fc622","type":"calculator","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"/10","inputMsgField":"payload","outputMsgField":"payload","operation":"div","constant":"10","round":true,"decimals":"2","x":1550,"y":2580,"wires":[[]]},{"id":"2de8a17f0ad28e28","type":"calculator","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"/10","inputMsgField":"payload","outputMsgField":"payload","operation":"div","constant":"10","round":true,"decimals":"2","x":1550,"y":2660,"wires":[[]]},{"id":"6539c70420afc24a","type":"calculator","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"/10","inputMsgField":"payload","outputMsgField":"payload","operation":"div","constant":"10","round":true,"decimals":"2","x":1550,"y":2740,"wires":[[]]},{"id":"0f09fbfb255e591e","type":"debug","z":"0f79f55dafbabb51","g":"a2b812dec7acf27c","name":"debug 113","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":830,"y":420,"wires":[]},{"id":"1a4380752707bdd3","type":"ha-entity-config","server":"b553cfb0.d5bb4","deviceConfig":"43e2c3b60cd25698","name":"Wallbox Beginn Ladevorgang","version":"6","entityType":"time","haConfig":[{"property":"name","value":"Wallbox Beginn Ladevorgang"},{"property":"icon","value":""},{"property":"entity_picture","value":""}],"resend":false,"debugEnabled":false},{"id":"c79b84cdfe809fd8","type":"ha-entity-config","server":"b553cfb0.d5bb4","deviceConfig":"b05eacca4db8b00d","name":"Wallbox Ende Ladevorgang","version":"6","entityType":"time","haConfig":[{"property":"name","value":"Wallbox Ende Ladevorgang"},{"property":"icon","value":""},{"property":"entity_picture","value":""}],"resend":false,"debugEnabled":false},{"id":"b553cfb0.d5bb4","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30,"areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true},{"id":"43e2c3b60cd25698","type":"ha-device-config","name":"Wallbox Beginn Ladevorgang","hwVersion":"","manufacturer":"Node-RED","model":"","swVersion":""},{"id":"b05eacca4db8b00d","type":"ha-device-config","name":"Wallbox Ende Ladevorgang","hwVersion":"","manufacturer":"Node-RED","model":"","swVersion":""}]

Flow for Writing:

[{"id":"10d539e79ef594ac","type":"group","z":"278c3ffc.fa40d8","name":"Write","style":{"stroke":"#ff3f3f","fill-opacity":"0.1","label":true,"fill":"#ff0000"},"nodes":["2e2d6d161d6ed105","cd9327d8b3b1ec3d","94ae11ecfb0f706a","7ab6e3bf3d2c72d4","5cb57447c4a9c953","7352968753afca86","a94ffb7d3c155afd","14a99b575e2f36b1","7e5b74996dd28855","4310bd9b950bb3f3","a48574818ee871a0","19100736cc56f7d7","4afdc8c0cfdc61f6","788bc334b224fd43","b4d431d0ac5b232c","4d24926a1db11845","7613ad60ec9bd2f4","d1fef6deaee33431","a4a1e2f59fbe55b9","961b22f9ecf37283","77a72a0b26128f5d","51398b76b21e9ac7","06752f2be999c9b9","e23915491e805d54","e48231b5a6ec3b97","e248dc487522bd5c","681df23bc40b8cf6","7a5180ea40e72686","0ae8b215793a4e12","d39fa715e328e8da","5d52436599db256f","f7331200bcd1080c"],"x":74,"y":59,"w":1432,"h":822},{"id":"2e2d6d161d6ed105","type":"server-state-changed","z":"278c3ffc.fa40d8","g":"10d539e79ef594ac","name":"State Ampere Regler (6-16)","server":"b553cfb0.d5bb4","version":5,"outputs":1,"exposeAsEntityConfig":"","entityId":"input_number.ampere_regler","entityIdType":"exact","outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":560,"y":360,"wires":[["7ab6e3bf3d2c72d4"]]},{"id":"cd9327d8b3b1ec3d","type":"modbus-write","z":"278c3ffc.fa40d8","g":"10d539e79ef594ac","name":"","showStatusActivities":true,"showErrors":true,"showWarnings":true,"unitid":"","dataType":"MHoldingRegisters","adr":"0091","quantity":"1","server":"","emptyMsgOnFail":false,"keepMsgProperties":false,"delayOnStart":false,"startDelayTime":"","x":1060,"y":360,"wires":[["94ae11ecfb0f706a"],[]]},{"id":"94ae11ecfb0f706a","type":"debug","z":"278c3ffc.fa40d8","g":"10d539e79ef594ac","name":"debug 102","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1270,"y":360,"wires":[]},{"id":"7ab6e3bf3d2c72d4","type":"change","z":"278c3ffc.fa40d8","g":"10d539e79ef594ac","name":"Ampere Änderung","rules":[{"t":"change","p":"payload","pt":"msg","from":"6.0","fromt":"str","to":"[60]","tot":"json"},{"t":"change","p":"payload","pt":"msg","from":"7.0","fromt":"str","to":"[70]","tot":"json"},{"t":"change","p":"payload","pt":"msg","from":"8.0","fromt":"str","to":"[80]","tot":"json"},{"t":"change","p":"payload","pt":"msg","from":"9.0","fromt":"str","to":"[90]","tot":"json"},{"t":"change","p":"payload","pt":"msg","from":"10.0","fromt":"str","to":"[100]","tot":"json"},{"t":"change","p":"payload","pt":"msg","from":"11.0","fromt":"str","to":"[110]","tot":"json"},{"t":"change","p":"payload","pt":"msg","from":"12.0","fromt":"str","to":"[120]","tot":"json"},{"t":"change","p":"payload","pt":"msg","from":"13.0","fromt":"str","to":"[130]","tot":"json"},{"t":"change","p":"payload","pt":"msg","from":"14.0","fromt":"str","to":"[140]","tot":"json"},{"t":"change","p":"payload","pt":"msg","from":"15.0","fromt":"str","to":"[150]","tot":"json"},{"t":"change","p":"payload","pt":"msg","from":"16.0","fromt":"str","to":"[160]","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":830,"y":360,"wires":[["cd9327d8b3b1ec3d"]]},{"id":"5cb57447c4a9c953","type":"server-state-changed","z":"278c3ffc.fa40d8","g":"10d539e79ef594ac","name":"Wallbox Ladevorgang aktiv","server":"b553cfb0.d5bb4","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"input_boolean.wallbox_ladevorgang","entityIdType":"exact","outputInitially":false,"stateType":"str","ifState":"on","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":550,"y":220,"wires":[["a94ffb7d3c155afd"],["4310bd9b950bb3f3"]]},{"id":"7352968753afca86","type":"modbus-write","z":"278c3ffc.fa40d8","g":"10d539e79ef594ac","name":"","showStatusActivities":true,"showErrors":true,"showWarnings":true,"unitid":"","dataType":"MHoldingRegisters","adr":"0095","quantity":"1","server":"","emptyMsgOnFail":false,"keepMsgProperties":false,"delayOnStart":false,"startDelayTime":"","x":980,"y":180,"wires":[["14a99b575e2f36b1"],[]]},{"id":"a94ffb7d3c155afd","type":"change","z":"278c3ffc.fa40d8","g":"10d539e79ef594ac","name":"1 = Start","rules":[{"t":"set","p":"payload","pt":"msg","to":"[1]","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":780,"y":180,"wires":[["7352968753afca86"]]},{"id":"14a99b575e2f36b1","type":"debug","z":"278c3ffc.fa40d8","g":"10d539e79ef594ac","name":"debug 106","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1190,"y":180,"wires":[]},{"id":"7e5b74996dd28855","type":"modbus-write","z":"278c3ffc.fa40d8","g":"10d539e79ef594ac","name":"","showStatusActivities":true,"showErrors":true,"showWarnings":true,"unitid":"","dataType":"MHoldingRegisters","adr":"0095","quantity":"1","server":"","emptyMsgOnFail":false,"keepMsgProperties":false,"delayOnStart":false,"startDelayTime":"","x":980,"y":260,"wires":[["a48574818ee871a0"],[]]},{"id":"4310bd9b950bb3f3","type":"change","z":"278c3ffc.fa40d8","g":"10d539e79ef594ac","name":"2 = Stopp","rules":[{"t":"set","p":"payload","pt":"msg","to":"[2]","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":780,"y":260,"wires":[["7e5b74996dd28855"]]},{"id":"a48574818ee871a0","type":"debug","z":"278c3ffc.fa40d8","g":"10d539e79ef594ac","name":"debug 107","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1190,"y":260,"wires":[]},{"id":"19100736cc56f7d7","type":"comment","z":"278c3ffc.fa40d8","g":"10d539e79ef594ac","name":"WRITE","info":"","x":150,"y":100,"wires":[]},{"id":"4afdc8c0cfdc61f6","type":"comment","z":"278c3ffc.fa40d8","g":"10d539e79ef594ac","name":"Ladesteuerung (Start/Stop) [0095]","info":"","x":240,"y":220,"wires":[]},{"id":"788bc334b224fd43","type":"comment","z":"278c3ffc.fa40d8","g":"10d539e79ef594ac","name":"Limitierung Ladestrom [0091]","info":"","x":220,"y":360,"wires":[]},{"id":"b4d431d0ac5b232c","type":"comment","z":"278c3ffc.fa40d8","g":"10d539e79ef594ac","name":"Communication Timeout Time [0089]","info":"","x":240,"y":520,"wires":[]},{"id":"4d24926a1db11845","type":"inject","z":"278c3ffc.fa40d8","g":"10d539e79ef594ac","name":"Payload zu Sekunden ändern","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":580,"y":520,"wires":[["7613ad60ec9bd2f4"]]},{"id":"7613ad60ec9bd2f4","type":"change","z":"278c3ffc.fa40d8","d":true,"g":"10d539e79ef594ac","name":"Payload","rules":[{"t":"set","p":"payload","pt":"msg","to":"[s]","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":820,"y":520,"wires":[["d1fef6deaee33431"]]},{"id":"d1fef6deaee33431","type":"modbus-write","z":"278c3ffc.fa40d8","g":"10d539e79ef594ac","name":"","showStatusActivities":true,"showErrors":true,"showWarnings":true,"unitid":"","dataType":"MHoldingRegisters","adr":"0089","quantity":"1","server":"","emptyMsgOnFail":false,"keepMsgProperties":false,"delayOnStart":false,"startDelayTime":"","x":1020,"y":520,"wires":[["a4a1e2f59fbe55b9"],[]]},{"id":"a4a1e2f59fbe55b9","type":"debug","z":"278c3ffc.fa40d8","g":"10d539e79ef594ac","name":"debug 108","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1230,"y":520,"wires":[]},{"id":"961b22f9ecf37283","type":"comment","z":"278c3ffc.fa40d8","g":"10d539e79ef594ac","name":"Charge Station Control [0093]","info":"","x":220,"y":760,"wires":[]},{"id":"77a72a0b26128f5d","type":"modbus-write","z":"278c3ffc.fa40d8","g":"10d539e79ef594ac","name":"","showStatusActivities":true,"showErrors":true,"showWarnings":true,"unitid":"","dataType":"MHoldingRegisters","adr":"0093","quantity":"1","server":"","emptyMsgOnFail":false,"keepMsgProperties":false,"delayOnStart":false,"startDelayTime":"","x":1180,"y":760,"wires":[["5d52436599db256f"],[]]},{"id":"51398b76b21e9ac7","type":"change","z":"278c3ffc.fa40d8","g":"10d539e79ef594ac","name":"1 = RFID / OCPP start+stopp (Modbus Steuerung)","rules":[{"t":"set","p":"payload","pt":"msg","to":"[1]","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":830,"y":760,"wires":[["77a72a0b26128f5d"]]},{"id":"06752f2be999c9b9","type":"change","z":"278c3ffc.fa40d8","g":"10d539e79ef594ac","name":"2 = Ladestation gesperrt","rules":[{"t":"set","p":"payload","pt":"msg","to":"[2]","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":750,"y":840,"wires":[["e248dc487522bd5c"]]},{"id":"e23915491e805d54","type":"inject","z":"278c3ffc.fa40d8","g":"10d539e79ef594ac","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":520,"y":760,"wires":[["51398b76b21e9ac7"]]},{"id":"e48231b5a6ec3b97","type":"inject","z":"278c3ffc.fa40d8","g":"10d539e79ef594ac","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":520,"y":840,"wires":[["06752f2be999c9b9"]]},{"id":"e248dc487522bd5c","type":"modbus-write","z":"278c3ffc.fa40d8","g":"10d539e79ef594ac","name":"","showStatusActivities":true,"showErrors":true,"showWarnings":true,"unitid":"","dataType":"MHoldingRegisters","adr":"0093","quantity":"1","server":"","emptyMsgOnFail":false,"keepMsgProperties":false,"delayOnStart":false,"startDelayTime":"","x":1180,"y":840,"wires":[["f7331200bcd1080c"],[]]},{"id":"681df23bc40b8cf6","type":"change","z":"278c3ffc.fa40d8","g":"10d539e79ef594ac","name":"0 = Plug & Charge","rules":[{"t":"set","p":"payload","pt":"msg","to":"[0]","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":730,"y":680,"wires":[["0ae8b215793a4e12"]]},{"id":"7a5180ea40e72686","type":"inject","z":"278c3ffc.fa40d8","g":"10d539e79ef594ac","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":520,"y":680,"wires":[["681df23bc40b8cf6"]]},{"id":"0ae8b215793a4e12","type":"modbus-write","z":"278c3ffc.fa40d8","g":"10d539e79ef594ac","name":"","showStatusActivities":true,"showErrors":true,"showWarnings":true,"unitid":"","dataType":"MHoldingRegisters","adr":"0093","quantity":"1","server":"","emptyMsgOnFail":false,"keepMsgProperties":false,"delayOnStart":false,"startDelayTime":"","x":1180,"y":680,"wires":[["d39fa715e328e8da"],[]]},{"id":"d39fa715e328e8da","type":"debug","z":"278c3ffc.fa40d8","g":"10d539e79ef594ac","name":"debug 109","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1390,"y":680,"wires":[]},{"id":"5d52436599db256f","type":"debug","z":"278c3ffc.fa40d8","g":"10d539e79ef594ac","name":"debug 110","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1390,"y":760,"wires":[]},{"id":"f7331200bcd1080c","type":"debug","z":"278c3ffc.fa40d8","g":"10d539e79ef594ac","name":"debug 111","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1390,"y":840,"wires":[]},{"id":"b553cfb0.d5bb4","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30,"areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true}]

Hi @HoloSan

thanks for sharing your integration for this wallbox. It makes me really happy that someone else had the same wish to integrate this wallbox into HA and to get in touch with them.
I’ve installed the same one since a few days and wants to integrate it in my HA setup.

I’ve a few questions:

  • Is there any reason why you haven’t used the modbus integration?
  • Have you tried to use the OCPP integration from HACS?
  • I haven’t used Node-RED until now, but I think it should be possible: Would you be please so kind to export your integration and share it with us?

I’m unsure what would be the best way to go.
My first idea was to use the modbus integration and to add all modbus register. I already found an ioBroker integration for this (on the blog of daheimladen.de from provided by an user, maybe you will do the same. I guess that Stephan from daheimladen would be grateful.
My second opinion was to use the OCPP integration instead. Using OCPP seems to be very simple and straight.

kind regards
Michael

Im using NodeRed for all my automations. You can do way more complex things and have more possibilities. Once you know how NodeRed works it’s way better than the HA automations - in my opinion.

So I could have also used the Modbus Integration in HomeAssistant, but things like calculating the values or changing values to other formats would have been too confusing for me with the file editor, helpers, … So in NodeRed I have everything I need at one place and doesnt need ultra complex functions.

  • So the “node-red-contrib-modbus” is like a modbus integration for NodeRed. It does the same as the HA Modbus integration.

  • I didnt think about the OCPP Integration. I just knew about the EVCC integration, but haven’t looked at the ocpp yet;

  • You just need to install NodeRed in HA and add the needed “node red contribs”. Then you can just copy and import my “reading” and my “writing” flow from the two comments and you should have all the flows needed directly in your NodeRed instance.

And within NodeRed I already created my Solar Excess Power Charging and it’s working perfect so far. It will start when there is enough power and also increase the Ampere or decrease the Ampere or stopp the charging mode.

EDIT: I updated my guide:

After a while I noticed that the Wallbox wasn’t able to start charging again after stopping. To solve this you don’t need to change the mode. After an Update for the Wallbox you are now able to change the Ampere Setting to 0 Ampere to pause the charging - instead of stopping it completely. So in your flow just set the Ampere to 0 when you don’t have enough solar power.
Before that I didn’t want the Wallbox to start/stop/start/stop the whole time and made a delay with 5 min or so. But now I can make instant changes for the Ampere Setting.