Repository navigation
Adding Victron Multiplus as an inverter #798
Replies: 15 comments 27 replies
|
I just came here to see if anyone has done this. I have a lot of control over my MPII from HA for saving sessions and such already but would like to get PredBat working and move to Agile. I'm somewhat struggling to understand the documentation in whats required for non-Giv inverters. It looks like I already have a lot of HA entities for whats required (house/car/solar/export/etc) for a template but struggling to stitch it together. |
|
+1 for me.. i am now using the Victron ESS/DESS but would like to take it into HA |
|
+1 for me too. I'm surprised Victron isn't supported, |
|
It needs someone with a Victron inverter to work out what the entities for SoC, current state, discharge rate, etc and control commands are to charge, discharge, hold charge, etc. There's at least 4 people here who have Victron inverters, the author of Predbat doesn't, so it's really up the community to work it out. This is how all the non-GivEnergy inverters have been added Instructions on adding a new inverter type are in the documentation https://springfall2008.github.io/batpred/inverter-setup/#. The formatting has got messed up, but it starts half way through the Sigstore entry: https://springfall2008.github.io/batpred/inverter-setup/#sigenergy-sigenstor |
|
Did someone already got this working. If so please share the yaml to show the entities we need to use....eg with latest HA integration that talks to Victron over MQTT |
|
Yes, I am reporting Victron via MQTT now... adding the sensor in config yaml (the one you use) .. to now the sensor to read i use mqtt-explorer... pretty easy AC Current NET
AC Loads
DC Loads
|
|
I’ve started testing Victron integration in Predbat, and I’m also running it alongside my existing SolarEdge setup. I’ll raise a proper ticket soon and share the YAML once it’s tidied up, but here’s a quick overview of what I’ve done so far. Existing setup (before Victron):
New setup (Victron system):
I’m running the MultiPlus in ESS mode, with only the AC In connected for testing at the moment. I’ve used the [Victron MQTT integration](https://github.com/tomer-w/ha-victron-mqtt) to bring data into Home Assistant. For Predbat, I used the existing To control the inverter, I created a select list in Home Assistant with three options:
Each option sets a specific AC set-point through the Victron MQTT integration:
It’s currently running alongside my SolarEdge setup and appears to be working well for charge and discharge control. I’m still seeing a few log warnings — things like “Out of range index 1 within item” — which might be related to how I’ve combined the charge/discharge commands with the SolarEdge control. |
|
Guys, are you able to share your apps.yaml and custom config entries to get Victron inverters working with the MQTT HA integration? I have put a placeholder in the documentation but it needs your content! |
|
Hi Geoffrey, |
|
|
Hi all, Installation method Home Assistant OS I have previously setup a number of sensors to see some of the Victron Cerbo-GX registers using the Modbus integration. Hope this helps people with Victron inverters. Happy to share more info as required. Here is my apps.yaml file pred_bat:
module: predbat
class: PredBat
# Enable ML load prediction
load_ml_enable: true
# Use the output data in Predbat (can be false to explore the use without using the data)
load_ml_source: true
# Optional: Maximum days of historical data to fetch from HA on each poll (default: 28)
load_ml_max_days_history: 28
# Optional: Number of days of history to accumulate in the on-disk database (default: 90)
# load_ml_database_days: 90
# Sets the prefix for all created entities in HA - only change if you want to run more than once instance
prefix: predbat
# XXX: This is a configuration template, delete this line once you edit your configuration
# template: true
# Timezone to work in
timezone: Europe/London
# Currency, symbol for main currency and second symbol for 1/100s e.g. $ c, £ p or € c
currency_symbols:
- '£'
- 'p'
# Enable temperature predictions (RECOMMENDED for ML load prediction)
temperature_enable: true
# Optional: specify coordinates (defaults to zone.home)
# temperature_latitude: 51.5074
# temperature_longitude: -0.1278
# Number of threads to use in plan calculation
# Can be auto for automatic, 0 for off or values 1-N for a fixed number
threads: auto
# If you are using Predbat outside of HA then set the HA URL and Key (long lived access token here)
#ha_url: 'http://homeassistant.local:8123'
#ha_key: !secret ha_key
# Sets the maximum period of zero load before the gap is filled, default 30 minutes
# To disable set it to 1440
load_filter_threshold: 30
#
# Energy today (not power) sensors, more than one can be specified and they will be summed up automatically
#
# For two inverters the load today would normally be the master load sensor only (to cover the entire house)
# If you have three phase and one inverter per phase then you would need three load sensors
#
# For pv_today if you have multiple solar inverter inputs then you should include one entry for each inverter
#
load_today:
- sensor.victron_home_energy_consumption_today
import_today:
- sensor.grid_import_daily
export_today:
- sensor.grid_export_daily
pv_today:
- sensor.et112_energy_today
# Load forecast can be used to add to the historical load data (heat-pump)
# To link to Predheat
# Data must be in the format of 'last_updated' timestamp and 'energy' for incrementing kWh
#load_forecast:
# - predheat.heat_energy$external
#
#
# Controls/status - must by 1 per inverter
#
num_inverters: 1
inverter_hybrid: false
#
# Run balance inverters every N seconds (0=disabled) - only for multi-inverter
#balance_inverters_seconds: 60
#
# Inverter model: MultiPlus-II 48/10000/140-100/100
inverter_type: Victron
inverter:
name: "Victron Multiplus-II"
has_rest_api: false
has_mqtt_api: false
has_service_api: true
output_charge_control: "power"
charge_control_immediate: true
current_dp: 0
charge_discharge_with_rate: false
has_charge_enable_time: false
has_discharge_enable_time: false
has_target_soc: true
target_soc_used_for_discharge: true
has_reserve_soc: false
has_timed_pause: false
time_button_press: false
support_charge_freeze: false
support_discharge_freeze: false
has_ge_inverter_mode: false
has_fox_inverter_mode: false
has_idle_time: false
has_time_window: false
charge_time_format: "S"
charge_time_entity_is_option: false
can_span_midnight: true
clock_time_format: "%Y-%m-%d %H:%M:%S"
num_load_entities: 1
soc_units: "%"
write_and_poll_sleep: 2
# Services to control charging/discharging
charge_start_service:
service: script.turn_on
entity_id: script.predbat_start_charging
charge_stop_service:
service: script.turn_on
entity_id: script.predbat_stop_charging
discharge_start_service:
service: script.turn_on
entity_id: script.predbat_start_discharging
discharge_stop_service:
service: script.turn_on
entity_id: script.predbat_stop_discharging
charge_rate: input_number.predbat_battery_charge_rate
discharge_rate: input_number.predbat_battery_discharge_rate
battery_power: sensor.victron_battery_power
battery_power_invert: true
pv_power: sensor.et112_pv_power
load_power: sensor.victron_ac_loads_l1
grid_power: sensor.victron_ac_grid_l1
grid_power_invert: true
battery_voltage: 52.5
soc_percent: sensor.victron_battery_state_of_charge
#Sets the maximum battery charge/discharge rate in watts. Must be set for non-GivEnergy inverters or Predbat will default to 2600W.
battery_rate_max: 8000
soc_max: 12
battery_min_soc: 5
battery_temperature: sensor.victron_battery_temperature
#Grid tied 3.68kW G98 PV Inverter
pv_ac_limit: 3680
#Target SOC
#Used by Victron inverter scripts to set the target SOC.
charge_limit: input_number.predbat_target_soc
# Inverter max AC limit (one per inverter). E.g for a 3.6kw inverter set to 3600
# If you have a second inverter for PV only please add the two values together
inverter_limit: 8000
# Export limit is a software limit set on your inverter that prevents exporting above a given level
# When enabled Predbat will model this limit
# When set defines the maximum watts of AC power your inverter can export to the grid at (e.g. 2500).
# This is used by Predbat in calculating the plan to emulate your inverter's software export limit setting
# that you will have if your G98/G99 approval was lower than your maximum inverter power.
export_limit: 4000
# When set in Watts, caps the maximum discharge rate used specifically during forced export windows,
# without affecting the ECO mode discharge rate.
#inverter_limit_export: 4000
#When set in Watts, overrides the maximum charge/discharge rate settings used when controlling the inverter.
inverter_limit_charge: 7000
inverter_limit_discharge: 4000
# Some batteries tail off their charge rate at high soc%
# enter the charging curve here as a % of the max charge rate for each soc percentage.
# the default is 1.0 (full power)
# The example below is from GE 9.5kwh battery with latest firmware and gen1 inverter
#
# Predbat can compute this curve automatically if you have enough data, restart the app and look in the logfile for the data
# once set here Predbat will no longer re-compute the curve.
# Can also be set to 'auto' to just use the calculation curve, not recommended if you are using low power charging mode.
battery_charge_power_curve:
5: 1.0
96: 1.0
97: 1.0
98: 0.5
99: 0.5
100: 0.22
battery_discharge_power_curve:
1: 1.0
# Set these to match solcast sensor names if not using the cloud interface
# The regular expression (re:) makes the solcast bit optional
# If these don't match find your own names in Home Assistant
pv_forecast_today: re:(sensor.(solcast_|)(pv_forecast_|)forecast_today)
pv_forecast_tomorrow: re:(sensor.(solcast_|)(pv_forecast_|)forecast_tomorrow)
pv_forecast_d3: re:(sensor.(solcast_|)(pv_forecast_|)forecast_(day_3|d3))
pv_forecast_d4: re:(sensor.(solcast_|)(pv_forecast_|)forecast_(day_4|d4))
# Defines the number of cars modelled by the system, set to 0 for no car
num_cars: 0
# Octopus saving session points to the saving session Sensor in the Octopus plugin, when enabled saving sessions will be at the assumed
# Rate is read automatically from the add-in and converted to pence using the conversion rate below (default is 8)
# Changed 7/8/2026 RML to match Bottlecapdave changes to event names
#octopus_saving_session: 're:(event.octopus_energy([0-9a-z_]+|)_saving_session_event(s|))'
octopus_saving_session: 're:(event.octopus_energy([0-9a-z_]+|)_power_down_event(s|))'
octopus_saving_session_octopoints_per_penny: 8
# Octopus free session points to the free session Sensor in the Octopus plugin
# Note: You must enable this event sensor in the Octopus Integration in Home Assistant for it to work
# Changed 7/8/2026 RML to match Bottlecapdave changes to event names
#octopus_free_session: 're:(event.octopus_energy_([0-9a-z_]+|)_octoplus_free_electricity_session_events)'
octopus_free_session: 're:(event.octopus_energy_([0-9a-z_]+|)_octoplus_power_up_events)'
# Energy rates
# Please set one of these three, if multiple are set then Octopus is used first, second rates_import/rates_export and latest basic metric
# Set import and export entity to point to the Octopus Energy plugin import and export sensors
# automatically matches your meter number assuming you have only one (no need to edit the below)
# Will be ignored if you don't have the sensor but will error if you do have one and it's incorrect
# Note: To get detailed energy rates you need to go in and manually enable the following events in HA
# event.octopus_energy_electricity_xxxxxxxx_previous_day_rates
# event.octopus_energy_electricity_xxxxxxxx_current_day_rates
# event.octopus_energy_electricity_xxxxxxxx_next_day_rates
# and if you have export enable:
# event.octopus_energy_electricity_xxxxxxxx_export_previous_day_rates
# event.octopus_energy_electricity_xxxxxxxx_export_current_day_rates
# event.octopus_energy_electricity_xxxxxxxx_export_next_day_rates
# Predbat will automatically find the event. entities from the link below to the sensors
metric_octopus_import: 're:(sensor.(octopus_energy_|)electricity_[0-9a-z]+_[0-9a-z]+_current_rate)'
metric_octopus_export: 're:(sensor.(octopus_energy_|)electricity_[0-9a-z]+_[0-9a-z]+_export_current_rate)'
# Standing charge in pounds, can be set to a sensor or manually entered (e.g. 0.50 is 50p)
# The default below will pick up the standing charge from the Octopus Plugin
# The standing charge only impacts the cost graphs and doesn't change the way Predbat plans
# If you don't want to show the standing charge then just delete this line or set to zero
metric_standing_charge: 're:(sensor.(octopus_energy_|)electricity_[0-9a-z]+_[0-9a-z]+_current_standing_charge)'
# Days previous is the number of days back to find historical load data
# Recommended is 7 to capture day of the week but 1 can also be used
# if you have more history you could use 7 and 14 (in a list) but the standard data in HA only lasts 10 days
days_previous: 7
# Days previous weight can be used to control the weighting of the previous load points, the values are multiplied by their
# weights and then divided through by the total weight. E.g. if you used 1 and 0.5 then the first value would have 2/3rd of the weight and the second 1/3rd
# Include one value for each days_previous value, each weighting on a separate line.
# If any days_previous's that are not given a weighting they will assume a default weighting of 1.
days_previous_weight: 1
# Number of hours forward to forecast, best left as-is unless you have specific reason
forecast_hours: 36
# Specify the devices that notifies are sent to, the default is 'notify' which goes to all
notify_devices: "mobile_app_sm_a336b"
# Battery scaling makes the battery smaller (e.g. 0.9) or bigger than its reported
# If you have an 80% DoD battery that falsely reports it's kwh then set it to 0.8 to report the real figures
# One per inverter
battery_scaling: 1.0
# Can be used to scale import and export data, used for workarounds
import_export_scaling: 1.0
# If you have a sensor that gives the energy consumed by your solar diverter then add it here
# this will make the predictions more accurate. It should be an incrementing sensor, it can reset at midnight or not
# It's assumed to be in Kwh but scaling can be applied if need be
iboost_energy_today: 'sensor.immersion_energy_today'
#iboost_energy_scaling: 1.0
# Gas rates for comparison
metric_octopus_gas: 're:(sensor.(octopus_energy_|)gas_[0-9a-z]+_[0-9a-z]+_current_rate)'
# Nordpool market energy rates
futurerate_url: 'https://dataportal-api.nordpoolgroup.com/api/DayAheadPrices?date=DATE&market=N2EX_DayAhead&deliveryArea=UK¤cy=GBP'
futurerate_adjust_import: true
futurerate_adjust_export: false
futurerate_peak_start: "16:00:00"
futurerate_peak_end: "19:00:00"
#futurerate_peak_premium_import: 14
#futurerate_peak_premium_export: 6.5I'm running 4 scripts to control the Inverter. sequence:
- delay:
hours: 0
minutes: 0
seconds: 1
milliseconds: 0
- data:
minimum_soc: "{{states('input_number.predbat_target_soc')|int}}"
action: script.set_minimum_soc
enabled: true
- metadata: {}
data:
option: "True"
target:
entity_id: select.daily_energy_battery_grid_charge
action: select.select_option
- action: switch.turn_off
metadata: {}
target:
entity_id: switch.garage_iboost_control
data: {}
note: >
Turning off the switch enables the iBoost CT sensor and the immersion
heats with excess solar.
fields: {}
alias: predbat_start_charging
description: Start charging to defined SOC. Also called for Hold Charging.predbat_stop_charging sequence:
- if:
- condition: state
entity_id: binary_sensor.target_timeframes_octopus_energy_octopus_plunge_pricing
state:
- "on"
then:
- metadata: {}
data:
minimum_soc: 100
action: script.set_minimum_soc
note: Set SOC to 100%
enabled: true
- action: notify.send_message
metadata: {}
target:
entity_id: notify.robs_phone
data:
title: Predbat
message: Charging Stopped, Plunge Pricing On
else:
- metadata: {}
data:
minimum_soc: 5
action: script.set_minimum_soc
note: Set SOC to 5%
enabled: true
- action: script.victron_ess_mode_optimized_without_battery_life
data: {}
enabled: true
- metadata: {}
data:
option: "False"
target:
entity_id: select.daily_energy_battery_grid_charge
action: select.select_option
- action: notify.send_message
metadata: {}
target:
entity_id: notify.robs_phone
data:
message: Charging stopped
title: Predbat
fields: {}
alias: predbat_stop_charging
description: ""predbat_start_discharging sequence:
- delay:
hours: 0
minutes: 0
seconds: 1
milliseconds: 0
- action: switch.turn_on
metadata: {}
target:
entity_id: switch.garage_iboost_control
data: {}
note: >-
Turning on the switch disables the iBoost CT sensor and the immersion
heater is off.
- action: script.victron_ess_mode_optimized_without_battery_life
data: {}
- data:
minimum_soc: "{{states('input_number.predbat_target_soc')|int}}"
action: script.set_minimum_soc
enabled: true
- note: Export is controlled by input_number.predbat_battery_discharge_rate
action: script.1704635957615
metadata: {}
data:
grid_setpoint: "{{(-1*(states('input_number.predbat_battery_discharge_rate')|int))}}"
fields: {}
alias: predbat_start_discharging
description: Predbat start discharge at input_number.predbat_battery_discharge_ratepredbat_stop_discharging sequence:
- data:
grid_setpoint: "{{states('input_number.default_grid_setpoint')|int}}"
action: script.1704635957615
- action: script.victron_ess_mode_optimized_without_battery_life
data: {}
- if:
- condition: state
entity_id: input_boolean.holiday_mode
state:
- "off"
then:
- action: switch.turn_off
metadata: {}
target:
entity_id: switch.garage_iboost_control
data: {}
note: >
Turning off the switch enables the iBoost CT sensor and the immersion
heats with excess solar.
- metadata: {}
data:
minimum_soc: 5
action: script.set_minimum_soc
enabled: true
- metadata: {}
data:
option: "False"
target:
entity_id: select.daily_energy_battery_grid_charge
action: select.select_option
- action: notify.send_message
metadata: {}
target:
entity_id: notify.robs_phone
data:
message: Discharging stopped
title: Predbat
fields: {}
alias: predbat_stop_discharging
description: ""
|
|
OK I'll have a go at a wordy description of what I'm doing. Also please understand that I am evolving my scripts too. I've now added slow charging and discharging options, which seem to work very well. I'll come back to that later. In my experience with Victron, since my install in Dec 2023. This is how I controlled the system from the start, developing sensors and control scripts. Discharging Moving to using Predbat Hold Charging and Hold Discharging Hope this helps. |
|
Adjusting the charge and discharge rates Discharge rate Charge rate Predbat_start_charging script sequence:
- delay:
hours: 0
minutes: 0
seconds: 1
milliseconds: 0
- variables:
charge_current: '{{(states(''input_number.predbat_battery_charge_rate'')|float / 55)|int }}'
note: Calculate the charge current (power/55V)
- action: script.set_max_charge_current
metadata: {}
data:
dvcc_max_charge_current: '{{charge_current}}'
note: Set the DVCC charge current
- data:
minimum_soc: '{{states(''input_number.predbat_target_soc'')|int}}'
action: script.set_minimum_soc
enabled: true
- metadata: {}
data:
option: 'True'
target:
entity_id: select.daily_energy_battery_grid_charge
action: select.select_option
- action: switch.turn_off
metadata: {}
target:
entity_id: switch.garage_iboost_control
data: {}
note: >
Turning off the switch enables the iBoost CT sensor and the immersion
heats with excess solar.
- action: notify.send_message
metadata: {}
target:
entity_id: notify.robs_phone
data:
message: >
{{states('predbat.status')}} to {{states
('input_number.predbat_target_soc')}}%
title: Predbat
enabled: false
fields: {}
alias: predbat_start_charging
description: Start charging to defined SOC. Also called for Hold Charging.Predbat_stop_charging Script sequence:
- if:
- condition: state
entity_id: binary_sensor.target_timeframes_octopus_energy_octopus_plunge_pricing
state:
- 'on'
then:
- metadata: {}
data:
minimum_soc: 100
action: script.set_minimum_soc
note: Set SOC to 100%
enabled: true
- data:
minimum_soc: '{{states(''input_number.predbat_target_soc'')|int}}'
action: script.set_minimum_soc
enabled: false
- action: notify.send_message
metadata: {}
target:
entity_id: notify.robs_phone
data:
title: Predbat
message: Charging Stopped, Plunge Pricing On
else:
- metadata: {}
data:
minimum_soc: 5
action: script.set_minimum_soc
note: Set SOC to 5%
enabled: true
- data:
minimum_soc: '{{states(''input_number.predbat_target_soc'')|int}}'
action: script.set_minimum_soc
enabled: false
- action: script.victron_ess_mode_optimized_without_battery_life
data: {}
enabled: true
- metadata: {}
data:
option: 'False'
target:
entity_id: select.daily_energy_battery_grid_charge
action: select.select_option
- action: notify.send_message
metadata: {}
target:
entity_id: notify.robs_phone
data:
message: Charging stopped
title: Predbat
- action: script.set_max_charge_current
metadata: {}
data:
dvcc_max_charge_current: -1
fields: {}
alias: predbat_stop_charging
description: ''Set Max Charge Current Script sequence:
- if:
- condition: template
value_template: '{{dvcc_max_charge_current <0}}'
then:
- data:
hub: victron
address: 2705
slave: 100
value: '{{ (dvcc_max_charge_current + 65536)| int }}'
action: modbus.write_register
else:
- data:
hub: victron
address: 2705
slave: 100
value: '{{dvcc_max_charge_current | int}}'
action: modbus.write_register
icon: mdi:battery-charging-100
fields:
dvcc_max_charge_current:
selector:
number:
min: -1
max: 200
unit_of_measurement: A
step: 1
default: -1
required: true
mode: single
description: ''
alias: Set Max Charge Current
Hope this helps |
|
Here's my setup I have two PV arrays, one DC coupled (feeding the MP2/batteries) and one AC coupled I've made various Integral and Utility Meter helpers attached to the GX device for the missing native energy tracking sensors Start charging: Stop Charging Start Discharging Stop Discharging |
|
hi, I'm looking for an example victron inverter predbat yaml to start from, can someone help? I have the "tomer-w/ha-victron-mqtt" MQTT integration working already (for some time). |

Uh oh!
There was an error while loading. Please reload this page.
Victron Multiplus and other inverters have an integration to Home Assistant already and also have available MQTT and Modbus over TCP interfaces. Would it be possible to add this to a development queue for future integration? I have implemented predbat with GivTCP and GivEnergy for friends but developing an integration is not something I can do!
All reactions