A powerful budget analysis tool for Octopus Energy customers
Analyze your Octopus Energy consumption, costs, and tariffs to optimize your energy budget. Perfect for households with solar panels, battery storage, or standard energy setups.
- 📊 Comprehensive Analysis - Track electricity import, solar/battery export, and gas consumption
- 💰 Smart Payment Recommendations - Get Direct Debit suggestions with seasonal adjustments (winter +40%, summer baseline)
- ☀️ Solar/Battery Performance - Monitor export ratios, grid independence, and earnings with performance ratings
- 🌡️ Weather-Aware Anomalies - Understand consumption spikes with automatic weather correlation
- 📋 Tariff Tracking - Monitor current and upcoming tariff changes with detailed rate information
- 📄 Multiple Output Formats - Beautiful HTML reports or clean Markdown
- 💾 Local Storage - Keep historical data for trend analysis and comparisons
# Clone the repository
git clone https://github.com/matthewgall/octobudget.git
cd octobudget
# Build the application
go build
# Run the analysis
./octobudgetPre-built binaries are available on the releases page.
Create config.yaml:
# Required: Your Octopus Energy credentials
account_id: "A-1234ABCD"
api_key: "sk_live_your_api_key_here"
# Optional: Meter configuration (auto-discovered if not provided)
electricity_mpan: "1234567890123"
electricity_serial: "12L3456789"
gas_mprn: "1234567890"
gas_serial: "G4B12345678"
# Optional: Direct Debit amount for payment recommendations
direct_debit_amount: 150
# Optional: Analysis settings
analysis_period_days: 90 # Default: 90 days
anomaly_threshold: 50.0 # Default: 50%
storage_path: "~/.config/octobudget" # Default storage locationexport OCTOPUS_ACCOUNT_ID="A-1234ABCD"
export OCTOPUS_API_KEY="sk_live_your_api_key_here"
export OCTOPUS_ELECTRICITY_MPAN="1234567890123"
export OCTOPUS_ELECTRICITY_SERIAL="12L3456789"
export OCTOPUS_GAS_MPRN="1234567890"
export OCTOPUS_GAS_SERIAL="G4B12345678"
export OCTOPUS_DIRECT_DEBIT_AMOUNT="150"./octobudget -account A-1234ABCD -key sk_live_your_api_key_here- Account ID: Found in your Octopus Energy dashboard (starts with "A-")
- API Key: Generate at octopus.energy/dashboard/developer
- MPAN/MPRN: Found on your energy bills or account dashboard
- Serial Numbers: Found on your physical meters or bills
# Output to stdout (Markdown)
./octobudget
# Save Markdown report to file
./octobudget -output report.md
# Generate beautiful HTML report
./octobudget -html -output report.html
# Enable debug logging
./octobudget -debug
# Show version
./octobudget -version -config string
Path to configuration file (default "config.yaml")
-account string
Octopus Energy Account ID (overrides config)
-key string
Octopus Energy API Key (overrides config)
-output string
Output file for report (default: stdout)
-html
Generate HTML report instead of Markdown
-debug
Enable debug logging
-version
Show version and exit
Smart analysis of your energy usage with actionable insights:
- Payment recommendations with seasonal adjustments (winter +40%, summer baseline) and 10% buffer
- Solar/battery performance ratings showing export efficiency, grid independence, and ROI
- Anomaly detection with weather correlation to understand unusual consumption
- Tariff tracking for current and upcoming rate changes
- Prioritized recommendations to optimize costs and usage
Reports available in clean Markdown or beautiful HTML with Octopus Energy brand colors.
Your data stays on your machine. octobudget runs entirely locally on your computer:
- API credentials and usage data never leave your PC
- Only communicates directly with Octopus Energy API
- No third-party services or data collection
- All historical data stored locally (default:
~/.config/octobudget/) - Open source - verify the code yourself
Your API key is only used to authenticate with the official Octopus Energy API. No telemetry, tracking, or external data sharing.
-
Data Collection
- Fetches account details via Octopus Energy GraphQL API
- Retrieves consumption data for configured analysis period (default: 90 days)
- Gets time-varying tariff rates from Products API (for Intelligent Octopus Flux, etc.)
- Identifies solar/battery export meters automatically
-
Cost Calculation
- Applies time-varying rates to half-hourly consumption data
- Calculates daily averages and projects monthly costs
- Computes net costs (import - export + gas)
-
Weather Enrichment
- Fetches historical weather data from Open-Meteo API
- Correlates temperature and precipitation with consumption spikes
- Filters out weather-expected anomalies (cold snaps, heat waves)
-
Analysis & Insights
- Detects statistical anomalies (2σ+ deviations)
- Calculates seasonal Direct Debit recommendations
- Generates export performance metrics for solar/battery users
- Creates prioritized, actionable recommendations
-
Report Generation
- Produces formatted Markdown or HTML reports
- Includes all metrics, tariffs, anomalies, and insights
- Stores results locally for historical comparison
If you don't specify meter details, octobudget will:
- Automatically discover your electricity import meter
- Detect solar/battery export meters
- Identify gas meters
- Extract current tariff information
- Account data cached for 1 hour to reduce API calls
- Tariff rates cached based on date ranges
- Weather data cached by date
Direct Debit recommendations account for:
- Winter (Nov-Feb): 40% increase for heating
- Spring (Mar-Apr) & Autumn (Sep-Oct): 20% increase
- Summer (May-Aug): Baseline usage
- 10% safety buffer: Covers unexpected variations
- Year-round stability: Avoid large seasonal swings
Full support for dynamic pricing tariffs:
- Intelligent Octopus Flux
- Agile Octopus
- Go
- Any tariff with half-hourly rates
Fetches actual rates from Products API and applies them to your consumption data for accurate cost calculations.
- Verify your account ID starts with "A-"
- Check your API key is correct and active at octopus.energy/dashboard/developer
- Ensure internet connectivity
- Verify MPAN/MPRN and serial numbers are correct
- Check that your meters are submitting readings (smart meters)
- Ensure analysis period includes dates with available data
- Try running with
-debugto see detailed API responses
If you have solar/battery but no export data shows:
- The export meter may use a different serial number
- Check your Octopus account dashboard for the correct serial
- octobudget will try all discovered serial numbers automatically
For time-varying tariffs (Intelligent Octopus Flux, Agile, etc.):
- Tariff rates are fetched from the Products API
- If rates aren't available, reports will show "Time-varying (see costs in analysis)"
- Check with
-debugto see if rate fetching is successful
./octobudget -debugThis shows:
- API requests and responses
- Data fetching progress
- Analysis stages
- Cache hits/misses
- Weather data integration
go mod download
go buildIf you find octobudget useful, here are some ways to support its continued development:
Not an Octopus Energy customer yet? Use my referral link to join and we'll both get £50 credit:
Join Octopus Energy - Get £50 credit
This helps fund development of octobudget and you'll get access to:
- Saving Sessions (earn money for reducing usage during peak times)
- Free electricity sessions (completely free electricity during certain periods)
- Competitive energy rates and excellent customer service
- The greenest energy supplier in the UK
Support ongoing development and maintenance:
Your sponsorship helps with:
- Adding new features and improvements
- Maintaining compatibility with API changes
- Providing support and bug fixes
- Keeping the project free and open source
Show your appreciation by starring the repository on GitHub - it helps others discover the project!
Licensed under the Apache License, Version 2.0. See LICENSE file for details.
- octojoin - Automatically join Octopus Energy Saving Sessions and earn OctoPoints
This is an unofficial third-party application. "Octopus Energy" is a trademark of Octopus Energy Group Limited. This application is not affiliated with, endorsed by, or connected to Octopus Energy.
All projections and recommendations are based on historical data and may not reflect future usage or costs. Always verify information with your official Octopus Energy bills and account statements.