Remove legacy code for format conversion
Deploy Solar Relay / deploy (push) Successful in 1m1s

This commit is contained in:
franzz committed 2026-11-02 23:59:33 +01:00
1 parent e1d22a26ed
commit 9e0230731b
10 files changed
+118 -223

No files matched your search

+1 -7
View File
@@ -40,9 +40,6 @@ def next_poll_at(now, interval):
def _run(config, store):
normalized = store.normalize_history()
if normalized:
LOG.info("Normalized %d recovered records to common power readings", normalized)
stop = threading.Event()
previous = {}
uploader = Uploader(config.upload, store) if config.upload.url else None
@@ -106,11 +103,10 @@ def _parser():
commands.add_parser("upload", help="Upload the pending queue, stopping on the first failure")
commands.add_parser("status", help="Show local archive/queue status without contacting the inverter")
commands.add_parser("prune", help="Delete expired whole local days after acknowledgement retention")
commands.add_parser("normalize-history", help="Backfill common power readings in previously recovered records")
for name, help_text in [
("export", "Export archived samples as JSON Lines, including already uploaded samples"),
("replay", "Requeue archived samples for upload, preserving their IDs"),
("recover", "Retrieve missing energy intervals from the authenticated Solar.web API"),
("recover", "Retrieve missing power samples from authenticated Solar.web charts"),
]:
command = commands.add_parser(name, help=help_text)
command.add_argument("--from", dest="from_date", help="Inclusive local date or ISO timestamp")
@@ -141,8 +137,6 @@ def main(argv=None):
print(json.dumps(store.status(), indent=2))
elif args.command == "prune":
print(json.dumps({"deleted": store.prune()}))
elif args.command == "normalize-history":
print(json.dumps({"normalized": store.normalize_history()}))
elif args.command == "recover":
if not config.history.enabled:
raise ValueError("Enable history and configure Solar.web account credentials before recovery")