Repository navigation
SolarLens v2.11.0
SolisCloud readings again after the portal moved its plant page, a relay that
starts again and logs in by itself, Historical Data one system at a time, and a
notice when a newer version is out.
Added
- The relay logs in by itself. SolisCloud's web login lasts seven days,
and renewing it meant noticing the dashboard's warning, then finding and
running a file. With the SolisCloud username and password in.dev.vars
(SOLIS_USERNAME,SOLIS_PASSWORD), a hidden relay whose login has run
out logs in again on its own, still hidden - filling both in, ticking the
agreement as the owner asked, pressing Login. Only if SolisCloud asks for a
puzzle or a code does a window open, filled in, for a person to answer it
and press Login; the relay never answers those, and never sends the login a
second time. One attempt an hour at most, remembered across restarts, and a
new laptop with the login saved starts hidden too.make-laptop-installer.ps1
carries the login into the installer it writes, and setup writes it to
.dev.vars- plain text both, for the owner's own machines only. - A proper icon for the guide. The header's "?" is now an open book with
the word Guide beside it - drawn in the text colour, so it follows the theme
and inverts while the guide is open - and the book alone on a phone, where the
header has room for icons only. - Historical Data, one system at a time. A switch at the top of the tab -
All systems, or any one of them - narrows the charts, the tables, the row
count and the CSV to the system chosen, so looking after one system no longer
means scrolling past the other. All systems, one after the other, is still the
default, and the choice is remembered in each browser; a remembered system
that no longer exists falls back to all of them. A single system's CSV is
named for it. - "A new version of SolarLens is available." A dashboard tab refreshes its
figures but never the page itself, so a tab left open across a release kept
running the old one - which is how the 2.10 guide went unseen on a screen that
had been open since before it. The page now asks for its own address, headers
only, every quarter of an hour and on coming back to the tab, and compares the
ETag with the one it loaded with; when they differ it offers a Reload. TV mode
has nobody to press anything, so a wall display reloads itself. It costs one
tiny request each time and nothing on the database.
Changed
- The code explains itself. Every source file now opens with what it is for
and how it fits with the others - the Worker's routes and cron, the database
layer, each vendor's client, the relay agent, the scripts - and each function
worth explaining has a summary above it. The dashboard's script opens with a
map of its twenty sections, each marked so it can be found by searching. Test
files say what they hold the code to, and the shared test helpers - SQLite
behind D1, a Worker to send requests to, a stand-in push service and service
worker - are explained where they are defined. - Every CI job says what it proves, and what to do when it fails. Each job
that can run on your own machine now gives the command that does, so a red
cross comes with its next step. The three that exist only on GitHub - CodeQL,
dependency review and the reviewer request - say instead where their findings
appear, or how to ask again. The two tsconfig files say
what each type-checks and why there are two. Every test helper that builds
data or fakes an API has a line saying what it stands for, and one helper
nothing called is gone. - Debugging, written down. The README gains Debugging a failing test - one
test at a time, the browser visible, stepping through, and reading a trace -
and Debugging the live system: the Worker's live log, /api/health, a query
against production that reaches it in one piece, and watching a relay laptop
work, since a hidden relay writes no log. - Comments inside the long functions, too. Every function over thirty lines
now carries a comment at least every fifteen lines, stating each step and the
reason for it: how SolarMan's grid and battery figures are signed, how a
SolarMan timeline becomes occurrences, what a failed push does, how the relay's
chart tabs are walked back a year at a time. - A gap written down. Checking the comments against the live API showed that
three parts of the dashboard read a raw vendor payload the server deliberately
never sends: the Raw telemetry table, the alerts built from vendor flags, and a
device's own alert count. None of them shows on the live site, and the tests
missed it because their fixtures include the payload. It is recorded as gap 5
in docs/feature-gaps.md, with the ways to close it, rather than changed here. - The documents match the code again. Checked mechanically against it: the
README's data model now has all eleven tables (it was missing alarms, vendor
totals and relays), its end-to-end section describes all ten spec files rather
than one, and its coverage table has real figures and a row for push; the
handover used two wrong table names and missed a third, and its release steps
now include the guide. Both now say that an open Copilot conversation blocks a
merge, which one of them said it never did.
Fixed
- SolisCloud moved its plant page, and the relay finds it again. In October
2026 the portal dropped/station/stationDetails/generalSituation/<id>, the
page the relay opened to read a plant, for
/overview/plantStation/details/overview/<id>. A relay that knew only the old
address waited every cycle for figures that never came - with a fresh login
or without - so no Solis reading arrived from 15 October. It now opens the
new page, and the old one only if the new one sends nothing. - A relay that stops starts again. A page that failed to open - no network
yet, just after logon - left a wait nobody handled, and that ended the whole
relay about thirty seconds later. Windows' "restart on failure" covers only a
task that fails to start, so the relay stayed down until the next logon - once
for nine days. No wait is left unhandled now, a failure nothing was waiting
for is logged instead of ending the relay, and the installer adds a check
every ten minutes that starts the relay again if it has stopped: run it once
on each relay laptop. - The vendor's period totals arrive again. The redesign also dropped the
chart's "previous year" button. Looking for it threw away the month, the year
and the lifetime already read, and was tried again every cycle; the walk back
through earlier years now stops where the button is missing and keeps the
rest - the earlier years were sent long ago and do not change. - The page is no wider than a phone. The tab bar could not shrink, and on a
phone it made every page wider than the screen - "Devices" was cut off at the
edge and "Historical Data" broke over two lines - while the overview's
columns would not go below 430px. A page wider than the screen makes the
browser zoom the whole layout out, which is how the new-version notice first
landed below the bottom of a phone screen, where it could not be pressed.
The tabs now scroll sideways in their own strip, one line each, and the
overview's columns shrink to fit; a test walks every view at phone width and
fails if any is wider than the screen.
The full entry is in CHANGELOG.md.