Ok I have found a resolution to this issue:
To revise my goal was to set up a simple Dashboard in Home Assistant to allow Victron MultiPlus charging (my home buying power from our Grid Supplyer) to be turned on and off by family members when I am not home, via a simpler Home Assistant dashboard. The reason is that the ESS schedules that control this type of charging ar burried deep in the VRM and my famility is already using Home Assistant dashboards so are familure with it.
My inital approach was to deploy a hack which leverages the MultiPlus Aux ports that can sense a small voltage change across the terminals. The voltage was being supplied by a ESP32866 board controlled by Home Assistant. The Voltage change was being monitored in the MultiPlus by an assistant entitled ‘charge current control’. This assistant allows you to adjust the charge current from 0 to 110 amps in the MulitpLus Charge TAB of its configuration page, effectively using the change as a switch.
The issue I was having is that the ESS assitant in the MultiPlus and the ESS module which its paired to in the CebroGX clash with the charge current control assistant, and you get undesirable results.
To that end I started to explore the Modbus protocol as I was able to see some data in Home assistant via an intergration entitled ‘hass-victron’. So I went off down the Modbus rabbit hole and got some way to see data and write changes to the MultiPlus (mostly to the relay ports). But I struggled to find any ability to switch the Multiplus charging on or off or activate and deactivate the CebroGX scheduled charges (which would be the best solution).
After a fear amount of head scratching and failing to get the Modbus approach to work (this requires writing Yamal code and knowning the correct Victron registeres to communicate with - all well documented so not that hard to research and write). I deciced to read the documentation on the Github page for the hass-victron intergration more carefully. There I discovered that I had not configured this intergration into Home Assistant correctly, and that if I simply reconfigured it, and checked one small box (“Ticking the write support option enables an “advanced” users mode. If write support is disabled the integration is “safer” to use.”) then intergration would pull in all the switchable elements the CebroGX allows you to control externally of the Victrom ecosystem.
Importaly for my project the MultiPlus ‘Inverter mode’ selection is exposed.
This one element gave me the means to create my Home assistant dash board. Its not the final solution I would like to achieve (the ability to turn on and off the ESS schedules directly), but it works in the same manner as my inital soloution just using a slightly different approach.
So what I did next was:
- Remove the ‘charge current control’ assistant from the Multiplus config. As its not needed in my build, and keeps the MultiPlus config cleaner and easier to support.
- Remove the ESP83266 board from the physical connection to the MultipLus Aux port. Again it’s not needed and cleans up the physical install.
- Reconfigure the Home Assistant hass-victron intergration with the correct write support check box ticked.
- In the Charging Tab of the Multiplus config, set the charging current back to 100Amps. As we will not be manipulating this value and need it to be at its upper level when charging from the grid is called for.
- In the CenroGX I set up 4 ESS charging schedules, and turn these all to active. which causes them to fire regardless of what Home Assistant deos. These schedules have a charge to SOC of 100 percent set, as the actual SOC will be managed by Home Assistant.
- Then in Home Assistant I have an automation which can select a MultiPlus mode via the now exposed inverter mode function in the hass-victron intergration.
The helper toggle simply creates an on/off switch for my dash board, the charge to SOC is a value that the automation evaluates to see if the desired charge SOC has been reached, and the start charging is the time that the Home Assistant Automation will fire.
How this works is if my wife turns charging on in Home assistant, and sets the SOC to 80% battery at 01:10am. Home Assistant will wait until that time then fire the automation. Which selects the ‘ON’ value in the Multiplus. ON turns on the charger, so if a ESS schedule is also set to be active within this same period power is pulled from the grid and my battery charges.
When Home Assistant evaulates the SOC against the automation SOC helper number, and they become equal, it sets the MultiPlus mode to ‘INVERTER’ which turns off the charger. The ESS schedule may be still active at this point but without the mjeans to charge anything no more power is pulled from the grid.
We have been using this solution for a few days now and it works seemlessly. The only issue I think we will have is Solar excess. In that at times (usualy in the summer months) we have excess solar and push that to the grid to keep the pannels opperating at 100% and thus staying cooler.
I have not confirmed but I suspect my current solution stops the MultiPlus push power to the grid as I beleive it uses the charger for this task. However as we generally only buy power at night or on Sundays (due to the tarrif we are on) in the Autum and Winter months, I think deactivating the ESS schedules one a year (for Spring and Summer) and then reactivating them one a year, is far better than not having the Home Assistant charging functions.
Further this approach still allows us to remotely (via VRM) set charging on and off as the same inverter modes are available in the VRM, so we have not limited the Victron ecsystem with the changes I have made.
So to conclude:
I am somewhat annoyed my first go at this using the ESP board and assistant hack failed, but I think thats the geek in me talking. The Solution we have now, is simpler, easy to use and will work for now. Eventually if the ESS Schedules become exposed to the hass-vcitron intergration I’ll adapt my Home Assistant automation to adjust those rather that the mode switch. As I beleive that would be a more correct answer.
For now I hope this post helps someone else struggling to design the same kind of project.
Take Care D