Any idea how to integrate battery charge / discharge into the HA energy graph? #37
Replies: 18 comments
|
home-assistant_victron_2025-01-07T12-34-20.338Z.log |
|
@RSickenberg , |
The issue is not about the battery not showing up but the senors |
|
@RSickenberg Those sensors are not always working and depending if the BMS supports this. In your Case with the Pylontech BMS doesnt support this. I had the same (also using pylontech). But there is a solution for this using HA helpers.
now we have to instances for charge and discharge power
The same can be done for discharge. These 2 entity you can now use in the Energy dashboard |
|
In my system with the Pylontech batteries the battery_history is also not working. I am using vebus sensors:
I made your sensors to and start to compare. |
|
I cant speak for the specific batteries mentioned above. One thing that could be preventing this (the case with my Freedom Won batteries), is that Victron GX devices (registers), does not support getting kWh from battery BMS that is connected via CANbus. I have been hoping that Victron would develop this ability over time, but nothing as yet. Therefore no sensor data to feed the Energy dashboard with kWh data, for Battery Charged Energy and Discharged Energy. It should be relatively simple coding in this integration, to use the data of V, A, etc, to produce new sensors with such data? I am hoping this could be something the owners of this integration can take on as a new feature? |
|
@mauricevanderlee You can indeed use that sensor but that will only work when you
@DJMAXIZA I actually never thought of this. That is a good idea to look in to. I will put it on the list |
|
Both of those are getting Templates
Probably an easier way, but I did this before the Intergation, and I was Modbus TCP direct. |
|
@remcom Oh my word i assumed the pylons could not do it all this time my energy chart is rubbish without it but you guys have my head spinning go to template make a helper template code {{ max(0, states('sensor.victron_system_battery_power_2') | float) }} use watts as unit, but is there no device class or anything is it just those two things and the name of the helper? |
|
Oh. forgot about those. Device class: power and state class: Measurement |
|
@remcom the integral sensor metric prefix are we using Killowats? |
|
that should be Kilowatthours (kWh). |
|
@remcom that bit only comes as a metric Killo Mega Giga Tera i assume because you use time in units thats what chages it to kWh |
|
Done thanks am I able to use that code for my Shelly to do the grid from
that and call it I the code sensor.shelly_em_power_2 ? And do the same
thing with the helpers as I don’t think the grid stuff is reading correctly
from Octopus’s end
…On Wed, 8 Jan 2025 at 16:51, Remco van Essen ***@***.***> wrote:
This is what it need to be. I did it out of the top of my head but i was
wrong. Set your precision on 2 or 3. not 0 as the screenshot
Screenshot.2025-01-08.at.17.49.46.png (view on web)
<https://github.com/user-attachments/assets/163e8818-25f6-41ec-90cd-e36566711b8a>
—
Reply to this email directly, view it on GitHub
<#13 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHJG2I3SWMIJUG4NYHKICXL2JVJQJAVCNFSM6AAAAABUXUIOSGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNZYGE2TGMZZGM>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
|
Have you looked at the dbus to see what data is coming off the battery bms? |
|
Yeah thanks but the pylontec’s can’t do it there BMS doesn’t do it but I
followed the guide now it’s working is it possible I can use the same thing
with my Shelly EM to get the grid as for some reason it won’t let me add
the entity in the energy data bit
…On Wed, 8 Jan 2025 at 19:28, fyrstyk ***@***.***> wrote:
Have you looked at the dbus to see what data is coming off the battery bms?
—
Reply to this email directly, view it on GitHub
<#13 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHJG2I3QSTVLGFX7NWE5TX32JV345AVCNFSM6AAAAABUXUIOSGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNZYGQ3DMMRQGA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I'm using sensor.victron_vebus_acin1toacout_227 for import and victron_vebus_invertertoacin1_227 for export. My Multi is on the main feed from the meter and the house is supplied by the Multi so I use the Multi for the grid values. |







Uh oh!
There was an error while loading. Please reload this page.
Hi,
Thanks for the fork and the work done yet, I'm re-trying this integration despite the cleanup needed to each sensors / options available. I'm here to support if needed with my solar / battery / charger installation.
I'm here now to "just" have an integration about the battery energy status who might be "wrong" or differently set.
I know what's the difference between a
Wand aWhbut I'm not an expert into the modusTCP available on all victron here.All reactions