☀️ solXpectmeetspython

August 20, 2025 · View on GitHub

This Python library reproduces the energy output calculations of the original SolarPowerPlant.java class from solXpect, with one minor difference: it uses a different package (pvlib) to calculate the sun's position.

The goal is to provide a transparent, reproducible, and physically aligned implementation of solXpect's solar energy model — useful for validation, experimentation, and integration into larger forecasting workflows.


📦 Features

  • ✅ Reproduces solXpect's energy output logic hour-by-hour
  • ✅ Uses Open-Meteo API for weather data (irradiance, temperature)
  • ✅ Supports shading logic, temperature derating, and inverter clipping
  • ✅ Reads plant configuration from a ZIP file (Backup database file from solXpect)
  • ✅ Outputs hourly energy forecasts in Wh, adjusted to local time zone

🔧 Requirements

  • Python 3.9+
  • Internet connection (for Open-Meteo API)
  • Backup database file from solXpect (ZIP containing SQLITE.db)

📚 Dependencies

LibraryPurpose
pvlibSolar position calculation
requestsAPI calls to Open-Meteo
sqlite3Reading plant configuration from ZIP
pandasData handling and time series manipulation

🚀 Quick Start

  1. Clone this repository:
    git clone https://github.com/yourusername/solar-forecast-repro.git
    cd solar-forecast-repro