% Solar Powered panel - is the query right? #190
Replies: 3 comments 2 replies
-
Good points. I debated if I should include it... but some background first. My goal was a meter to show percentage % of clean energy (self-generated solar) used to power the home. In my logic I couldn't give credit for pushing back to the grid because it isn't a battery. Sure you do get financial benefit for pushing to the grid but that wasn't the goal of this meter. Also, this was to be a pure percentage of "home usage" that was powered by solar, so a max of 100%. That means I needed to subtract from 100%:
I then decided I could simplify. Basically we only have two energy sources for our HOME (ok, I apologize to anyone with generators or domesticated nuclear power plants in their backyard): 1) GRID and 2) SOLAR. So at the most basic HOME = GRID + SOLAR. Powerwall to/from values represent energy storage inside the island (HOME). The final equation % SOLAR = ( HOME - GRID ) / HOME. Yes, that means it will almost never be exactly 100% unless we disconnect from the grid to force GRID to zero. This method appears to be close to what the Tesla app is using. It never goes above 100%, even when pushing power back to the grid. It also filters "out" the grid noise so that it does show 100% quite a bit. That would be a good enhancement for our dashboard meter too (filtering out the push/pull noise that happens just being connected to the grid). Here is an example where my net push back to grid is high, but my % Solar is only 99% - the Tesla App agrees: Anyway, that is the background on the meter. It made sense for me and my desire to understand how much my home was powered by renewable solar energy. It seems to match what the Tesla App is doing, but is it what everyone wants? This is why I was debating, I know many people consider the grid to be a battery. I believe @youzer-name suggestion would accomplish that. Additionally, while a bit different from that equation, Tesla App also has a similar meter called "Solar Offset". I'm curious, what do you all think we should do for the default dashboard? Keep, change, remove? 🤔 |
Beta Was this translation helpful? Give feedback.
-
Thanks for the explanation. There is nothing wrong with it if the intent is to match what the Tesla app is doing with their Self Powered number. I'm still a few weeks away from having a day with significant net export to the grid, so I'll get a different perspective on the meter when that happens. Using the default query shows "did I use the grid at any point?" and using the net grid value shows "did I produce as much power as I used?" I think both numbers are interesting and I may add the second stat to the panel or add a second panel to show the other one. In a few weeks the real fun will begin for modifying my dashboards. I'm adding 4.9kW of purchased panels to my 8kW Tesla PPA. The way they're going to hook them up, I think I'll only be able to see the combined solar input via the Powerwall gateway. Parsing out the separate values will involve pulling data from the SolarEdge API and subtracting it from the total to get the Tesla production, which means I might actually have to learn a little Python. Or I could not display the cost information in the dashboard and find something else to occupy my time. [ worried that I might get banned from the forum for even mentioning such a heretical idea 😄 ] |
Beta Was this translation helpful? Give feedback.
-
I don't have a Powerwall+. My existing inverter is a separate unit that was installed back in 2016 by Solar City/Tesla. As far as I know it doesn't have an API to pull data from it, but I'm pretty sure I can pull the data from the Tesla API if I want to. There are a few existing SolarEdge API projects on GitHub. I'll have to see which is the best fit for running alongside Powerwall Dashboard. If my limited understanding of the code is right, then https://github.com/salberin/Solaredge-influxdb looks like it communicates locally with a compatible inverter, and https://github.com/ndejong/solaredge-interface looks like it uses the SolarEdge web API. |
Beta Was this translation helpful? Give feedback.
-
I recently added the % Solar Powered panel to my dashboards, copying it from the main project dashboard. I'm wondering if the query used should be changed.
I've been on battery plus solar all day and the only grid use has been small amounts to or from. My max grid usage is showing 169W and my min grid use is about -227W.
My main stats panel says I've used 9.2 kWh today for home, with 15.7 wH(no kilo prefix) net from the grid. The % Solar Powered panel doesn't use the net grid usage, it only uses the from_grid number. So the question is, should exports to the grid be subtracted from the grid use when calculating percent solar?
Here is the math:
I've used 9.2 kWh total for home today. I've pulled ~119 Wh from the grid and sent ~104 Wh to the grid.
The original query is:
SELECT (home - from_grid) / home FROM
(SELECT integral("home") AS home, integral("from_grid") AS from_grid FROM "autogen"."http" WHERE $timeFilter )
Or: (9200 - 119) / 9200 = 98.7%
I've modified my panel to use the net grid value:
SELECT (home - from_grid + to_grid) / home FROM
(SELECT integral("home") AS home, integral("from_grid") AS from_grid, integral("to_grid") AS to_grid FROM "autogen"."http" WHERE $timeFilter)
Or: (9200 - 119 + 104) / 9200 = 99.8%
Should the % Solar Powered be more than 100% when you've net exported power to the grid? Or should it max out at 100% because you can't be more than 100% solar powered?
The way it is currently set up it seems it would never quite hit 100% due to the small transient to_grid values, but it also will never go over 100% since the limit is reached when the to_grid value = 0.
Beta Was this translation helpful? Give feedback.
All reactions