Self-hosted dashboard for the SolisCloud (Ginlong Solis) platform
Project description
Solisdash
Self-hosted web dashboard for the SolisCloud (Ginlong Solis) platform. Live tiles on top, historical charts and an alarm feed below. FastAPI + HTMX + Jinja2 + Pico CSS, MongoDB-backed, with an in-process APScheduler poller.
What you get
- Live tiles — current power, today's yield, this-month yield, battery SOC, open alarms. Refreshed every 30 s via HTMX; falls back to the most recent stored sample when SolisCloud rate-limits.
- History charts — day (5-min granularity), month (daily totals), year (monthly totals), all-time (yearly totals). Reads MongoDB only, no upstream calls on the chart path.
- CSV export for any chart view.
- Alarm feed paginated and filterable by station + state.
- In-process poller (APScheduler) that pulls
stationDetailevery 5 min and alarms on the same cadence, plus a nightly daily-rollup job at 00:30 UTC. Rate-limited via a sharedTokenBucket. - Session-cookie auth (bcrypt) with an
invoke add-userCLI. /health(liveness) and/ready(Mongo + scheduler) probes.- Dark-mode toggle that persists per-browser.
Quick start
cp .env.example .envand fill in:SOLIS_KEY_ID/SOLIS_KEYSECRETfrom SolisCloud → Account → Basic Settings → API Management.SOLIS_API_URL— the region-specific base URL (EU:https://www.soliscloud.com:13333).SOLIS_MONGODB_URI— a non-prod MongoDB Atlas cluster.SESSION_SECRET— generate withpython -c "import secrets; print(secrets.token_urlsafe(32))".- Optional:
RUN_SCHEDULER=trueto enable the in-process poller,SOLIS_STATION_IDto pin the dashboard to one station.
uv sync --extra dev- Seed your first admin:
uv run python -m invoke add-user --username you --role admin - Pick one:
- Desktop window —
uv run solisdashopens the app in a native pywebview window with menus and the sun icon. Closes when you quit the window. Best for "me using it from my laptop". - Detached server —
uv run python -m invoke startruns uvicorn in the background, log atvar/uvicorn.log, lifecycle viastop/restart/status. Best for hosting on a small VPS.
- Desktop window —
- Visit http://127.0.0.1:8000 (or whatever port
solisdashprinted — it picks a free one by default).
Pages
| Path | Notes |
|---|---|
/ |
Live tile dashboard (auth-gated). |
/history |
Day / month / year / all-time charts with a download-CSV link. |
/alarms |
Filterable alarm feed (auth-gated). |
/login, /logout |
Session cookie auth. |
/health, /ready |
Liveness + readiness probes. |
solisdash CLI
uv run solisdash # open the dashboard in a pywebview window
uv run solisdash --no-window # serve uvicorn in the foreground (ssh / headless)
uv run solisdash --port 8000 # pin the port instead of letting the OS pick
uv run solisdash --debug # pywebview dev tools + debug uvicorn logging
The pywebview window picks a free port by default, ships a native menu bar (File / View / Help with Dashboard / History / Alarms shortcuts), and uses the bundled sun icon on the dock / taskbar.
Invoke tasks
uv run python -m invoke start # detached uvicorn
uv run python -m invoke stop / restart / status
uv run python -m invoke test # full suite under pytest-xdist
uv run python -m invoke lint # ruff + mypy
uv run python -m invoke add-user --username … --role admin|user
uv run python -m invoke poll-once # one-shot stationDetail pull
uv run python -m invoke backfill --start YYYY-MM-DD --end YYYY-MM-DD
Layout
src/solisdash/— application packageapp.py— FastAPI app, lifespan, routesclient.py— async SolisCloud client (HMAC-SHA1 signing, retry/backoff)signing.py— HMAC-SHA1 signing helper, pinned to the V2.0.3 worked exampledb.py— Mongo connection + index schemaauth.py— bcrypt hashing, session helpers, FastAPI depsconfig.py— pydantic-settings facadetiles.py,history.py,alarms.py— page-specific servicespoller.py,ratelimit.py,scheduler.py— APScheduler poller + token buckettemplates/,static/— Jinja2 + Pico CSS
tests/— pytest suite (160 tests, parallel-safe underpytest-xdist)tasks.py— invoke build/admin taskstasks/todo.md— build plan (every step ticked through Polish)CLAUDE.md— project conventions for Claude Code sessionsSolisCloud Platform API Document V2.0.3.pdf— upstream API spec (source of truth)
Development
uv run python -m invoke lint # ruff + mypy
uv run python -m invoke test # pytest -n auto
CI runs the same against a mongo:7 service container in GitHub Actions on every push and PR to main.
License
GNU Affero General Public License v3.0 or later (AGPL-3.0-or-later). Network use is distribution — if you run a modified version of Solisdash on a server users interact with, they're entitled to the modified source.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file solisdash-0.8.0.tar.gz.
File metadata
- Download URL: solisdash-0.8.0.tar.gz
- Upload date:
- Size: 164.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2fc61f00f66b3b430caacdf4a502f185b364e54739083f08f3531cbe4126bf6
|
|
| MD5 |
8399e28dc52a776c630e82870bb89886
|
|
| BLAKE2b-256 |
994cd6f5fcce601760236e0a6d25584f5d576f3689295fd1a409a3d15813e9bd
|
Provenance
The following attestation bundles were made for solisdash-0.8.0.tar.gz:
Publisher:
release.yml on jdrumgoole/solisdash
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
solisdash-0.8.0.tar.gz -
Subject digest:
b2fc61f00f66b3b430caacdf4a502f185b364e54739083f08f3531cbe4126bf6 - Sigstore transparency entry: 1554758664
- Sigstore integration time:
-
Permalink:
jdrumgoole/solisdash@2de5fb9da21ca932ba738a20159425639e10da4d -
Branch / Tag:
refs/tags/v0.8.0 - Owner: https://github.com/jdrumgoole
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2de5fb9da21ca932ba738a20159425639e10da4d -
Trigger Event:
push
-
Statement type:
File details
Details for the file solisdash-0.8.0-py3-none-any.whl.
File metadata
- Download URL: solisdash-0.8.0-py3-none-any.whl
- Upload date:
- Size: 71.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e86347710c207fe8ee01cd0f9b2e2a7e1c0b2057d6c049b950ade978a83ee9e
|
|
| MD5 |
ca5f368d9438a06e522c49efe737f769
|
|
| BLAKE2b-256 |
9703933f47344192ed94e56bf9bff496eeb0e1e7167e75f40d840bacf91368c6
|
Provenance
The following attestation bundles were made for solisdash-0.8.0-py3-none-any.whl:
Publisher:
release.yml on jdrumgoole/solisdash
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
solisdash-0.8.0-py3-none-any.whl -
Subject digest:
1e86347710c207fe8ee01cd0f9b2e2a7e1c0b2057d6c049b950ade978a83ee9e - Sigstore transparency entry: 1554759313
- Sigstore integration time:
-
Permalink:
jdrumgoole/solisdash@2de5fb9da21ca932ba738a20159425639e10da4d -
Branch / Tag:
refs/tags/v0.8.0 - Owner: https://github.com/jdrumgoole
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2de5fb9da21ca932ba738a20159425639e10da4d -
Trigger Event:
push
-
Statement type: