Skip to content

Latest commit

 

History

History
184 lines (130 loc) · 5.25 KB

File metadata and controls

184 lines (130 loc) · 5.25 KB

BOM API Integration - The Reality Check

🚫 The Problem

Bureau of Meteorology (BOM) has restricted public API access:

  • ❌ Previous JSON endpoints (IDS60901) are now 404 Not Found
  • ❌ No official public REST API available
  • ❌ FTP services require authentication
  • ❌ Data feeds have changed structure
  • ❌ Web scraping violates their terms of service

📊 Current BOM Data Access Methods

1. Official Data Services (Requires Registration)

  • Register at data.gov.au
  • Apply for BOM data access
  • Wait for approval
  • Use authenticated FTP/SFTP
  • Timeline: Days/weeks
  • Complexity: High

2. Third-Party BOM Aggregators

Some services aggregate BOM data:

  • OpenWeatherMap (uses BOM data for Australia)
  • Weatherzone API
  • Willyweather API
  • Cost: Usually paid services
  • Accuracy: Same as BOM (they source from BOM)

3. Web Scraping (NOT RECOMMENDED)

  • Violates BOM terms of service
  • Could break at any time
  • Legally questionable
  • Rate limiting issues

💡 Realistic Options

Option A: Keep WeatherAPI ✅ (EASIEST)

Pros:

  • ✅ Already working
  • ✅ No additional setup
  • ✅ Free tier available
  • ✅ Reliable API
  • ✅ Good enough for solar predictions

Cons:

  • ❌ Temperatures might differ from BOM by 1-3°C
  • ❌ Not "official" Australian data

Recommendation: Focus on what matters - cloud cover and UV index for solar predictions. The exact temperature doesn't affect your battery's SOC!


Option B: Use OpenWeatherMap (MEDIUM)

OpenWeatherMap aggregates BOM data for Australia.

Setup:

  1. Get free API key from openweathermap.org
  2. Update calculator to use their API
  3. Similar structure to WeatherAPI

Pros:

  • ✅ Sources from BOM for Australian locations
  • ✅ Free tier: 1000 calls/day
  • ✅ Well-documented API
  • ✅ More aligned with BOM data

Cons:

  • ❌ Need new API key
  • ❌ Still might differ slightly from BOM website
  • ❌ Requires code changes

Option C: Accept WeatherAPI Variance (SIMPLEST)

The Truth: Weather forecasts are predictions, not facts. Different models give different results.

What actually matters for your battery:

Factor Importance WeatherAPI Accuracy
☁️ Cloud cover ⭐⭐⭐⭐⭐ Critical ✅ Good
☀️ UV Index ⭐⭐⭐⭐ Very Important ✅ Good
🌧️ Rain probability ⭐⭐⭐ Important ✅ Good
🌡️ Temperature ⭐ Minor ⚠️ Varies ±2-3°C

Temperature doesn't affect solar generation - it's all about sunlight!


Option D: Hybrid Approach (RECOMMENDED) 🎯

Use WeatherAPI for automation, BOM for verification:

  1. Let the calculator use WeatherAPI for predictions
  2. Check BOM manually when you want exact temps
  3. Focus on cloud cover trends - that's what matters
  4. Use the solar multiplier to estimate battery SOC

Benefits:

  • Best of both worlds
  • No complex integration needed
  • Still get useful predictions
  • Can verify against BOM when needed

🎯 My Recommendation

Keep your current WeatherAPI setup because:

  1. It works - no broken endpoints
  2. Cloud cover is accurate - that's what drives solar
  3. UV index is reliable - affects generation
  4. Temp variance doesn't matter for battery predictions
  5. Free and simple - no authentication hassles

What to Focus On

Instead of exact temperatures, use the forecast for:

Cloud cover % → Solar generation estimate ✅ Rain probability → Backup power planning ✅ UV index → Peak generation times ✅ 7-day trends → Week-ahead battery planning

When to Check BOM

Just check BOM website manually when:

  • Planning outdoor activities (care about exact temp)
  • Severe weather warnings (BOM is authoritative)
  • Want to verify a specific day's forecast

📈 Accuracy Comparison

Real-world test (based on typical variance):

Service Cloud Cover UV Index Temperature Rain Overall Solar Prediction
BOM ⭐⭐⭐⭐⭐ ⭐⭐⭐⭐⭐ ⭐⭐⭐⭐⭐ ⭐⭐⭐⭐⭐ ⭐⭐⭐⭐⭐
WeatherAPI ⭐⭐⭐⭐ ⭐⭐⭐⭐ ⭐⭐⭐ ⭐⭐⭐⭐ ⭐⭐⭐⭐

Verdict: WeatherAPI is good enough for solar/battery predictions!


🔧 If You Still Want BOM Integration

I can help you:

Option 1: Set up OpenWeatherMap (uses BOM data)

  • Takes 10 minutes
  • Free API key
  • Better BOM alignment

Option 2: Create custom scraper (risky)

  • Violates TOS
  • Could break anytime
  • Not recommended

Option 3: Wait for official BOM API access

  • Apply at data.gov.au
  • Could take weeks
  • Requires ongoing maintenance

✅ What Should We Do?

Three paths forward:

  1. Keep WeatherAPI - Accept ±2-3°C variance, focus on solar predictions ✅ RECOMMENDED
  2. Switch to OpenWeatherMap - Better BOM alignment, requires setup
  3. Complex BOM integration - Significant effort, questionable value

Your call! What would you like to do? 🤔