-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add in battery #23
Comments
Thank you for this feature request. It has been asked before also. Not that I will process this immediately, but if you can share (Q1) an example of the extra sensor data (e.g. is it 1 or 2 sensors c.q. what does a positive value mean) that would be helpful for implementing (some time in feature, maybe, no promises ;-) ). And I don't own a battery myself, so it would be interesting to know (Q2) if people could have 'other lines in the diagram' as well. I'd rather hope not (because I like the simplicity of your diagram) but I can image people saying 'my setup requires a line drawn from solar to battery directly'. What if the battery doesn't have power anymore to support the house? (Q3) Will there be a line between grid and house directly? Or could it be that for some setups there will be a line between grid and battery? Questions, questions, maybe I should get a battery first. Haha. :-D |
Good questions! Let me have a think but more than happy to send you data etc :) I'll have a think about the other questions! |
Good job, Gerben! I like your way to keep it simple.
Let me know if I can be of help. |
Thanks for your thoughts and answers about adding a battery to the card. I'm not sure if just one extra battery sensor will give enough information to display all 3 extra lines. If I would make an early version of the card that supports a battery I would start with only House --> Battery and Battery --> House. That suits the most to the physical sensor setup. A then use that as a starting point to improve it further. Q4: Do you also have a sensor (apart from the one in kW) that measures energy (in kWh) for charging/discharging the battery? Because those kind of sensor(s) would be needed for the 'energy view' of the card. |
Sorry for not getting back to you on the above a while back! on Q4 - Yes and no - the tesla local api gives you a % full. However if you know that each powerwall is 13.5kwh of storage you could work it out and put that into another templated sensor. |
House --> Battery and Battery --> House would be completely OK. |
On the See here for troubleshooting: https://github.com/gurbyz/power-wheel-card/wiki 0.0.16-devNew features
As said, it's very basic and it only has an extra line between Home and Battery. The nett value of the Battery is added to the Home value. So if you are discharging the battery with 50W, your Home will get 50W added to its value. And vice versa. I hope you get it running and can give some feedback. What will help is to have two power-wheel-cards setup, one with and one without the battery sensor added to its setup. Then you are able to see the differences in values. |
Thats some quick work! Thanks @gurbyz ! I'll try and get this setup sometime this week - my Home Assistant Lovelace interface needs some serious love! |
That's great, thanks! I'll report to you soon. |
With my battery I can charge it from the grid
…On Thu, 19 Sep 2019, 19:15 Gerben ten Hove, ***@***.***> wrote:
Thx for your answer. Especially for the no-hurry part. Time is always a
problem here. ;-)
Maybe place the Battery in the top-right corner? Then I can get rid of the
'charging through the house' situation. Like this:
House is driven by PV AND Battery
[image: House is driven by PV AND Battery]
<https://user-images.githubusercontent.com/3920372/65268417-64009000-db17-11e9-9de5-86fd0a0d18ba.jpg>
PV drives House AND charges the Battery
[image: PV drives House AND charges the Battery]
<https://user-images.githubusercontent.com/3920372/65268443-724eac00-db17-11e9-81fd-19b21ba12b8b.jpg>
(Extra advantage: the card size stays the same for battery users and non
battery users. And for battery users that also use the *energy view*
and/or *money view*, there is also no switching of card sizes and thus no
rearranging of all the other cards when switching views.)
I'm not owning a battery, so here's Question5:
Q5: Can I do the assumption that (for your setup) the battery is never
being charged when there is no sun? So the grid never charges the battery?
And (difficult to answer) will that be the case for everyone with a battery
at house?
By the way, arrow values are hidden when they are equal to one of the
surrounding icon values. Otherwise you would see a lot of identical (and
redundant) values in the card.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#23?email_source=notifications&email_token=AAB3LLNATL2W7IWWHF3QXKTQKO6U7A5CNFSM4H35YYFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7ELT6Q#issuecomment-533248506>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAB3LLL7BX4SQLEGFHQVLYTQKO6U7ANCNFSM4H35YYFA>
.
|
Oow. That's a pity (for me and my proposal). Or is that an exceptional or rare situation? Do you find your setup in this situation often? (I can imagine that it's better to charge your battery with solar power than with grid power, because when the battery is full the unused solar power will flow back to the grid (often against a lower tariff)). Can you share a picture like the one in your starting post of this charging-from-the-grid situation? And maybe also one where you battery is charging-from-the-sun? |
Sure! The battery can charge from the grid overnight when it's cheap
electric, in the winter this is very common because there's not enough
excess solar to power the house when there's no sun
…On Thu, 19 Sep 2019, 19:55 Gerben ten Hove, ***@***.***> wrote:
Oow. That's a pity (for me and my proposal). Or is that an exceptional or
rare situation? Do you find your setup in this situation often? (I can
imagine that it's better to charge your battery with solar power than with
grid power, because when the battery is full the unused solar power will
flow back to the grid (often against a lower tariff)).
Can you share a picture like the one in your starting post of this
charging-from-the-grid situation? And maybe also one where you battery is
charging-from-the-sun?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#23?email_source=notifications&email_token=AAB3LLNJXLJGUFJCY4I3BHDQKPDKRA5CNFSM4H35YYFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7EPIEI#issuecomment-533263377>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAB3LLJDCK5C7AFAFYYQFRTQKPDKRANCNFSM4H35YYFA>
.
|
I agree with Dan, although this is a rare case (in the meanwhile) in Germany. But in many other countries it makes sense to charge the battery from grid. The card size could stay the same(?), and any case which I can think off should be possible:
|
I think that would work, and would even work if you didnt have any solar and just had a battery. Will try and a screenshot of it charging from the grid but a) it doesnt happen too frequently right now due to having enough solar and b) it only happens between 00.30 and 04.30 as thats when my off peak electric is :D But in essence it just draws a line between the grid and the battery |
Ok. That's all I wanted to know. Thx for all thinking, tips and suggestions. I pushed a new version to the
It's possible that there are edge cases in where the values are not correct. That's maybe because I used a couple of assumptions in this early version:
|
OK, this is no problem for me (also it's not so nice ;-) ). The value shown at the House seems to be not correct. This consumes only about 192W, for technical reasons a small part from the PV goes to the grid (this is no feed-in), about 110W, and the rest of the PV goes to the battery (4526W). In my current view it looks like this (Load = House): Could you check this? With respect to the SoC, it is really important to show the SoC of the battery in such a 'summary view'. Without that it would not make much sense for me. What about showing the charging power (4526W) at the arrow and the SoC instead of the charging power at the battery? |
I'm thinking about replacing the layout (much) later. The result will be something like your suggestion, but then with Home in the center instead of Battery. And curvy arrows for the outer circle. That will be a visual change, also for non-battery users, because from then on the battery will always be visible (although greyed for non-battery users) and the card really shows a 'wheel', hence power-wheel-card. :-) About the SoC: I understand it is very valuable to see it and that's why I implemented it. But I'm not happy with current solution, because all the values in the power view should have the same unit: e.g. Watt. And SoC is in %. Probably other users will start asking for PV-temperature and other non power stuff. ;-) There is a new version on the
Thank you for testing and seeing forward to the moment you will see switch the battery to the left of the card this evening. |
OK, this looks good now: Is it possible, to put the SoC inside of the battery icon? I have no idea, but this way it would not 'disturb' the power view (it just belongs to the battery, always and in every view). And a minor issue yet: I noticed that the arrow from PV to House sometimes (very shortly) changed the direction (from House to PV). Your calculation is certainly correct, technically this comes from my setup. But in fact a flow from House to PV is not possible, thus you could simply block this. I'm glad to hear that you are thinking about a new layout. I'm of course available for testing. |
I have to look into that. Probably there is an assumption in my code that every production-to-the-grid has to come from PV. And since the Battery is introduced, that's not valid anymore. Simply blocking an arrow is not a solution, because all the calculations are interacting with each other. And there are some people that want to see their PV inventer consumption at night, so a negative value for Sun. If there is a current of 171 W somewhere, it has to be displayed somewhere. |
0.1.0-devThe fix is there, but I took some time. Here's what I did:
The card is capable now for these battery scenario's:
Could you download the latest version |
About the scenario
This is your third screenshot (with the About the scenarios
and
Your second and fourth screenshot of the card have captured a scenario that the card is not yet able to handle. (NB. Mind the erroneous arrow in the fourth screenshot.) There are some assumptions in the design that are not met in your scenario:
In your case you are charging the battery when there is sun and you are charging from both the grid and the sun at the same time. I think I can partly detect this scenario, because your screenshots show the battery is charging with a greater value than the sun is producing. I'll have to dive into that later. Can you test another scenario? Charge the battery from the grid when there is no sun? Or is that something that would never happen? About
For the new layout I was not planning to do that. Battery will always be visible. I like the house in the center more, because that's the one that can consume only and you will be able to see who is powering it (grid, solar or battery) in a centered way. Thx again for testing and providing the screenshots! 0.1.0a-dev
|
Battery drives House: this is my normal mode at night. I'll test this in the evening.
--> 1. This is possible and I have another installation where I use this scenario frequently.
This can happen as I mentioned above. I'll test it in the evening. |
Thx for testing and supplying screenshots. I added a testcase for the scenario where there is some sun left and the home is consuming from the battery while also producing to the grid. (First two images of Frank's last message). I was able to get rid of some assumptions and implemented a few new:
Happy testing! :-D Version 0.1.0b-dev
|
Sorry for the late reply. |
Absolutely no problem! |
Thx! Aha, so it's not always like this ruleset:
Could you check if my current implementation works for SoC>50%? I'd like to know first if we reached that milestone that the first set of rules is okay before starting to work on the other ruleset and the threshold. I understand below a certain threshold of SoC the system is behaving differently. We have to find the exact definition of that second ruleset. (And it's nice to know if the PV/Battery setups of other users will behave the same. Do e.g. all users have this possibility to use a SoC threshold and is the second ruleset the same for everyone?) But let's find out your second ruleset. From your text and image I extracted this concept for a ruleset definition for SoC<50%:
|
OK, there's a little bit more than the first rule set. If you want to dig into more details, see here: At the moment I have SoC 61%, so I'm above the threshold (normal mode = first rule set): For the mode SoC < BL-SoC (dynamic threshold):
This is true as long as SoC < BL-SoC. |
Would it be possible to show the battery at all times? Even if it is not charging or discharging? Thanks Chris |
Great work. Joining beta soon |
Not in current implementation, because it has the battery icon in two places. But after the work to get it functionally right is finished, I will start working on UX. |
Still recovering from that comment. :-D :-D I still have to look into it. Got the feeling that I need more input parameters to get it right. |
I'm not sure we need to over complicate things with manufacturer specific implementations and algorithm. Generally power flows from PV to Battery, Grid to Battery and Battery to House. It should not flow from Battery to Grid, really. I've been using the dev branch for a couple of days and it generally works well. Thanks @gurbyz! |
Battery in the middle (like here: #23 (comment)) is probably the best... Had not noticed it yesterday, but here is the problem when charging the battery: |
Same here, i have the following sensor: |
How do i install the dev Version over the released one? And more important: When will the battery-feature be released? Seems to be a long time for testing... |
Please, uninstall your previously installed version. Then use the instructions in the README.md file. Search for the 'instructions' paragraph. The README.md file in the dev branch is more up to date now, because of the recent changes in Home Assistant where you have to put the
I will release the dev branch as soon as I have fixed my testing framework. web-components-tester / Jasmine has died and I'm in the process of converting to Karma / Mocha now. Please note that not issues are solved yet, but there are too many improvement in the code also for the rest of the card that I want to release. Battery support in the card will be in BETA. What does BETA mean: expect issues! There are known and unknown issues to be solved. The values and arrows don't show correctly all the time. The layout isn't even worked on yet. It's just the same layout as before and the battery icon(s) have been placed (split up) in available space for now. |
In preparation of release 0.1.0 where the battery support is released as BETA, I close this issue topic. I'll transfer all layout suggestions to this new topic for layout suggestions ONLY. You can add new suggestions there. I'll transfer all unsolved issues to separate new topics in the next coming days. Then I will release the feature in the master branch. It will get available in HACS. You can add new issues after that of course, but please use a new issue topic per new issue. Check if your (exact) issue is mentioned already. Want to discuss non issue related and non layout suggestion related things? There's a place for that on the HA forum in this discussion topic. This text will be part of the new README: Battery support in the power-wheel-card is currently a BETA feature. Many people asked for it and many people helped during development. Thx!
For now battery support is implemented with a set of rules in mind. The ruleset is very basic and not complete.
I think that the ruleset can be extended but possibly only by supplying an extra input parameter to the card. For now battery support is implemented in the current layout grid. This is why the battery shows up in two different places and is visible only when in use. This however should be temporary. |
thanks @gurbyz for all your work on this! |
posting scenario: |
|
If we have battery in/out figures could this component be updated to include battery too?
Like the tesla one
The text was updated successfully, but these errors were encountered: