Repository navigation
Predbat wokring with indevolt batteries #4945
Woutervg1994
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Predbat on an INDEVOLT battery - working config
I've had Predbat running on an INDEVOLT plug-in battery for about three weeks
now and it's been stable, so here's the config in case anyone else has one.
I tried the existing inverter types first and none of them work.
The built-in types all assume you can write a charge
window, a start and stop time, and a target SoC to entities. The INDEVOLT
integration does not function in that way
It gives you two service calls:
I built this on my own unit but nothing here is modelspecific but it should work for all INDEVOLT batteries as long as you set charge
and discharge limits to what your hardware accepts.
Worked this out with Claude, mostly for digging through the Predbat source to
find out why something was failing.
As mentioned this config is currently running without errors and has been manually checked by me.
Helpers you need first
Four template sensors, because the integration doesn't have what Predbat
expects:
# SoC in kWh - the integration reports a percentage {{ (states('<soc_percent>')|float(0) / 100) * states('<nominal_capacity>')|float(0) }} # Inverted grid power - Predbat wants negative on import, INDEVOLT is opposite {{ states('<meter_power>')|float(0) * -1 }} # House load power (optional, for the flow diagram) {{ states('<pv_power>')|float(0) + states('<meter_power>')|float(0) + states('<battery_power>')|float(0) }} # House load today, daily incrementing kWh {{ [ <import_today> - <export_today> + <pv_today> + <battery_discharge_today> - <battery_charge_today>, 0 ]|max }}Plus three input_number helpers - charge rate, discharge rate (0 to your max,
in W) and charge limit (0-100 %). Those are write targets only; the real
values go as parameters to the service calls, but Predbat needs writable
entities or it errors out. Point them at a sensor and you get "cannot be
modified".
The things that had to be right
has_time_window: false. Without it Predbat keeps hunting for a charge
window that will never exist and throws a ValueError every timer tick. Took
the web interface down with a 502 in my case.
battery_rate_max set explicitly. For a non-GivEnergy inverter Predbat
defaults to 2600 W and the service rejects it: "value must be at most 2400 for
dictionary value @ data['power']". This is the one setting that's genuinely
per-model. On mine the charge service will take 3000 W while discharge still
caps at 2400 - I ran them asymmetrically for a bit and went back, because the
mismatch produced failed discharge calls that weren't obvious from the plan.
The stop service wants the internal option value, so
self_consumed_prioritized, not the translated UI label. I useself-consumption rather than the standby button because standby also stops the
battery serving the house.
charge_limit needs a writable entity even though this inverter has no
charge limit concept. has_target_soc is true so Predbat wants somewhere to
write the target SoC. Without it every run ends with "No entity_id for
charge_limit to write N" once the battery is full and Predbat drops into
Demand - which also blocks the stop service. It writes a percentage there,
never kWh.
reserve needs the real discharge limit entity. If Predbat can't find one
it quietly creates a sensor.predbat_mine_0_reserve dummy that reads itself, so
your minimum SoC never gets set on the battery. Cost me the most time because
nothing looks broken.
load_today must not be grid import. Solar the house uses directly never
passes the meter, so load comes out understated and Predbat subtracts PV twice
Efficiency
Round-trip on these is well below Predbat's 3% default per direction. Until I
set battery_loss and battery_loss_discharge to 0.08 each (inverter_loss 0.04)
it was planning arbitrage on margins that weren't there. Worth measuring your
own from the daily charge and discharge counters.
Full apps.yaml below.
apps(2).yaml
All reactions