question

Johnson Lee avatar image
Johnson Lee asked

kWh Count for charging batteries from Grid or Generator

Hi guys

Is there some way to show the kWh count for charging batteries from Grid or Generator? Can this be done via NodeRed/Signal K?

Thanks!

battery chargingESSVRM
1 comment
2 |3000

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

Robert avatar image Robert commented ·
Hello, when i read the manual from ET112 or EM112 should both parts theoretically works for this.

But not 100% sure, how it look's on a VRM screen.

Best regards Robert



1 Like 1 ·
1 Answer
Jons Collasius avatar image
Jons Collasius answered ·

I'm using Modbus TCP with Home Assistant.


Take this for refference

https://www.victronenergy.com/upload/documents/CCGX-Modbus-TCP-register-list-2.90.xlsx

https://www.victronenergy.com/live/ccgx:modbustcp_faq


Here are the Unit IDs and Addresses for your counters:

Unit ID 227 Address 76 "Energy from AC-In 1 to battery"

Unit ID 227 Address 80 "Energy from AC-In 2 to battery"

Unit ID 227 Address 92 "Energy from AC-out to battery (typically from PV-inverter)"


#Home Assistant implementation
modbus:
  - type: tcp
    host: 10.0.0.50  # use the IP address of your CCGX
    port: 502
    name: victron
    sensors:
    - name: victron_energy_from_ac_in_1_to_battery_raw
      unique_id: victron_energy_from_ac_in_1_to_battery_raw
      unit_of_measurement: "kWh"
      slave: 227
      address: 76
      data_type: uint32
      scale: 0.01
      precision: 2
      scan_interval: 60
      device_class: energy
      
    - name: victron_energy_from_ac_in_2_to_battery_raw
      unique_id: victron_energy_from_ac_in_2_to_battery_raw
      unit_of_measurement: "kWh"
      slave: 227
      address: 80
      data_type: uint32
      scale: 0.01
      precision: 2
      scan_interval: 60
      device_class: energy
      
    - name: victron_energy_from_ac_out_to_battery_raw
      unique_id: victron_energy_from_ac_out_to_battery_raw
      unit_of_measurement: "kWh"
      slave: 227
      address: 92
      data_type: uint32
      scale: 0.01
      precision: 2
      scan_interval: 60
      device_class: energy

template:
  - sensor:
    - name: "victron_energy_from_ac_in_1_to_battery"
      unique_id: "victron_energy_from_ac_in_1_to_battery"
      unit_of_measurement: 'kWh'
      state_class: "total_increasing"
      device_class: "energy"
      state: "{% if is_number(states('sensor.victron_energy_from_ac_in_1_to_battery_raw')) %}{
  
  { (states('sensor.victron_energy_from_ac_in_1_to_battery_raw')) }}{% endif %}"

    - name: "victron_energy_from_ac_in_2_to_battery"
      unique_id: "victron_energy_from_ac_in_2_to_battery"
      unit_of_measurement: 'kWh'
      state_class: "total_increasing"
      device_class: "energy"
      state: "{% if is_number(states('sensor.victron_energy_from_ac_in_2_to_battery_raw')) %}{
  
  { (states('sensor.victron_energy_from_ac_in_2_to_battery_raw')) }}{% endif %}"

    - name: "victron_energy_from_ac_out_to_battery"
      unique_id: "victron_energy_from_ac_out_to_battery"
      unit_of_measurement: 'kWh'
      state_class: "total_increasing"
      device_class: "energy"
      state: "{% if is_number(states('sensor.victron_energy_from_ac_out_to_battery_raw')) %}{
  
  { (states('sensor.victron_energy_from_ac_out_to_battery_raw')) }}{% endif %}"
2 |3000

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