Mountain Dashboard

⚠️ WARNING: This repository is automated via a Synology NAS. Do not edit trmnl.html directly on GitHub, as it will be forcefully overwritten by the NAS update.sh script.

Mountain Dashboard is a custom, automated weather scraping and presentation system designed to provide concise mountain weather forecasts for specialized devices, specifically Kindle e-readers, TRMNL e-paper displays, and mobile browsers.

1. Architecture: The "Zero-Bloat" Strategy

This project scrapes text and synoptic charts from the Mountain Weather Information Service (MWIS). To ensure reliability and precise scheduling, it uses a local Synology NAS as a hardware bridge:

  1. Fetch & Build: The NAS wakes up 4x daily. A Python script (build.py) fetches the MWIS data and injects it into a dynamic HTML template, generating a static trmnl.html file locally.
  2. Diff Check: A bash script (update.sh) checks if the newly generated HTML is actually different from the last run. If the forecast hasn't changed, it aborts the process to save bandwidth and prevent empty updates.
  3. Deploy: If changes exist, the script pushes to GitHub Pages via SSH. It uses an amend/force-push strategy to prevent the repository from clogging up with thousands of commits, keeping the history locked to a single, constantly refreshing commit.

2. Device Layouts

3. Complete Setup Guide (Synology NAS)

Phase 1: GitHub Repository & Keys

  1. Create an empty public repository on GitHub named mountainweather. Do NOT initialize it with a Readme or license.
  2. Generate a dedicated Deploy Key on the NAS via SSH:
    ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519_mountain -N ""
    cat ~/.ssh/id_ed25519_mountain.pub
  3. Copy the output. Go to your mountainweather repository on GitHub > Settings > Deploy keys > Add deploy key. Paste the key and check "Allow write access".

Phase 2: NAS Directory & Python Setup

  1. Create the project folders:
    mkdir -p /var/services/homes/alex/scripts/mountainweather/logs
    cd /var/services/homes/alex/scripts/mountainweather/
  2. Synology Python 3.8 Quirks: You must manually install pip and specify an older version of urllib3 to comply with Synology's OpenSSL 1.0.2 constraints before installing the scraper dependencies:
    wget https://bootstrap.pypa.io/pip/3.8/get-pip.py
    /usr/local/bin/python3 get-pip.py --user
    /usr/local/bin/python3 -m pip install --user "urllib3<2"
    /usr/local/bin/python3 -m pip install --user requests beautifulsoup4
    rm get-pip.py

Phase 3: File Creation

Create the four core files in the /mountainweather/ directory using the Synology Text Editor app: build.py, update.sh, README.md, and Readme.html.

Ensure the shell script is executable:

chmod +x update.sh

Phase 4: Git Initialization & Force-Push Setup

Run these commands to initialize the local repository, configure your bot identity, force the specific Deploy Key, and push the initial setup:

cd /var/services/homes/alex/scripts/mountainweather/

# Configure local Git identity
git config --global user.name "Synology Updater"
git config --global user.email "bot@local"

# Initialize repository
git init
git remote add origin git@github.com:alexroddie/mountainweather.git

# Force Git to use the dedicated Mountain Deploy Key
git config core.sshCommand "ssh -i ~/.ssh/id_ed25519_mountain -o IdentitiesOnly=yes"

# Track files and push
git add trmnl.html README.md Readme.html update.sh build.py
git commit -m "Initial commit from Synology"
git branch -M main
git push -u origin main

(If prompted regarding the SSH fingerprint, type yes and press Enter).

Phase 5: GitHub Pages & Automation

  1. Activate GitHub Pages: Go to GitHub > Settings > Pages. Set Source to Deploy from a branch, select main, and click Save.
    (Your live URL will be: https://alexroddie.github.io/mountainweather/trmnl.html)
  2. Synology Automation: Open DSM Control Panel > Task Scheduler.
    • Create a Scheduled Task > User-defined script.
    • General: Name it Mountain Dashboard. Set User to alex.
    • Schedule: Set specific times corresponding to MWIS updates (e.g., 04:30, 10:30, 16:30, 17:30).
    • Task Settings: Check "Send run details only when script terminates abnormally" and input your email.
    • Run Command: bash /var/services/homes/alex/scripts/mountainweather/update.sh

Mountain Dashboard • Synology Build v3.0 • Alex Roddie © 2026