Deye home battery exports unexpectedly: two writers on one inverter

·

Thuisbatterij en omvormer met twee verstrengelde stuurkabels, terwijl energie naar een hoogspanningsmast stroomt

On the first day that Home Assistant controlled my Deye inverter, the home battery exported itself to the grid in blocks of 10 kW: from 81 to 25%, at a moment when the electricity earned nothing. This Deye battery export was not planned. This is what went wrong, and the principle I have stuck to ever since.

The symptom

The grid power graph suddenly showed large negative blocks: export. At the same time the battery dropped fast. There was no sun behind those blocks; it was the battery itself draining into the grid.

The cause of the Deye battery export

A Deye has two export modes: Zero Export (the inverter regulates to roughly zero grid import and exports nothing) and Allow Export (the inverter may export up to a set limit). My first version of the translator, the automation that translates the EMHASS plan to the inverter, switched on Allow Export for every discharge. Discharging to cover the house thus became discharging to the grid.

On top of that, two automations were writing to the same inverter. Each had its own idea of what the inverter should do, and they kept overriding each other’s settings.

The fix

  • One owner per actuator. Only the translator writes to the Deye, via one script. Any other automation that wants something from the battery sets a dropdown or a helper; the translator decides.
  • Zero Export is the default. Allow Export only switches on when EMHASS plans an export (a planned grid power below −200 W).
  • An export limit that matches the plan. When exporting from the battery, the limit is the planned power plus 300 W. Only solar surplus may go out at full power.
  • An old plan means a safe mode. If the plan is older than 45 minutes, the inverter goes to Zero Export and the battery only covers the house.

What I do differently now

Before I add a new automation, I look at which devices it switches, and whether they already have an owner. If so, the new automation becomes a reader or an adviser, never a second writer. How that is organised for the whole house is on How it works; the translator’s rules are on EMHASS and the battery.

More incidents: Lessons from practice (in Dutch).


These values apply to one installation. Check them against your own documentation; leave work on 230/400 V to a qualified electrician.


Read also


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *