weymann / OH3-SolarForecast-Drops

Development Drops for openHAB binding SolarForecast
4 stars 0 forks source link

Site power estimate replaced by plane power estimate on midnight #5

Closed cwihne closed 4 months ago

cwihne commented 4 months ago

After midnight, past day's power estimation is significantly changed, replaced by a plane's forecast. power-estimate (overall estimation of bridge thing) becomes the timeseries of a single plane's estimation, in my case the 1st of 2 planes in my fs-site thing. The planes keep their earlier information, no changes. This results in bridge's site estimation not presenting the planes' sum, bridge's estimate equals one of the plane's estimates. As an effect, bridge's energy-estimate is calculated to a false value, roughly half the original value in case of about same production of both planes. The estimation is working correctly over the day. First item update after midnight lets past day's estimation change. Timeseries of power and energy estimations are persisted and shown in any past day's view. All past site estimations for power and energy are wrong.

I understand that persisting a forecast might not be of high value. Yet, the significant value change is wrong and invalidates the persisted data.

openHAB 4.2.0.M2 binding version 4.2.0 (OH4.2-1.1.1.rc), also saw this in earlier version.

weymann commented 4 months ago

I'm able to reproduce this issue. In work!

weymann commented 4 months ago

Error Scenario looks the following way. Two planes one bridge and the table shows who is delivering which data:

1) Today Day 1 Day2 Day3
Plane 1 X X
Plane 2 X X
Bridge X X
2) After 00:00, first plane update Day 1 Day2 Day3
Plane 1 X X
Plane 2 X X
Bridge X (partly) X X (partly)

=> persistence of day 1 corrupted => day 3 reports only data from one plane

3) Second plane updates shortly after step 2) Day 1 Day2 Day3
Plane 1 X X
Plane 2 X X
Bridge X X

=> actual values fine again => persistence of day 1 stays corrupted

Bugfix The bridge shall only report values for timestamps which are covered by all planes. Step 2) needs to be adapted to this behavior

Day 1 Day2 Day3
Plane 1 X X
Plane 2 X X
Bridge X
cwihne commented 4 months ago

Tested with yesterday's 1.2.1-rc build. Above described issue is not reproducible with this version. Persisted item values remain valid after midnight without changes. Thank you, @weymann , looking forward to finding this binding in official releases.