Blue Power
https://www.victronenergy.com/
App Store Page
https://homey.app/a/com.victronenergy
Description
Monitor and control your Victron system equipped with a GX device.
ESS Mode 2 is what is currently supported.
The app relies on the Modbus TCP API of the GX Devices.
I have a Cerbo GX, usually with the latest firmware version, and this is what the app is tested with.
Need to know before adding a GX Device to your Homey
- You need to know the IP number and port of your GX Device. Port is 502 by default.
- Your Homey needs to be able to connect to your GX Device via the network
- You need to enable Modbus TCP in your GX Device
By default, Modbus-TCP is disabled. To enable it, go into the settings menu, scroll down to āServicesā, and then enable the Modbus-TCP service.
- The information is read and written via Modbus using two UnitIdās;
100
which is forcom.victronenergy.system
, and to my understanding this is the same across all GX Devices. But forcom.victronenergy.vebus
,com.victronenergy.battery
andcom.victronenergy.grid
, which the app also relies on, the UnitId differs depending on your setup.
To see a list of available devices, and their Address, go to Settings ā Services ā Modbus/TCP ā Available services
Navigate the list of Available services and find com.victronenergy.vebus
and com.victronenergy.battery
. Note the UnitIds - you need to select this when adding a GX device to your Homey.
Victron GX device type
Capabilities
-
Consumption
Sum of all phases. Calculated by the formula: solar - battery + grid
As of version 1.0.1 the device is recognised in Homey Energy as a smart meter and consumption is counted as a total value. This is possible to change in the deviceās advanced settings to not be counted towards the total. -
Grid
Sum of all phases. A negative value means export, positive import.
You need to have a meter added to your system. I use this project to simulate an EM24 meter using my SMA Home Manager 2.0. -
Battery
A negative value means discharge, positive charge -
Solar
Sum of all phases. You need to have either Victron PV equipment part of your system or a 3rd party PV inverter that Victron supports. I have added my SMA Tripower. -
VE Bus status
10+ different statuses possible, for instanceBulk
-
Alarm
The capability shows statuses;Ok
,Warning
orAlarm
. This is calculated by checking the following alarms and warnings; Temperature, Low battery, Overload, Temperature sensor, Voltage sensor, Phase rotation, Grid lost and for each phase; Temperature, Low battery, Overload, and Ripple. -
Battery status
Idle
,Charging
orDischarging
-
Battery SoC
State of Charge in % -
Battery voltage
-
Battery current
A negative value means discharge, positive charge -
Switch position
Charger Only
,Inverter Only
,On
orOff
-
Grid lifetime import
Always shown, ifcom.victronenergy.grid
doesnāt exist or is not configured will display0
. -
Grid lifetime export
Always shown, ifcom.victronenergy.grid
doesnāt exist or is not configured will display0
.
Triggers
- Switch position changed
- Battery status changed
- VE Bus status changed
- Alarm status changed
- SoC changed
- Battery voltage changed
- Grid surplus changed
Conditions
- Switch position is
- Battery status is
- VE Bus status is
- Battery SoC is
- Consumption power is
- Grid power is
- Battery power is
- Solar power is
- Excess solar power is
PV power - consumption power - Grid setpoint is
- Max charge current is
- Max discharge power is
- Max grid feed-in power is
- Min SoC is
- AC loads are
- AC inputs are
- AC outputs are
- Time since last full charge is
Actions
-
Set switch position
Allows you to turn off or on the system, or charger vs inverter only.Modbus info
UnitId: com.victronenergy.vebus
Address: 33 -
Update grid setpoint (W)
A positive value means import from the grid, a negative value export to the grid. Default is 30W.Modbus info
UnitId: com.victronenergy.system
Address: 2700 -
Limit inverter power (W)
Maximum power in Watt that the Multi will feed to the loads.
(docs says -1 sets it back to unlimited, I donāt get this to work.)Modbus info
UnitId: com.victronenergy.system
Address: 2704 -
Limit charger current (A)
Only works when DVCC is turned on.- -1: No limit.
Solar Chargers and the Multi will charge to their full capacity or individual configured limits. - Any positive number: Maximum combined current in Ampere for battery charging. This limits the solar chargers and the multi, and takes loads into account. Solar chargers take priority over the Multi.
Modbus info
UnitId: com.victronenergy.system
Address: 2705 - -1: No limit.
-
Limit grid feed-in power
Maximum power in Watt to feed into the grid.
(docs says -1 sets it back to unlimited, I donāt get this to work.)Modbus info
UnitId: com.victronenergy.system
Address: 2706 -
Update minimum SoC (%)
Minimum state of charge in %, unless grid fails.Modbus info
UnitId: com.victronenergy.system
Address: 2901 -
Switch relay 1 on/off
Turn relay 1 on your GX device on or offModbus info
UnitId: com.victronenergy.system
Address: 806 -
Switch relay 2 on/off
Turn relay 2 on your GX device on or offModbus info
UnitId: com.victronenergy.system
Address: 807 -
Create charging schedule
Create any charging schedule, 1-5. Requires the config of ssh user and private key. -
Enable charging schedule
Enable any charging schedule, 1-5. Requires the config of ssh user and private key. -
Disable charging schedule
Disable any charging schedule, 1-5. Requires the config of ssh user and private key.
Settings
-
Charge current control
By default turned off. SettingControl charge current
toYes
means the app will automatically control the max charge current depending on the state of charge of the ESS. Please adjust the charge amp per state of charge interval to suit your needs. -
SSH
There are lots of tutorials out there on how to generate a public and private key to use for ssh authentication.
On Mac OS I did the following.
ssh-keygen -t rsa
Donāt enter a pass phrase- Copy the content of the public file (*.pub) to the file
~/.ssh/authorized_keys
on the GX device. Create the file if it doesnāt exist. - Test login from Mac using command
ssh -i ./id_rsa root@192.168.nnn.nnn
.id_rsa
in this case being the private key file. Enter the correct IP address of your GX device. If the login is successful continue to the next step. - Update config of the GX device in Homey. Enter
root
as user and paste entire contents of the private key file into key field.
Disclaimer
Use this app at your own risk.
Please note that an ESS is pretty complex stuff and it is easy to get lost and forget you had a flow that did this or that. You need to pay attention to the actions you use and if your system for instance is configured to charge using max 40 amps, then you shouldnāt set that to 200 amps and hope for the best.
As usual, any feedback is welcome