Files
JakeHillion c5e6280207
commit-validation / validate-single-commit (pull_request) Successful in 12s
buildbot/nix-eval Build done. (768 warnings)
buildbot/nix-build Build done.
buildbot/nix-effects Build done.
hearthd: charge the S2000 in the cheap windows
The S2000 on stinger's rack is reachable only over Bluetooth, and nothing
here sets its mode, so it neither charges when electricity is cheap nor
carries the load when it is dear.

Configure the anker_solix integration for it, with the model and adapter
in the public config and its address, serial and enrolled client ID in a
new anker_solix.toml secret. A hearthd-s2000-schedule oneshot puts it in
standard mode, charging from the grid, from 04:00 to 07:00, 13:00 to 16:00
and 22:00 to midnight London time, and in self-consumption mode the rest
of the day, by sending ModeSelect ChangeToMode to the node through the
local hearthd API. It works the mode out from the time, so a timer at each
change, plus one a minute after boot, is all it needs. Charging starts at a
random point 5 to 15 minutes into each window, and discharging starts on
the hour. hearthd only has the node while the Bluetooth link is up, so a
failure retries every 30 seconds without limit.

Only the mode is written. The charge power cap and the backup reserve
stay as they are on the device. hearthd also goes on the PATH, for
its integration helpers such as the S2000 enrolment.

Test plan:
- CI
- Built stinger with a stand-in secret, and checked the generated units
  and script
2026-11-26 20:28:06 +00:00
..
2026-08-16 22:17:56 +01:00
2025-11-17 23:18:24 +00:00