Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VrmSolarForecast

A Venus OS GUIv2 plugin showing the solar production forecast on a Victron GX device (Cerbo / Ekrano).

Data sources: Victron VRM solar forecast (cloud) via the public HTTP API, plus — when present — live solar irradiance from a Victron SolarSense 750 (meteorological sensor) overlaid on the same chart.

Screenshots

Today — forecast (green) + actual production (amber) bars, with the SolarSense 750 irradiance overlaid: a blue min–max whisker per hour plus the average curve, read on the secondary W/m² axis (right):

Irradiance overlay

Today — forecast (green) + actual production (amber) overlaid hour by hour:

Today view

Yesterday — actual hourly production:

Yesterday view

Where the page appears

By default the page is registered under:

  • Settings → Integrations → VrmSolarForecast

Optionally (see PV inverter device-list entry below), the same page can also be reached from:

  • Settings → Devices → <your PV inverter> → Solar Forecast

⚠️ Limitation of the current plugin framework: GUI-v2 plugins can only register --settings and --devicelist entrypoints today. The other types (--card, --navigation, --quickaccess) are marked TODO in the upstream compiler, so the page cannot be opened by clicking the PV tile on the Overview yet. The best you get is "open it from the device list", which is what the optional config below enables.

Requirements

  • Venus OS Large image (provides Python 3 + rcc, needed by the plugin compiler), v3.80~25 or newer. Tested target: 3.80 beta 25.
  • Root SSH access to the Cerbo GX.

Repo layout

.
├── .env.example                              # deploy config template (copy to .env)
├── images/                                   # screenshots used in this README
├── VrmSolarForecast/                         # plugin sources (flat — compiler is non-recursive)
│   ├── VrmSolarForecast_PageSettings.qml     # entry point
│   ├── ForecastPanel.qml                     # main UI (tabs + chart + totals)
│   ├── VrmSolarForecast_en.ts                # English translation catalog
│   └── VrmSolarForecast_fr.ts                # French translation catalog
└── scripts/
    ├── deploy.sh                             # scp + compile + symlink + restart GUI
    └── undeploy.sh                           # remove symlink (optionally purge)

First-time setup

cp .env.example .env
$EDITOR .env              # fill in the values below

Required keys in .env:

Key Where to find it
CERBO_HOST / CERBO_USER hostname/IP of your GX device, root by default
VRM_TOKEN VRM portal → top-right avatar → Preferences → Integrations → Access tokens → Add new token (copy immediately; only shown once)
VRM_INSTALLATION_ID integer in your VRM portal URL: …/installation/<id>/…

Optional:

Key Effect
PV_INVERTER_PRODUCT_ID If set, the page also shows up under Settings → Devices → <inverter>. See next section.
CERBO_SSH_OPTS Extra ssh/scp flags (custom port, identity, …)

Set up key-based SSH if you haven't already:

ssh-copy-id root@<cerbo-host>

PV inverter device-list entry

If you want the page to also appear under Settings → Devices → <your PV inverter> → Solar Forecast, set PV_INVERTER_PRODUCT_ID in .env to the hex productId of your inverter.

Discover it on the device:

# list your PV inverters
ssh root@<cerbo-host> 'dbus -y | grep pvinverter'

# read the ProductId of the chosen one
ssh root@<cerbo-host> 'dbus -y com.victronenergy.pvinverter.<service> /ProductId GetValue'

Convert the decimal value to hex and put it in .env:

printf '0x%X\n' 41282      # → 0xA142
PV_INVERTER_PRODUCT_ID=0xA142

Leave it empty to skip the device-list registration (only Settings → Integrations).

Deploy

./scripts/deploy.sh

Then open the Cerbo GUI → Settings → Integrations → VrmSolarForecast, or Settings → Devices → <your inverter> if you set the optional product id.

Useful flags:

  • ./scripts/deploy.sh --no-restart — push files and compile without bouncing the GUI.
  • ./scripts/deploy.sh --dry-run — print every remote command without running it.

If a freshly redeployed plugin looks stale in the VRM Remote Console, force a hard refresh (Ctrl+Shift+R) — the browser caches the plugin chunks aggressively.

Disable / remove

./scripts/undeploy.sh           # remove symlink, GUI restarts
./scripts/undeploy.sh --purge   # also delete /data/apps/available/VrmSolarForecast

How it works under the hood

The deploy script mirrors the workflow described in the official plugin guide:

  1. Stage all .qml and .ts files into a temp folder, substitute @VRM_TOKEN@ / @VRM_INSTALLATION_ID@ from .env (secrets never land in the repo).
  2. scp everything to /data/apps/available/$PLUGIN_NAME/ on the device.
  3. Run gui-v2-plugin-compiler.py --settings … [--devicelist …] on the Cerbo to build a JSON manifest containing a base64-encoded .rcc bundle (translations compiled in via lrelease).
  4. Move the manifest into gui-v2/ (where GUI-v2 looks for it).
  5. Symlink available → enabled to activate.
  6. Restart start-gui so the new manifest is picked up.

The compiler is non-recursive, so every QML / TS file used by the plugin must sit directly under VrmSolarForecast/ — no subfolders.

VRM API endpoints used

Purpose Endpoint Notes
7-day forecast GET /v2/installations/{id}/stats?type=forecast&interval=hours reads records.solar_yield_forecast (values in Wh)
Actual production (yesterday + today) GET /v2/installations/{id}/stats?type=kwh&interval=hours reads records.Pc + Pb + Pg (PV→consumption / battery / grid). Values are in kWh — the panel up-converts to Wh internally to stay homogeneous with the forecast.
Irradiance (SolarSense 750) GET /v2/installations/{id}/widgets/Graph?attributeCodes[]=msI&instance=<n> raw logged points (1–5 min cadence, timestamps in seconds) for msI (Solar Irradiance, W/m²). The panel buckets them into per-hour min / max / average for the overlay.

SolarSense 750 irradiance overlay

If a Victron SolarSense 750 (a meteorological / irradiance sensor) is present on the installation, the panel overlays its irradiance on the energy chart for past days and today: a min–max whisker plus an average curve, on a secondary W/m² axis.

The sensor's VE.Bus instance is hardcoded as meteoInstance in ForecastPanel.qml (default 40, matching the reference install). Discover yours with:

ssh root@<cerbo-host> 'dbus -y | grep meteo'

The overlay is optional and self-disabling: if there is no SolarSense (or the instance differs), the irradiance request simply returns nothing, the overlay and its right-hand axis stay hidden, and the forecast/production view is unaffected.

Roadmap

  • V0 — plugin structure, placeholder UI, deploy pipeline.
  • V1 — wire VRM solar forecast API (token + installation id from .env).
  • V2 — 7-day tabbed view, hourly bar chart, today's actuals overlay.
  • V3 — Yesterday tab with real production, FR/EN translations, optional PV-inverter device-list entry.
  • V4 — open from the Overview / PV tile (blocked: needs upstream --card or --navigation entrypoint implementation in gui-v2-plugin-compiler.py).

Credits

About

Venus OS GUIv2 plugin — 7-day VRM solar forecast and hourly production, on the Cerbo GX.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages