question

ekkesa avatar image
ekkesa asked

Modbus - Energy Used Values (From Grid / To Grid)

I have been trying to replicate the information as displayed on VRM from the values available on Modbus, but have not been very successful. I have found a few posts/questions which touches on this, but I have not been able to succeed.

Use Case: These values will be captured in HA. By substracting the two values from one another I would like to regulate the PV generation to keep the "From Grid" value just above zero. The calculations in HA is the easy part, but getting the correct values to work with seems challenging.


1. Is it possible to recreate these values from VRM?

1621950843193.png

2. If so, could it be possible to assist with the registers/dbus paths used to achieve this.


Any assistance will be greatly appreciated.


System:

Victron Multiplus II

MPPT 250/100

Grid Meter ET112

Pylontech Batteries

AC-Coupled SMA Inverter on AC1



Modbus TCP
1621950843193.png (15.8 KiB)
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

1 Answer
wim-immelman avatar image
wim-immelman answered ·

I have done just this with HA, but there are slight discrepancies in the values I read from modbus and those displayed in VRM (about 5% diff at max). I'm reading the following registers:

- name : Energy From Net scan_interval : 5 unit_of_measurement : "kWh" data_type : uint scale : 0.01 slave : 30 address : 2603
- name : Energy To Net scan_interval : 5 unit_of_measurement : "kWh" data_type : uint scale : 0.01 slave : 30 address : 2606


This will give you accumulated energy imported and exported. I'm not sure if this is for the last 30 days or since the GX device have been restarted - I have yet to test this. However, I use a 4 statistics sensors to give me the difference (distance) between upper and lower values over a fixed period of time:

- platform : statistics name : "Energy To Grid Last 24 Hours" entity_id : sensor.energy_to_net state_characteristic : distance_absolute sampling_size : 18000 precision : 0 max_age : hours : 24
- platform : statistics name : "Energy From Grid Last 24 Hours" entity_id : sensor.energy_from_net state_characteristic : distance_absolute sampling_size : 18000 precision : 0 max_age : hours : 24
- platform : statistics name : "Energy To Grid Last 7 Days" entity_id : sensor.energy_to_net state_characteristic : distance_absolute sampling_size : 121000 precision : 0 max_age : days : 7
- platform : statistics name : "Energy From Grid Last 7 Days" entity_id : sensor.energy_from_net state_characteristic : distance_absolute sampling_size : 121000 precision : 0 max_age : days : 7


Hope this helps

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Related Resources