I have a EV charger Wallbox Pulsar Plus and as soon as my electritian can get a “PowerBoost” Carlo Gavazzi EM300 he will come and install it. There is a lot of data I would like to get into HA from that power meter so I am trying to figure out the best way to get that data.
Since the EV Charger is acting as a client and it is Modbus RTU I can not connect another client to the meter, so my idea is to build an ESP device that has two RS485 interfaces on two different UARTS and then just relay the data and at the same time pass it on to HA. So I started to write a sketch with the modbus-esp8266 library but then I thought it would be great if I could use ESPHome instead.
So my question is if that is possible? I have put together this yaml:
So: does anyone know if this will work? I have no way to test it until the meter is delivered and installed. And my electrician have told me it might not be until next year due to the global shortage of semi conductors.
Very interesting solution. Might work with some small adjustments.
The only down side is that I will only be able to get the information that the charger asks the meter for. The meter I am about to install have a lot of interesting registers. With the “man-in-the-middle”-solution I am trying to achieve I will be able to get all the data I want and at the same time the charger will get the data it needs.
True. In my case the Newmotion controller requests all relevant information (per phase currents, voltages, total consumption,…) so that is not an issue for me. My main concern was that an issue with my esp solution should never interfere with the charge controller. That is why I chose a passive listener.
If it is Modbus RTU over RS485 it supports multidrop communication so you shouldn’t need to use two interfaces. And you should be able to request the information you want on the RS485 bus without being limited to only the queries asked by the charger.
Yes it is Modbus RTU (RS485). But Modbus RTU only allows one client but many servers on the same bus. Modbus TCP on the other hand you can have more than one client.
Unfortunately not. This project has very low priority at the moment.
The reason is that my electrical company replaced my meter to one that has a P1-port, so I can now access all that data from the meter instead. No need to use the one for the EV-charger.
I’m thinking of using this component in a different way while using the same ingredients.
Would it be possible to take the P1 measurements from Home-Assistant, read it with the ESP and convert them to modbus so it can be fed into the charger as if it was the PowerBoost module that is connected.
The cost for the meter are somewhere around the €200 and it will measure exactly the same thing as the P1 port can already provide.
Did you try the .yaml you provided and did the charger respond? Or do you only have the charger connected directly to the meter without the ESP in between?
No. I never tried it at all. The PowerBoost was delivered first in December, and at that time I knew I was about to get the new meter, so I never continued with this project.
But by looking at the display on the PowerBoost I can tell you that it reports negative values if I am selling power to the grid (I have solar PV).
If you have the same charger as I (Wallbox Pulsar) it is compatible with OCCP, wich you can find a custom integration for in HACS. Then you should be able to set max power. Or you can do it via the offical integration in HA. No need for you to build a Modbus node.
The downside of the official integration is that it is using the cloud service, which is a bit slow when you update the max power.
I have a similar challenge with a pool heat pump (there is a modbus link between the touchscreen and the main board which I need to sniff).
I’ve created a branch of the standard esphome modbus / modbus_controller modules which adds a “disable_send” feature. You can then setup a sensor which will send both the master request and the slave response that it detects on the bus.
The current version is very hacky and not documented. If there is interest I will document.
Neat! I think my Tropical Heat Pump works the same way. I gave up last season trying to read the modbus, might just break down and get their $200 cloud (WiFi) to modbus adapter.
Hello,
I am having issues getting your modified version of modbus controller working.
As soon as i configure a controller with the address of an existing controller, it crash and reboot.
If i used a non existing address, logs get spammed with unknown modbus devices so that part is working.
Would you know why ?
Also, is it working with multiple modbus controllers on the same modbus ?