Closed elRadix closed 2 years ago
Exactly the same issue... It is in my case indicating correctly if the battery should charge or discharge but the curve is definitely flat at zero...
Well I'm really glad people are interested in my extension! Thank you for the feedback. I'm guessing it's something to do with the sensor data maybe. Can you post any of the meter readings? How often are the readings from the utility meter, are the positive or negative? Are they in kwh?
yes they are both getting real time updates and are both positive
export sensor
import sensor
Ok, I'll have a think.
I think I might have fixed the bug. Can you update the integration and try again? If it's still not working then let me know. Thanks.
Ok, I'll let you know tomorrow when the sun is back.
This is a great project by the way, but i had to make a few Tweaks the sensor/py to get things to register and they may relevant to the above.
My Import/Export is live (second-by-second) kWh and noticed that the battery would charge/discharge well when there was large amounts of Energy moving. But the slight overnight discharge or when the generation was near equal to consumption was not being registered.
I increased the Float for the round from 2 up to 10 digits and now the Battery discharges at a much better rate.
(Almost) No discharge over night was the same thing that occured to my installation as well.
Well test with the new rounding setting from NBS 1997.
Similar here, came here to post something similar. Even took screenshots to see if it will help. I will also test now.
With these changes, mine is now working as expected. It is creating some very long outputs in terms of decimal places, but it is working nicely.
This is a great project by the way, but i had to make a few Tweaks the sensor/py to get things to register and they may relevant to the above.
My Import/Export is live (second-by-second) kWh and noticed that the battery would charge/discharge well when there was large amounts of Energy moving. But the slight overnight discharge or when the generation was near equal to consumption was not being registered.
I increased the Float for the round from 2 up to 10 digits and now the Battery discharges at a much better rate.
Similar here, came here to post something similar. Even took screenshots to see if it will help. I will also test now.
This is a different issue so I've opened a new issue for this and tried to implement a fix
Ok, I'll let you know tomorrow when the sun is back. @elRadix Is it working for you now? Thanks,
with the latest update, the battery is now working
created a template sensor
battery_energy_saved_lg16kw:
friendly_name: Battery Energy Saved LG16KW
unit_of_measurement: kWh
device_class: energy
value_template: '{{ (states.sensor.lg_chem_prime_16_kw.attributes.energy_saved
and then some battery utility meter for battery In and out
battery_sim_daily_lg16kw_in:
source: sensor.lg_chem_prime_16_kw
cycle: daily
battery_sim_monthly_lg16kw_out:
source: sensor.lg_chem_prime_16_kw
cycle: monthly
battery_sim_daily_lg16kw_out:
source: sensor.battery_energy_saved_lg16kw
cycle: daily
battery_sim_monthly_lg16kw_out:
source: sensor.battery_energy_saved_lg16kw
cycle: monthly
@elRadix : stupid question but how do you make a card with the attributes visible like in your first post?
I don't think that's a card, I think it's the entity view. If you go to configuration, entities and find the entity on the list and then click the sliders button in the top right. You can then expand the attributes section at the bottom.
you can this card
type: custom:entity-attributes-card
title: LG Battery 16KW
heading_name: List
heading_state: States
filter:
include:
- key: sensor.lg_chem_prime_16_kw.*
exclude:
- key: sensor.lg_chem_prime_16_kw.d*
- key: sensor.lg_chem_prime_16_kw.f*
- key: sensor.lg_chem_prime_16_kw.i*
- key: sensor.lg_chem_prime_16_kw.state*
- key: sensor.lg_chem_prime_16_kw.u*`
@elRadix : Perfect! Thank you.
created a template sensor
battery_energy_saved_lg16kw: friendly_name: Battery Energy Saved LG16KW unit_of_measurement: kWh device_class: energy value_template: '{{ (states.sensor.lg_chem_prime_16_kw.attributes.energy_saved
and then some battery utility meter for battery In and out
battery_sim_daily_lg16kw_in: source: sensor.lg_chem_prime_16_kw cycle: daily battery_sim_monthly_lg16kw_out: source: sensor.lg_chem_prime_16_kw cycle: monthly battery_sim_daily_lg16kw_out: source: sensor.battery_energy_saved_lg16kw cycle: daily battery_sim_monthly_lg16kw_out: source: sensor.battery_energy_saved_lg16kw cycle: monthly
Can you give more insight in how you did create this sensors and screenshot how you implemented this in Energy Management? I rather novice in writing yaml.
I've now added charging and discharging rates and daily energy counter to the attributes. I hope this will make this a bit simpler. Thinking about adding them as separate sensors rather than just attributes as well. What do you think?
@hif2k1 : In my opinion it would be easier to have almost all the attributes as another sensor. I (and I imagine most of the users) use it to see if a home battery is a usefull investment (in the winter the answer is no for me it seems unless I expand my solar panels greatly). I used Elradix template to view all attributes because only the battery percentage is fairly useless. I would be easier for users from HA like me who doesn't write complicated automatisations but just use a couple of integrations and expect it to 'just' work.
created a template sensor
battery_energy_saved_lg16kw: friendly_name: Battery Energy Saved LG16KW unit_of_measurement: kWh device_class: energy value_template: '{{ (states.sensor.lg_chem_prime_16_kw.attributes.energy_saved
and then some battery utility meter for battery In and out
battery_sim_daily_lg16kw_in: source: sensor.lg_chem_prime_16_kw cycle: daily battery_sim_monthly_lg16kw_out: source: sensor.lg_chem_prime_16_kw cycle: monthly battery_sim_daily_lg16kw_out: source: sensor.battery_energy_saved_lg16kw cycle: daily battery_sim_monthly_lg16kw_out: source: sensor.battery_energy_saved_lg16kw cycle: monthly
Can you give more insight in how you did create this sensors and screenshot how you implemented this in Energy Management? I rather novice in writing yaml.
In answer to this question, this is what I have setup to get this working. Note that the attributes now include a "daily energy saved" so most likely you could use that instead of setting up a daily/monthly utility meter, but I have done it this way as I adapted it from the old method.
You'll have to specify your own sensor for the input data, mine being sensor.tesla_powerwall so just replace my instances of that with whatever your own battery shows up as.
sensor:
- platform: template
sensors:
battery_energy_saved_tp:
friendly_name: Battery Energy Saved Tesla Powerwall
unit_of_measurement: kWh
device_class: energy
value_template: '{{ (states.sensor.tesla_powerwall.attributes.total_energy_saved) }}'
utility_meter:
battery_sim_daily_tp_in:
source: sensor.tesla_powerwall
cycle: daily
battery_sim_monthly_tp_in:
source: sensor.tesla_powerwall
cycle: monthly
battery_sim_daily_tp_out:
source: sensor.battery_energy_saved_tp
cycle: daily
battery_sim_monthly_tp_out:
source: sensor.battery_energy_saved_tp
cycle: monthly
I've now added charging and discharging rates and daily energy counter to the attributes. I hope this will make this a bit simpler. Thinking about adding them as separate sensors rather than just attributes as well. What do you think?
Yes please.
Different sensors would make it a lot simpler to utilise.
Sensors that can feed the energy dashboard directly would be ideal.
I've now added charging and discharging rates and daily energy counter to the attributes. I hope this will make this a bit simpler. Thinking about adding them as separate sensors rather than just attributes as well. What do you think?
Yes please.
Different sensors would make it a lot simpler to utilise.
Sensors that can feed the energy dashboard directly would be ideal.
Fully agree with that. My goal is to test the simulation for a longer period to determine if the ROI is feasible.
OK, thanks. I'm just testing a release of multiple sensors/entities. Had a few bugs, but should be ready soon.
On Sun, 6 Feb 2022, 09:59 Geert van BinnenBeest.be, < @.***> wrote:
I've now added charging and discharging rates and daily energy counter to the attributes. I hope this will make this a bit simpler. Thinking about adding them as separate sensors rather than just attributes as well. What do you think?
Yes please.
Different sensors would make it a lot simpler to utilise.
Sensors that can feed the energy dashboard directly would be ideal.
[image: Screenshot_20220206-194720] https://user-images.githubusercontent.com/79175134/152675472-52409103-035f-42e0-b688-588feb1862d5.png
Fully agree with that. My goal is to test the simulation for a longer period to determine if the ROI is feasible.
— Reply to this email directly, view it on GitHub https://github.com/hif2k1/battery_sim/issues/3#issuecomment-1030798879, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFAIZGIV7CHWWN4FYAYJYXLUZZBB3ANCNFSM5GQJYTBA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID: @.***>
Latest release has individual sensors for most attributes. Haven't got one for money saved yet because I need to figure out how to handle the units, but will try to do this too.
Latest release has individual sensors for most attributes. Haven't got one for money saved yet because I need to figure out how to handle the units, but will try to do this too.
To explain myself I doubt that it’s feasible to invest in a LG Chem battery infrastructure. Measurement and simulation can help me to determine the feasibility. So I only need to know the amounts of kWh I can save on one year.
I added both sensor but nothing is happening, those are the sensor that used in the energy consumption and both are in kWh. Both are created from a template sensor coming from an utility meter as basis. I am using a P1 meter to collect the data. see below config and screenshot