Skip to content

Fixed solar battery calculation logic, breaking change! now supports battery export to grid#215

Open
TrystanLea wants to merge 165 commits into
masterfrom
mysolarpvbatteryfix
Open

Fixed solar battery calculation logic, breaking change! now supports battery export to grid#215
TrystanLea wants to merge 165 commits into
masterfrom
mysolarpvbatteryfix

Conversation

@TrystanLea
Copy link
Copy Markdown
Member

@TrystanLea TrystanLea commented Mar 13, 2026

Calculations are fixed in the detailed power view so far, still need to fix the historic daily kWh data view.

image

See also: https://community.openenergymonitor.org/t/my-solar-pv-battery-app/14113/152

Comment on lines +276 to +280
// If the feed is more than 1 hour behind then start the view at the end of the feed
if ((view.end*0.001-power_graph_end_time)>3600) {
view.end = power_graph_end_time*1000;
autoupdate = false;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I keep this app open in a tab on my phone, and check on it periodically throughout the day. Trouble is, whenever the web browser is suspended and later resumed, the app will jump to an old time period.

I find it works better without this block so that autoupdate stays on and refreshes to the current time.

Suggested change
// If the feed is more than 1 hour behind then start the view at the end of the feed
if ((view.end*0.001-power_graph_end_time)>3600) {
view.end = power_graph_end_time*1000;
autoupdate = false;
}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @MrTimbones ! I will get back to you properly on the forum thread as well soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants