question

sanchosk avatar image
sanchosk asked

Pylontech battery - consumed amphours

So, I am one of many that have 3x MultiplusII and pack of Pylontech US5000 batteries.

Everything is great, the system works, charges and discharges using my AC-coupled solar, etc.

It recognizes the battery over BMS can bus, reports all indicators, except the battery history.

I would love to provide home assistant with the information, so it can show in energy monitor.

I found one project to read this information using the battery console port, translating it using RS232 to TTL chip into ESp8266 and reporting to MQTT. But this seems questionable to me - it feels like the same information should already be available to CerboGX and CAN bus connection with the battery.

But for some reason, Cerbo reports null for the value.

I've read multiple threads, where people suggested to fully charge the Pylontech and only then it starts to display the value, etc. I've tried that, to no avail, unfortunately.

There is also one 2 year old forum here with similar topic, no result.

Does anyone have any ideas on how to get the information without additional HW to be installed onto the battery by any chance?

cerbo gxPylontechbattery
3 comments
2 |3000

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

kevgermany avatar image kevgermany ♦♦ commented ·
@SanchoSK


Best asking this in the modifications space. I'll move it there.



0 Likes 0 ·
sanchosk avatar image sanchosk kevgermany ♦♦ commented ·
Thanks, this is my first post, not yet that familiar with the forum structure.
0 Likes 0 ·
kevgermany avatar image kevgermany ♦♦ sanchosk commented ·
Np, we try to help, not fight
0 Likes 0 ·
1 Answer
Kaj Lehtinen avatar image
Kaj Lehtinen answered ·

Hi,

I have almost the same setup except for UP2500 batteries (24 volt).

I use the following code in HA, taken from some post somewhere online, lost track of exactly where though.

sensors:
   - name: 'Battery Power System'
      unit_of_measurement: "W"
      slave: !secret com.victronenergy.system
      address: 842
      data_type: int16
      scale: 1.0
      precision: 0
      device_class: power

- platform: template
  sensors:
    multiplus_power_from_battery:
      friendly_name: 'Multiplus Power from battery'
      value_template: "{
  { max(0, 0 - states('sensor.battery_power_system') | float) }}"
      unit_of_measurement: "W"
      device_class: power
      
    multiplus_power_to_battery:
      friendly_name: 'Multiplus Power to Battery'
      value_template: "{
  { max(0, states('sensor.battery_power_system') | float) }}"
      unit_of_measurement: "W"
      device_class: power
- platform: integration
  source: sensor.multiplus_power_from_battery
  name: "Multiplus Energy from Battery"
  unit_prefix: k
  unit_time: h
  round: 2
  
- platform: integration
  source: sensor.multiplus_power_to_battery
  name: "Multiplus Energy to Battery"
  unit_prefix: k
  unit_time: h
  round: 2

The only problem with power to battery is that it sometimes, for the first grid charge hour of the day jumps incredibly high, like 25 KWh when it should be something like 0.4 kwh for a 10 min period.

That forces me to manually edit the statistics when it happens and unfortunately its more than once per week. I havent tracked down why it does this as my knowledge of yaml configs isnt that great.

I know this doesnt provide consumed AMP hours but it for showing consumption in the energy dashboard.

/Kaj

2 |3000

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