Skip to content

Commit 10c4f39

Browse files
dandwhelanclaude
andcommitted
Merge upstream springfall2008/batpred v8.48.1 into the fork
Brings in 65 upstream commits on top of the Pi's local work. 43 non-test source files merged with no conflict at all; the six that did are resolved so both sides survive rather than one overwriting the other: - axle.py: upstream's springfall2008#4520 fix (an export event boosts the import rate too, since charging during the window carries the same opportunity cost) kept, wrapped in this fork's guard that only applies minutes the rate data still covers, so a session that has scrolled out is not re-applied every run. - inverter.py: upstream's two-source readback (Control.Discharge_Target_SOC_1 first, raw.invertor as fallback) and its "unreadable register is left alone" guard, plus this fork's rest_write_acknowledged() fallback for hardware where the register is absent from GivTCP's read map entirely and no readback can ever confirm a write that did land. The two cases are distinct and both are now handled. - predbat.py: fork version string and watchdog constants kept. - annual.py: upstream's baseline_tariff threading applied to BOTH the gas and the heat pump leg - the two legs' no_pvbat scenarios are differenced against each other, so pricing one on the baseline tariff and the other on the main tariff would bias the heating answer. - web_annual.py: upstream wins on the Octopus load-source prefill. Its reasoning applies directly here: the import meter already has PV and battery self-consumption subtracted, so modelling a system on top double-counts. The predheat heating prefill, which upstream has no equivalent of, is kept. - prediction_kernel: ABI/parity bumped to 103/104, past this fork's 102/103 and upstream's 3/5, because both sides changed the context struct and the hot loop. Any binary built before this merge is now rejected at load time and falls back to the Python engine rather than being silently trusted. annual_heat.py is added because the Pi's annual.py and web_annual.py import it and it existed only on feat/annual-heat-pump - without it the tree does not import at all. Verified: merged kernel compiles under -Wall -Werror and PASSES parity across 450 configurations (nominal/pv10/pv90); unit_test.py --quick is 224 passed, with the one pre-existing db_manager corruption failure that reproduces identically on main without this merge. prediction_kernel_lib_aarch64.so is rebuilt from the merged source (needs GLIBC 2.32, container has 2.43). The other five architectures need zig, so they stay stale until CI's kernel-binaries job rebuilds them - note that workflow is on: pull_request, so it does not run on a push to main. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2 parents fc0255a + 21b7726 commit 10c4f39

107 files changed

Lines changed: 43015 additions & 26167 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.cspell/custom-dictionary-workspace.txt‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ armhf
2525
armv
2626
ASHP
2727
asyncio
28+
authoriser
2829
autodocstring
2930
autoflake
3031
automations
@@ -76,6 +77,7 @@ corruptplans
7677
cprofile
7778
creds
7879
crosscharge
80+
customauthorizer
7981
customisation
8082
Customise
8183
cvalue
@@ -103,6 +105,8 @@ dend
103105
denorm
104106
derate
105107
derating
108+
desync
109+
desynced
106110
devcontainer
107111
devcontainers
108112
dexport
@@ -140,6 +144,7 @@ energythroughput
140144
enho
141145
Enlighten
142146
enlm
147+
enph
143148
enphase
144149
enphaseenergy
145150
Enpower
@@ -186,6 +191,7 @@ Ginlong
186191
GivEnergy
187192
givtcp
188193
gnueabihf
194+
GOELEC
189195
gridcode
190196
gridconsumption
191197
gridconsumptionpower
@@ -233,6 +239,7 @@ invname
233239
isinstance
234240
isoformat
235241
isort
242+
itemsize
236243
itemtype
237244
ivtime
238245
jedlix
@@ -292,11 +299,17 @@ minsoc
292299
minsocongrid
293300
minuteb
294301
misclick
302+
misdetect
303+
misdetected
304+
misdetecting
305+
misdetection
306+
mispairing
295307
Mixergy
296308
mkdocs
297309
mlugg
298310
Modbus
299311
mogons
312+
monkeypatched
300313
monokai
301314
Mosquitto
302315
mpan
@@ -329,6 +342,7 @@ OCPP
329342
octo
330343
octoplus
331344
octopoints
345+
Ofgem
332346
Ohme
333347
ohmepy
334348
Okabe
@@ -361,6 +375,7 @@ powerline
361375
Powerwall
362376
ppdetails
363377
ppkwh
378+
preclip
364379
pred
365380
predai
366381
predbat
@@ -369,6 +384,7 @@ predheat
369384
preseed
370385
preseeded
371386
prevs
387+
protobuf
372388
psum
373389
pvbat
374390
pvenergytotal
@@ -386,6 +402,8 @@ pytz
386402
randn
387403
rarr
388404
reactivepower
405+
readback
406+
readbacks
389407
recp
390408
redownload
391409
Referer
@@ -413,6 +431,7 @@ sapm
413431
saverestore
414432
savez
415433
scalarstring
434+
scalings
416435
searr
417436
securetoken
418437
Segoe
@@ -433,6 +452,10 @@ sigenergy
433452
sigenstor
434453
SIGSEGV
435454
Slee
455+
slugified
456+
slugifies
457+
slugify
458+
slugifying
436459
snakeviz
437460
socb
438461
socketloop
@@ -489,6 +512,7 @@ timeobj
489512
timestep
490513
timestr
491514
timezone
515+
tmpfs
492516
tmrw
493517
tojson
494518
tottime
@@ -499,9 +523,12 @@ treforsiphone
499523
treforsouthwell
500524
tunables
501525
twinx
526+
typecode
527+
typecodes
502528
tzfile
503529
tzpath
504530
unconfigured
531+
undiscounted
505532
unnormalised
506533
unparseable
507534
unsmoothed

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ coverage/*.txt
4646
coverage/*.db
4747
coverage/*.html
4848
coverage/*.prof
49+
coverage/*.py
4950
coverage/cache/
5051
coverage/debug/
5152
coverage/predbat_standalone/

‎apps/predbat/annual.py‎

Lines changed: 82 additions & 13 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)