Files
Paul G 36a07dacb9 Extract shared signal-based D-Bus readers into lib/signal_reader.py
- Added lib/signal_reader.py with SignalGpsReader, SignalMeteoReader, and
  SignalDepthReader that use PropertiesChanged signal subscriptions instead
  of polling via GetValue(), reducing D-Bus overhead at steady state.
- Each reader discovers its service dynamically, seeds its cache with a
  one-shot GetValue, then relies on signals for all subsequent updates.
- Refactored dbus-tides, dbus-windy-station, dbus-no-foreign-land,
  dbus-lightning, and dbus-meteoblue-forecast to import from the shared
  library, removing ~600 lines of duplicated _unwrap() helpers and
  per-service GPS/meteo/depth reader classes.
- Updated install.sh for all five services to deploy signal_reader.py
  to /data/lib/ on the target device.
- Updated build-package.sh for all five services to bundle
  signal_reader.py into the .tar.gz package.
- Updated README.md with the new lib/ entry in the project table and
  documented the shared D-Bus readers pattern.
- Bumped version numbers in affected services (e.g. nfl_tracking 2.0.1).

Made-with: Cursor
2026-03-27 01:03:16 +00:00
..
2026-03-17 03:24:33 +00:00

Windy Station for Venus OS

Uploads weather data from Venus OS to Windy.com weather station network using the v2 API.

Reads weather data from the D-Bus meteo service (published by the Raymarine integration) and GPS position from the system GPS service. Provides a settings GUI on the Cerbo GX display via either the v1 GUI (legacy) or v2 GUI plugin system (Venus OS v3.70+).

Features

  • Uploads wind speed (5-minute running average), wind gusts (peak 3-sample average over 10 minutes), wind direction, temperature, and barometric pressure
  • Updates station GPS location automatically (on startup, every 60 minutes, or when GPS moves > 200 ft)
  • All settings configurable via the Venus OS touchscreen GUI or MQTT
  • Settings persist across service restarts via Venus localsettings
  • Survives firmware updates via rc.local persistence

Prerequisites

  • Venus OS device (Cerbo GX, Venus GX, Raspberry Pi with Venus OS)
  • Raymarine weather data publishing to D-Bus (via raymarine-venus package)
  • Windy.com station credentials (see Setup below)

Windy.com Setup

  1. Go to stations.windy.com
  2. Create an account or sign in
  3. Go to My Stations and add a new station
  4. Note your Station ID and Station Password from the station detail page
  5. Go to API Keys and create an API key (for station location updates)

Installation

Quick Install

scp dbus-windy-station-*.tar.gz root@<cerbo-ip>:/data/
ssh root@<cerbo-ip>
cd /data && tar -xzf dbus-windy-station-*.tar.gz
bash /data/dbus-windy-station/install.sh

Then install the GUI for your Venus OS version:

GUI v2 plugin (Venus OS v3.70+, recommended):

bash /data/dbus-windy-station/install_gui_v2.sh

The plugin appears under Settings > Integrations > UI Plugins > Windy Station. No system files are patched; the plugin survives firmware updates.

GUI v1 legacy (Venus OS < v3.70):

bash /data/dbus-windy-station/install_gui.sh

Adds an entry under Settings > Windy Station. Must be re-run after firmware updates.

Configuration

Create /data/dbus-windy-station/station_config.json:

{
    "api_key": "your-api-key",
    "station_id": "pws-station-001",
    "station_password": "your-station-password",
    "update_interval": 300,
    "name": "My Weather Station",
    "share_option": "public",
    "station_type": "Boat",
    "elev_m": 0,
    "agl_wind": 5,
    "agl_temp": 5
}

The config file is read on every service startup and overrides any GUI/localsettings values. This makes it easy to deploy a known configuration. Both snake_case and camelCase field names are accepted.

Option 2: GUI Configuration

Navigate to Settings > Windy Station (v1) or Settings > Integrations > UI Plugins > Windy Station (v2) on the Cerbo display:

  1. Enter your API Key, Station ID, and Station Password
  2. Set Station Name, Station Type, and Share Option
  3. Set sensor heights (Wind sensor height, Temp sensor height)
  4. Enable uploads with the toggle switch
  5. Optionally adjust the upload interval (default: 300s / 5 minutes)

Option 3: MQTT

W/<vrm-id>/windystation/0/Settings/ApiKey          "your-api-key"
W/<vrm-id>/windystation/0/Settings/StationId        "pws-station-001"
W/<vrm-id>/windystation/0/Settings/StationPassword  "your-password"
W/<vrm-id>/windystation/0/Settings/Name             "My Station"
W/<vrm-id>/windystation/0/Settings/ShareOption       "public"
W/<vrm-id>/windystation/0/Settings/StationType       "Boat"
W/<vrm-id>/windystation/0/Settings/ElevM             0
W/<vrm-id>/windystation/0/Settings/AglWind           5
W/<vrm-id>/windystation/0/Settings/AglTemp           5
W/<vrm-id>/windystation/0/Settings/Enabled           1

Building

./build-package.sh --version 1.0.0

Creates dbus-windy-station-1.0.0.tar.gz ready for deployment.

Service Management

# Check status
svstat /service/dbus-windy-station

# View logs
tail -F /var/log/dbus-windy-station/current | tai64nlocal

# Restart
svc -t /service/dbus-windy-station

# Stop
svc -d /service/dbus-windy-station

# Start
svc -u /service/dbus-windy-station

Uninstall

bash /data/dbus-windy-station/uninstall.sh
# To remove all files:
rm -rf /data/dbus-windy-station /var/log/dbus-windy-station

D-Bus / MQTT Paths

Path Type Description
/Status read 0=Idle, 1=Active, 2=Uploading, 3=Error
/WindSpeed read 5-minute average wind speed (m/s)
/WindGust read Peak gust (m/s)
/WindDirection read Wind direction (degrees)
/Temperature read Air temperature (°C)
/Pressure read Barometric pressure (hPa)
/LastReportTimeAgo read Time since last upload (e.g., "3m")
/Settings/Enabled r/w Enable/disable uploads (0/1)
/Settings/ApiKey r/w Windy API key (for station management)
/Settings/StationId r/w Windy station ID
/Settings/StationPassword r/w Windy station password (for observations)
/Settings/UploadInterval r/w Upload interval in seconds (300-900)
/Settings/Name r/w Station display name on Windy.com
/Settings/ShareOption r/w public, only_windy, or private
/Settings/StationType r/w Station type (e.g., "Boat", "Airmar WX200")
/Settings/ElevM r/w Station elevation in meters
/Settings/AglWind r/w Wind sensor height above ground (meters)
/Settings/AglTemp r/w Temp sensor height above ground (meters)

API Details

Uses the Windy Stations API v2 (effective January 2026):

  • Station update: PUT /api/v2/pws/{station_id} with windy-api-key header
  • Observation upload: GET /api/v2/observation/update?id=...&PASSWORD=...&wind=...

Pressure is sent in Pascals (hPa * 100), wind in m/s, temperature in Celsius.

After Firmware Updates

The dbus-windy-station service is preserved via rc.local.

GUI v2 plugin (v3.70+): No action needed -- the plugin is stored under /data/apps/ and survives firmware updates automatically.

GUI v1 legacy: GUI modifications are lost on firmware updates. Re-run:

bash /data/dbus-windy-station/install_gui.sh