ESS, Octopus and Home Assistant

Apologies if this is the wrong section, but, I’m struggling to find what I need to get my Multiplus II to work as I want it to. I tried the new DESS, but I don’t think there’s a way to achieve what I want on the victron alone.

Essentially, I’m on Octopus Intelligent Go, (Cheap electricity between 23:30 and 05:30) unless my car is plugged in, when I get cheap electricity at random times, I am also on an export tarrif, so, it’s more economical to export as much solar as possible, and charge the batteries overnight at the cheap rate than it is to charge the batteries from the solar.

So, I have homeassistant set to see those random times and I want to be able to control my Victron settings from home assistant, preferably using Modbus.

Can someone please point me in the right direction (using small words as I am new to this), I am trying to achieve the following.

  1. During the day, use the solar for consumption first, then export where possible, if there’s not enough, use the battery, but, do not charge the battery from the solar at all during the day.
  2. If there’s no extra charging slot (as detected by HASS) then charge the batteries overnight to 100%, between 23:30 and 05:30, and run the house and car charger from the grid.
  3. If a charging session is detected, charge the batteries and run the house and car charger from the grind.

I’ve been manually controlling this using sheduled charge levels, slot 1 setup for 19:01pm till 23:31, then the usual nightly slot in slot 2, and a in slot 3 one that I modify to be daytime.

I’ve looked at the modbus register list (3.40) and there seems to be little that’s actually writable, but I was thinking about having a look at ESS Mode and just switching between keep charged and self consumption, but that doesn’t stop it charging during the day. I guess the charger only/inverter only might work, but I’m not 100% sure what they affect.

Any and all suggestions gratefully received.

I too would like to be able to do this kind of setup to charge batteries during cheap time, but then use grid but then use batteries during the peak time.

Oh, so, I was being stupid, this is actually really easy. I’ll post something tomorrow when I’m in front of the pc.

1 Like

So, I am using the Victron GX modbusTCP Integration available in hacs.

Once installed and setup, be sure to set the tick box to “Read/Write” and not just read only, being careful to set the correct parameters for your victron setup.

Then, I created four scripts.

To change the settings for power from batteries, it is:

ESS_BATTERY_LIFE_STATE, and I chose BL_DISABLED, as my batteries sort their own battery life out.

To change the settings to power from grid, it is:

ESS_BATTERY_LIFE_STATE, and I chose KEEP_BATTERIES_CHARGED.

These are the two scripts you can trigger when you want to switch the battery mode of the device.

Then, I combine these with:

ESS_MAX_CHARGE_CURRENT, set to either 0A or 50A, I setup two scripts for this, and I trigger them using Sunrise/Sunset.

I combined these with the Octopus Energy integration, that sets a toggle based on whether my electricity is expensive, or cheap.

So, if the sun is up, and the energy is cheap, then the charging amps will be set to 0, and my victron is set to run from grid… This way, the sun powers my house first, and any excess is sent to the grid… if there’s not enough sun, it just pulls from the grid.

However, if the sun is up, and the energy is expensive, then first the sun powers the house, then goes to grid, because the charging amps are set to 0, but, because it’s set to run from battery, if there is not enough sun, then the difference is taken from the battery.

1 Like

Thanks for the info, once I have them setup fully I’ll take a good look at this. I do already have victron in HA but not setup or done anything with node red yet.

No node red required for this, it’s just hass and the hacs addins.

How do you set up 4 scripts. I only see 2 tp change variables.

I have a script for each of the settings changes I wish to make, and then I setup automations in home assistant to run those scripts when the conditions I’ve specified are true.

For example, at sunrise set the charging current to zero. This stops the batteries being charged with solar power.

I’m the future the way things works might change, so, I’ve done them as individual scripts for each purpose and I combine them in the automation, but you’d need to find the way that works best for you