This is a modern GNOME application built to track and visualise UK smart electricity tariff rates in real time. It fetches current and forecast half-hourly prices across supported Octopus Energy tariffs, helping users quickly see the best times to use electricity. It is intended for UK Octopus Energy customers, but is independent and is not affiliated with, endorsed by, or sponsored by Octopus Energy.
- Current Price Display: Shows the real-time electricity price (pence/kWh).
- Price Level Indicators: Visually indicates whether the current price is low, medium, high, or even negative.
- Adaptive Price Forecast Chart: Displays upcoming half-hourly price data in a horizontally scrollable chart while keeping small-screen layouts usable.
- Find Cheapest Time: A built-in calculator to find the cheapest time window for a specific duration, including half-hour appliance runs such as "3h 30m in the next 24 hours".
- Region and Tariff Selection: Allows users to select their region and tariff through a preferences window. You can choose a region manually, connect an Octopus account to infer its tariff and region, or use device location to identify the region locally. Supports Agile, Go, Intelligent Go, and dual-register day/night tariffs. Intelligent Go needs a user-provided API key.
- Usage History: Shows recent smart meter usage and estimated spend when an API key and account number are configured, with clear setup and loading states when account access is not available yet.
- Adaptive GTK Interface: The main window and preferences window now adapt more cleanly across narrow and wide GTK layouts.
Flathub is the recommended installation method and provides automatic application updates:
flatpak install flathub com.nedrichards.octopusagileLaunch Agile Rates from the application grid or run:
flatpak run com.nedrichards.octopusagileThis application targets GNOME 51 and supports its Python 3.14 runtime only. Develop through the Flatpak SDK to keep GTK, libadwaita, Python, Meson, and native tooling in the same environment used to build the app. Ruff and lint CI target Python 3.14; source changes can use features available through that version.
Use native deferred annotations without from __future__ import annotations,
datetime.UTC for UTC instants, and datetime.fromisoformat() directly for API
timestamps (including the Z suffix). For dynamic Pango markup, use the
markup() helper with a t-string: it preserves literal tags and escapes every
interpolated value after formatting.
Install Flatpak and Flatpak Builder, then install the GNOME 51 runtime and SDK if your system does not already have them:
flatpak install flathub org.gnome.Platform//51 org.gnome.Sdk//51The development manifest builds from the local checkout and runs the Meson test suite inside the GNOME SDK sandbox:
./scripts/local-flatpak.sh
flatpak run com.nedrichards.octopusagile.DevelThe octopusagile module in com.nedrichards.octopusagile.Devel.json has run-tests enabled, so the build fails if meson test fails inside the Flatpak environment.
The script disables rofiles-fuse, uses a single staging location, and removes temporary build directories on exit. See local builds and updates for the durable update repository and cleanup policy. For an installed sandbox shell:
flatpak run --user --command=sh com.nedrichards.octopusagile.DevelTo inspect logs from an installed run:
journalctl --user -f
flatpak run com.nedrichards.octopusagile.DevelTo clear local app settings while debugging first-run behavior:
flatpak run --command=sh com.nedrichards.octopusagile.Devel
gsettings reset-recursively com.nedrichards.octopusagileRun source checks inside the GNOME SDK rather than against the host Python and GTK stack. The installed development build supplies the same pinned Python dependencies used by the application; install the development-only tools into a temporary SDK path first.
Install the Ruff version pinned in requirements-dev.txt to reproduce CI.
pyproject.toml specifies the minimum supported Ruff version.
The selected preview gate python3 -m ruff check --preview --extend-select shared-clock-mock src tests
keeps cache freshness and retry test clocks local to the window module. Shared
process clocks remain real for unrelated workers.
CI also checks Bugbear, logging, targeted lint suppressions, and selected security
rules. During Ruff upgrades, review python3 -m ruff check --preview src tests
separately.
app_site="$(flatpak info --user --show-location com.nedrichards.octopusagile.Devel)/files/lib/python3.14/site-packages"
flatpak run --user --command=sh --filesystem="$PWD" --filesystem="$app_site:ro" \
--env=OCTOPUSAGILE_APP_SITE="$app_site" --share=network org.gnome.Sdk//51
python3 -m pip install --target=/tmp/octopusagile-test-tools -r requirements-dev.txt
PYTHONPATH=/tmp/octopusagile-test-tools:$OCTOPUSAGILE_APP_SITE python3 -m compileall -q src tests
PYTHONPATH=/tmp/octopusagile-test-tools:$OCTOPUSAGILE_APP_SITE python3 -m ruff check src tests
PYTHONPATH=/tmp/octopusagile-test-tools:$OCTOPUSAGILE_APP_SITE python3 -m pytestThe Python minor-version directory follows the GNOME SDK and can change when the runtime is upgraded. The authoritative local build script above runs the Meson unit suite automatically without this extra setup.
The Flatpak Meson suite also runs a real GTK startup check on an isolated Broadway display. It constructs the main window and maps Prices, Plan, and Usage at narrow and wide sizes, using temporary settings and cache directories with network and keyring work disabled. This check runs in the development Flatpak CI build and catches widget construction errors that mocked unit tests cannot.
Install your distribution's Sysprof package, then capture a representative run of the development Flatpak. Exercise the workspace switcher, chart selection, window resizing, and usage view before closing the app so Sysprof finishes the capture.
sysprof-cli --force --gtk --speedtrack --scheduler --no-debuginfod \
/tmp/octopusagile.syscap -- \
flatpak run com.nedrichards.octopusagile.DevelGNOME Builder can also build and run the project through Flatpak. Open the checkout, select the com.nedrichards.octopusagile.Devel.json configuration for local development, then use Builder's Run action.
com.nedrichards.octopusagile.json builds from a pinned upstream Git commit for release-style packaging. com.nedrichards.octopusagile.Devel.json builds from the local checkout and is the right manifest for active development.
To build and run the pinned production manifest:
./scripts/local-flatpak.sh production
flatpak run com.nedrichards.octopusagileEvery pull request and push to main builds the development Flatpak. The
workflow summary links directly to a 14-day artifact whose filename includes
the pull request number or built commit. These bundles install the separate
com.nedrichards.octopusagile.Devel application and are intended only for
testing a particular change.
After extracting the downloaded artifact, install it with:
flatpak install --user ./Agile-Rates-Devel-*.flatpakStable releases attach x86_64 and aarch64 bundles, plus SHA256SUMS, to
the corresponding GitHub release. The release workflow accepts an existing
vX.Y.Z tag only after the production manifest has been pinned to that exact
tag commit, and publishes the GitHub release only after both bundles build.
Install a downloaded stable bundle with:
flatpak install --user ./Agile-Rates-vX.Y.Z-x86_64.flatpakGitHub bundles are fixed release snapshots rather than an update repository. Install from Flathub when automatic application updates are desired.
Upon first launch, the application opens setup so you can choose the correct tariff and region before fetching prices. You can select a region manually, connect an Octopus account to infer its tariff and region, or choose Use My Location to ask the desktop location portal to identify your electricity region. Location is requested only when you press that button, is processed against bundled boundaries on your device, is not stored, and is never sent to Octopus Energy, Northern Powergrid, or another network service. You can use manual setup for current and upcoming prices, then add an Octopus API key and account number later to enable usage history and spend estimates.
Usage keeps detailed half-hour readings for up to 120 days and compact local daily totals for up to five years. The longer views compare complete periods and deliberately avoid attributing seasonal changes to weather or another cause. This account-specific archive stays in the application's local cache and is replaced when the configured account changes. Available history can be shorter after moving home or replacing a meter because the app does not combine independent supplies or meter serials.
The selected workspace, Plan duration, and search window are remembered between runs. In Plan, select any half-hour on the chart to compare the price of starting the same-duration run then with the cheapest result. Durations can be adjusted in 30-minute steps for appliances that do not run in whole hours, with appliance-timer options showing whole-hour start and finish values, exact windows, and price differences from the cheapest window. It stacks the result and chart on smaller windows, then uses a two-column chart-and-controls layout when more width is available.
For a one-off launch into a particular workspace, use --tab prices, --tab plan, or --tab usage. This does not replace the workspace remembered for normal launches.
The rolling 30-day price chart in Usage offers 6-month, 12-month, 24-month, and 5-year views when enough history exists and they show distinct periods, alongside All available. Shorter histories show their available span without a period selector. Each daily point divides the preceding 30 days' matched energy charges by their consumption; standing charges are excluded. Windows with missing readings or rates appear as gaps. Click or drag sideways across the chart, or use Left, Right, Home, and End to inspect dates. The first history refresh after upgrading backfills historical half-hour readings and tariffs and can take longer than normal; subsequent refreshes use a seven-day overlap. Once a week, automatic refresh also rechecks older gaps within the last 120 days, fetching only affected ranges within one 14-day span. Toolbar Refresh triggers this bounded recheck immediately. Preferences’ Recheck older usage history also checks gaps across the stored five-year archive, with the same limit; repeat it to work through further gaps. Complete older days stay cached. Missing readings are never treated as zero usage. Only daily cost totals are retained for the longer history, alongside the existing consumption archive.
Accounts with several properties or independent active electricity supplies are not currently supported. Account auto-detection uses the first active electricity tariff agreement returned by the Octopus API. Usage history uses the first active electricity meter point for which consumption is available and, where that meter point lists several meters, chooses the meter with the most returned samples. The app does not aggregate properties or independent supplies, and the selected tariff and usage may therefore depend on the API ordering for such accounts. Choose the tariff manually if necessary, but do not treat the usage or spend views as whole-account totals.
To change your region or tariff:
- Click the menu button in the top-right corner of the application window.
- Select Preferences.
- Choose your desired tariff type, region, and tariff from the available selectors.
The application will automatically refresh the price data when settings are changed.
This project is licensed under the GNU General Public License v3.0 or later (GPL-3.0-or-later).
The app bundles an offline WGS84 GeoJSON snapshot (obtained 2026-08-02) of Northern Powergrid Open Data's All DNO Licence Area Boundaries dataset. Its GeoJSON export URL is recorded so the snapshot can be refreshed. No geometry simplification was applied; retained DNO names are explicitly mapped to the application's existing Octopus _A–_P region codes in src/region_location.py.
Data licence: Northern Powergrid Open Data Licence v1.0.
Required attribution: “Supported by Northern Powergrid Open Data”.
The complete data licence and provenance are in data/NORTHERN_POWERGRID_OPEN_DATA_LICENCE_v1.0.txt and data/README.md; both are installed with the app. The required attribution appears in the application About window. Northern Powergrid does not endorse this application, and no Northern Powergrid logos are used.
The application source code is licensed under GNU GPL version 3. The GeoJSON data in data/ remains available under the Northern Powergrid Open Data Licence v1.0 and is not relicensed under GPLv3.
Development of this project has been assisted by a variety of AI coding tools.
Dependency checks, CI artifacts, and release packaging are described in Maintenance.
For hosted checks and artifacts, see continuous integration.
