Skip to content

SolarLens v2.10.0

Choose a tag to compare

@github-actions github-actions released this 24 Sep 15:09
· 56 commits to main since this release

Phone notifications, SolarMan faults that say when they cleared, and a guide to
the whole app.

Added

  • A guide, behind the ? at the top of every page. What SolarLens is, what
    each tab holds, a "where do I find" table from everyday questions to the place
    that answers them, what is new in this release, and the few things worth
    knowing - that an on-grid system reads offline every night, that one relay
    laptop is enough, that a SolisCloud login lasts seven days. An icon rather than
    a tab, because a guide is read now and then and the tabs are used every day;
    it opens even before the data has loaded, and its version is held equal to
    the release by a test.

  • Notifications that reach a closed browser. The Alerts tab gains Also when
    this browser is closed
    : turn it on once per device and that device is told,
    through its browser's own push service, when a system stops reporting while it
    was producing, when a fault is recorded, when a SolisCloud login is two days
    from running out or has run out, and when a vendor stops answering. Each rule
    is written for a phone rather than a screen - the on-grid system goes quiet
    every night because its inverter sleeps, so silence counts only after a reading
    that showed it generating. Each event is told once, and again only if it clears
    and returns.

    The push itself carries nothing: it wakes the device, whose service worker
    asks /api/push/recent what to show, so what a notification says never
    passes through the push services, and there is no payload encryption to get
    wrong. Signing a device up needs the key - from the /auth cookie or typed
    once and not kept - while turning a device off needs none. A device gets one
    message as soon as it signs up, and a Send a test button after that.

    Setting up is one command, node scripts/make-vapid-key.mjs, which makes the
    signing key and stores it as the Worker secret VAPID_KEY without printing or
    saving the private half. Migration 0013 adds the two tables.

  • SolarMan alarm detail. SolarMan's alert list says when a fault was raised
    and nothing else. Its portal's detail panel makes two more calls - found in the
    portal's own code - and SolarLens now makes them too, for the newest five
    alerts each hour: the advice, where SolarMan has any, and the moments that day
    the fault was active. Each run of five-minute samples becomes one occurrence
    with an end, which also brings back the occurrences the list folds into one row
    per day. On the plant observed here, two stored alerts became four occurrences,
    each with an end. A run still going, or one that reaches midnight, is left
    without an end rather than given a guessed one.

Fixed

  • The reading-offset backfill works against the real database. Its first
    run against production answered "undefined" for every plant: with --file,
    a remote D1 database treats the statement as a bulk import and replies with
    import statistics rather than rows, while a local one replies with rows - so
    it passed every local test. Through the wrangler wrapper instead, a shell
    splits the statement at every space. The script now runs wrangler's own entry
    point with node, handing it the statement as one argument, and stops on rows
    of an unexpected shape rather than printing "undefined" and carrying on. Found
    on the dry run, before anything was written.
  • The config step of scripts/wrangler.mjs is now scripts/wrangler-config.mjs,
    shared by the wrapper and the backfill, so the two cannot drift. The wrapper
    behaves exactly as before.

The full entry is in CHANGELOG.md.