[APP][Pro] Victron Energy

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 different device types use different UnitId’s to read and write information. All Connectivity from the Victron Homey app is to your GX device, never directly to any other device (e.g. EV Charger). The add device view will show the UnitId you need to find by displaying something similar to com.victronenergy.vebus, com.victronenergy.battery, or com.victronenergy.grid

To see a list of available devices, and their Address, go to Settings → Services → Modbus/TCP → Available services

Victron GX device type

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

  • 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 off

    Modbus info
    UnitId: com.victronenergy.system
    Address: 806

  • Switch relay 2 on/off
    Turn relay 2 on your GX device on or off

    Modbus 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. Setting Control charge current to Yes 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.

  1. ssh-keygen -t rsa
    Don’t enter a pass phrase
  2. 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.
  3. 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.
  4. 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 :smile:

4 Likes

Screenshot from the app

1 Like

That“s what i was waiting for :+1: :+1: :+1:

Hi!

Excellent app for Homey.

Any chance that you can add ā€œTime since last full chargeā€ to trigger or condition? This way I would be able to force a full charge every XX hours from the grid - I combine that with Tibber integration in homey so that I only charge up the batterybank when its Very Cheap price on the grid.

/Kaj

Hi!
Sorry for the slow response.
Feels like I need to understand a little more of the use case to understand what the need is.
Fully charge should be taken from the battery state of charge, when it hits 100% we set a timestamp, then using a condition you can check how many minutes(?) it was since last time the state of charge was 100%?

There is a new test version of the app available, 0.9.6.
There are some new features related to vehicle charging. I myself reduce max discharge from the battery when a vehicle is charging.
There is also a feature to automatically control charge current based on state of charge.
The settings for these new features are in advanced settings on the device.

When using Victron Smart Shunt (or their regular shunt) connected to the GX device it reports, among other stuff, time since last full charge.

in victron dbus world its the following register/value. Can that be accessed over MQTT?

com.victronenergy.battery/History/TimeSinceLastFullCharge

Is a Victron shunt a requirement to see the History values? I can read those values via modbus on my setup but they all return 0.

Another ā€œissueā€ is that we in such a case need to map how to address the dbus-service-name for the service com.victronenergy.battery. In my setup this is Unit ID 225 (CAN-bus BMS).
The mapping can be seen in menu ā€œSettings → Services → Modbus/TCP → Available servicesā€. Wonder what Unit IDs people have here in their setups.

In my install its Unit ID 226 (com.victronenergy.battery).

Would a solution be to have a input field where one has to define the Shunts ID?

I need to doublecheck with a MQTT client to my GX device that its the only place in the mqtt flow that shows time since last charge. Since the charger/inverter keeps tab of the SOC if there isnt any external shunt / BMS connected it might have that information somewhere else aswell.

/Kaj

@KajLehtinen Test version 0.9.7 allows you to select com.victronenergy.battery and see value of time since last full charge in advanced settings, info section + a condition to query it. Please try it out and let me know what you think.

The test version is as always available here

Hello,
My system use a UnitId for com.victronenergy.vebus that is not listed as an option, it is 228.
Can you please add it, i love to use these app for my homey.

Aaron

Somehow missed your reply, when setting the correct ID in Advanced settings it seems to pickup the right time in seconds since last full charge as what the Victron app & the Smartshunt reports.

Will redesign my charging flows to incorporate the time since full charge and let you know if there are any incosistencys

/Kaj

1 Like

There is a new test version available (0.9.9) which includes vebus id 228 - let me know if it works as expected.

Hi, in my GX device the com.victronenergy.battery Unit ID is 224 which is not an option in the setup. Could you please add ID 224
Regards Ad

Version 1.0 on it’s way :+1:

Version 1.0.1 in test phase.
Changes the consumption property of the device to be recognised in Homey Energy as a smart meter.

1 Like

Thanks for the update, GX is connected to Homey now. Next step is using the possibilities

1 Like

I’ve been searching for a 12V system that could be connected to Homey. So Victron seemed like the right choice and in combination with this app it would be great.

So now I’m done with this but I’m not able to connect it to Homey. As I almost only use 12V I have no big inverter. I have a small one but it’s connected by VE Direct.

But if I understand it right I need an inverter connected by Vebus, so I can get a valid UnitId for com.victronenergy.vebus, to be able to connect it to Homey. Or am I missing something?

Hello, I have a Problem about integrating the GX into the Homey system
I know the IP address of the GX and also the Victron VEBus ID.
But I don’t have the Battery ID. Can anyone help me ?
The error message is: Connected successfullyton GX Device but Victron Energy Battery ist invalid

Thanks

anyone an idea ?