PV Forecast — 7-Tage-PV-Ertrag (Standort)
GET /v1/plant/pv-forecast— 7-Tage-Solarertrag (kWh). Loxone: PV Forecast Guide. Offene REST-API; Community 120 Anfragen/Tag (Klassepv: 48/Tag empfohlen stündlich).
Was macht diese Funktion?
PV Forecast schätzt, wie viel Solarstrom Ihre Anlage an Ihrem Standort in den nächsten Tagen liefern wird — in kWh pro Tag (optional auch stündlich).
Alltagsbeispiel: „Heute ca. 18 kWh, morgen 22 kWh, übermorgen bei Wolken nur 8 kWh.“
Dieselbe Schätz-Engine wie unter Anlagenprognose und in Hours Demand — kein zweiter Rechner.
Wann nutzen?
- Anzeige im Smart Home (z. B. Loxone Merker „Heute / Morgen …“)
- Skripte, die den erwarteten PV-Ertrag brauchen
Nicht nötig, wenn Sie nur Strompreise wollen → Forecast.
Endpoint
GET https://api.spotpriceapi.com/v1/plant/pv-forecast
Header:
X-API-Key: sf_live_YOUR_KEY
Mindestens Community-Zugang. Anonymer Basic-Key → pv_status: not_available.
Query-Parameter
| Parameter | Default | Werte | Bedeutung |
|---|---|---|---|
granularity | daily | daily \ | hourly \ |
days | 7 | 1…7 | Kalendertage ab heute (Standort-Zeitzone) |
timezone | Profil / Europe/Vienna | IANA | Taggrenzen |
locale | aus TZ abgeleitet | z. B. de, en | Texte in portal_hint |
Standort & kWp aus dem Portal
Geo und Anlagengröße kommen aus dem Anlagenprofil Ihres API-Keys — nicht aus der Query.
Tragen Sie unter Standort & Profil ein:
- Adresse / Koordinaten
- PV-Größe (kWp)
Fehlt etwas → pv_status: incomplete_input plus portal_hint und portal_url.
| Lage | pv_status | Was tun? |
|---|---|---|
| Lat/Lon oder kWp fehlen | incomplete_input | Portal füllen |
| Wettercache noch leer | weather_missing | später erneut versuchen |
| Alles ok | ok | days / loxone nutzen |
| Basic-Key | not_available | Registrieren |
Minimal-Beispiel
curl -s "https://api.spotpriceapi.com/v1/plant/pv-forecast?granularity=daily&days=7&timezone=Europe/Vienna" \
-H "X-API-Key: sf_live_YOUR_KEY"
{
"pv_status": "ok",
"pv_engine": "pv_forecast_v1",
"quota_class": "pv",
"timezone": "Europe/Vienna",
"days": [
{ "date": "2026-08-12", "label": "D0", "pv_kwh": 18.4 },
{ "date": "2026-08-13", "label": "D1", "pv_kwh": 22.1 }
],
"totals": { "pv_kwh_horizon": 124.6 },
"loxone": {
"d0_kwh": 18.4,
"d1_kwh": 22.1,
"d2_kwh": 19.0,
"d3_kwh": 8.2,
"d4_kwh": 15.6,
"d5_kwh": 21.3,
"d6_kwh": 20.0,
"week_kwh": 124.6,
"d0_load_kwh": 21.5,
"d1_load_kwh": 18.3,
"d0_soc_eod": 16.5,
"d0_tmax": 24.8,
"d0_tmin": 12.8,
"txt_d0": "Mo 12.08.2026 · PV 18,4 kWh · Last 21,5 kWh · SoC 16,5% · 13-25°",
"txt_d1": "Di 13.08.2026 · PV 22,1 kWh · Last 18,3 kWh · SoC 23,7% · 14-26°",
"txt_status": "OK"
},
"missing": [],
"portal_hint": null
}
Antwortfelder (Alltag)
| Feld | Einfach |
|---|---|
pv_status | ok = Werte brauchbar |
days[].pv_kwh | Erwarteter Ertrag dieses Tages (kWh) |
loxone.d0_kwh … d6_kwh | Dieselben Tageswerte flach für PicoC |
loxone.week_kwh | Summe der 7 Tage |
loxone.d0_load_kwh / d1_load_kwh | Last heute/morgen, nur wenn Profil oder Zähler da. Heute = dieselbe Schätzung wie Hours/Portal (Typical + Same-Day-Overlay); morgen = reines Typical |
loxone.d0_soc_eod | Speicherstand-Tagesende heute (%), nur mit Speicher+SoC — gleicher Kernel wie Anlagenprognose (Lastform Zähler/Profil, D0 ab aktueller Stunde; flat 1/24 nur Fallback). Ohne frischen Hours-Snapshot ohne Netzladung |
loxone.d0_tmax / d0_tmin | Höchst/Tiefst heute (°C) aus dem Plant-Wetter-Cache |
loxone.txt_d0 / txt_d1 | Fertige Klartextzeilen für Loxone Txt2/Txt3 (fehlende Teile weggelassen) |
hours[] | Nur bei hourly / both: { start, pv_kwh } |
plant.kwp / pv_quality | Anlagengröße; Qualität oft indicative |
missing / portal_hint / portal_url | Was fehlt + Link zum Portal |
Ablauf
Portal: Standort + kWp
↓
GET /v1/plant/pv-forecast?granularity=daily
↓
days[] + loxone.d0…d6
↓
Anzeige / EMS / Loxone Merker
Kontingent
Eigene Klasse pv: Community 48/Tag, Professional/OEM höher (288/Tag). Zählt nicht gegen das Decision-Fair-Use.
Stündlich pollen reicht — Auto-Fetch um :05 im Loxone-Guide.
Die Strahlungs-/Wetter-Quelldaten kommen aus dem Plant-Wetter-Cache (Open-Meteo, Timer 05:20 + 12:20 Wien, gleicher Cache wie Weather).
Häufige Anfängerfehler
| Problem | Lösung |
|---|---|
incomplete_input | Standort + kWp speichern |
| Basic-Key | Community-Konto + persönlicher Key |
| Riesige JSON in PicoC | granularity=daily statt hourly |
| Doppelte GETs in Loxone | Virtual Output: Digitalausgang an, Befehl AUS leer |
Nächste Schritte
- Loxone PV Forecast — Schritt für Schritt mit PicoC
- Weather — Standortwetter (Anzeige)
- Hours Demand — Ladeplan mit PV-Bilanz
- Code-Beispiele
Community registrieren oder Code-Beispiele mit Ihrem persönlichen Key.