emhass
emhass copied to clipboard
Adjust PV forecasts
This PR will propose a new method to adjust the current prediction for PV power production forecast. This can be very useful to adapt the prediction to local conditions. This should work for either specific conditions with your solar panel such as special shading problems, or even provide a correction based on your specific micro-climate conditions of your environment. We will use the already available methods using machine learning
Codecov Report
Attention: Patch coverage is 88.33333% with 14 lines in your changes missing coverage. Please review.
Project coverage is 65.80%. Comparing base (
ced5467) to head (bd12696). Report is 23 commits behind head on master.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| src/emhass/command_line.py | 72.41% | 8 Missing :warning: |
| src/emhass/forecast.py | 92.98% | 4 Missing :warning: |
| src/emhass/utils.py | 93.10% | 2 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #476 +/- ##
==========================================
+ Coverage 65.24% 65.80% +0.56%
==========================================
Files 8 8
Lines 3070 3150 +80
==========================================
+ Hits 2003 2073 +70
- Misses 1067 1077 +10
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
What is still needed for PV adjust: (UPDATE)
- [x] ~~Need to create a common method to retrieve data from HA in
command_line.py~~- ~~Before we retrieved only for perfect optim and MPC (for the now functionality)~~
- ~~Now we will need to retrieve on the 3 cases: perfect, dayahead and MPC~~
- ~~See if the current implementations on perfect and MPC matches~~
- [x] ~~Define the new needed parameters >> see
test_forecast.py>>test_pv_forecast_adjust~~ - [x] ~~The
adjust_pv_forecastmethod in forecast.py still needs a data preparation method, similar to what is done ontest_pv_forecast_adjust~~
@davidusb-geek A thing that popped during an exeptionally sunny March week here in Belgium last week. If you set your inverter to curtail, the value in your sensor_power_photovoltaics will go down (for instance if you set your inverter to zero grid export when curtailmant has been foreseen by EMHASS). I guess that is something you have to consider when doing ML predictions on the difference between measured and predicted solar yield. I noticed I had to change my pv_power_forecast runtime parameter for mpc for this. I started with the actual value of sensor_power_photovoltaics as first value in the list but had to change that to solar+actual consuption (which should normally be the same as actual solar + predicted curtailment) to prevent flip flopping (curtailment on/off)
Added attempt to fix issue #495
Quality Gate passed
Issues
17 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
1.8% Duplication on New Code