PV Forecast — 7-day site PV yield
GET /v1/plant/pv-forecast— 7-day solar yield (kWh). Loxone: PV Forecast guide. Open REST; Community 120 requests/day (pvclass: 48/day — poll hourly).
What this does
PV Forecast estimates how much solar energy your plant will produce at your site over the next days — in kWh per day (optionally hourly).
Everyday example: “Today about 18 kWh, tomorrow 22 kWh, the day after only 8 kWh under clouds.”
Same estimate engine as Plant outlook and Hours Demand — not a second calculator.
When to use
- Smart-home displays (e.g. Loxone memories “today / tomorrow …”)
- Scripts that need expected PV yield
Not needed if you only want electricity prices → Forecast.
Endpoint
GET https://api.spotpriceapi.com/v1/plant/pv-forecast
Header:
X-API-Key: sf_live_YOUR_KEY
At least Community access. Anonymous basic key → pv_status: not_available.
Query parameters
| Parameter | Default | Values | Meaning |
|---|---|---|---|
granularity | daily | daily \ | hourly \ |
days | 7 | 1…7 | Calendar days from today (site timezone) |
timezone | profile / Europe/Vienna | IANA | Day boundaries |
locale | from TZ | e.g. de, en | portal_hint language |
Location & kWp from the portal
Geo and plant size come from the plant profile of your API key — not from the query.
Under Location & profile set:
- Address / coordinates
- PV size (kWp)
Missing data → pv_status: incomplete_input plus portal_hint and portal_url.
| Situation | pv_status | What to do |
|---|---|---|
| Lat/lon or kWp missing | incomplete_input | Fill portal |
| Weather cache empty | weather_missing | Retry later |
| OK | ok | Use days / loxone |
| Basic key | not_available | Register |
Minimal example
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": "Mon 12.08.2026 · PV 18,4 kWh · Load 21,5 kWh · SoC 16,5% · 13-25°",
"txt_d1": "Tue 13.08.2026 · PV 22,1 kWh · Load 18,3 kWh · SoC 23,7% · 14-26°",
"txt_status": "OK"
},
"missing": [],
"portal_hint": null
}
Response fields (plain language)
| Field | Meaning |
|---|---|
pv_status | ok = usable values |
days[].pv_kwh | Expected yield that day (kWh) |
loxone.d0_kwh … d6_kwh | Same day totals flat for PicoC |
loxone.week_kwh | 7-day sum |
loxone.d0_load_kwh / d1_load_kwh | Load today/tomorrow, only if profile or meter exists. Today = same estimate as Hours/portal (typical + same-day overlay); tomorrow = typical only |
loxone.d0_soc_eod | End-of-day SoC today (%), only with battery+SoC — same kernel as plant outlook (meter/profile load shape, D0 from the current hour; flat 1/24 only as fallback). Without a fresh Hours snapshot no grid charge |
loxone.d0_tmax / d0_tmin | High/low today (°C) from the plant-weather cache |
loxone.txt_d0 / txt_d1 | Ready-made lines for Loxone Txt2/Txt3 (missing parts omitted) |
hours[] | Only with hourly / both: { start, pv_kwh } |
plant.kwp / pv_quality | Plant size; quality often indicative |
missing / portal_hint / portal_url | What’s missing + portal link |
Flow
Portal: location + kWp
↓
GET /v1/plant/pv-forecast?granularity=daily
↓
days[] + loxone.d0…d6
↓
Display / EMS / Loxone memories
Quota
Own class pv: Community 48/day, Professional/OEM higher (288/day). Does not count against Decision fair-use.
Hourly polling is enough — in Loxone auto-fetch on start and at :08, see the Loxone guide. Shared host VO and minute plan: Loxone overview.
Radiation/weather source data come from the plant-weather cache (Open-Meteo, timer 05:20 + 12:20 Vienna, same cache as Weather).
Common beginner mistakes
| Problem | Fix |
|---|---|
incomplete_input | Save location + kWp |
| Basic key | Community account + personal key |
| Huge JSON in PicoC | granularity=daily instead of hourly |
| Double GETs in Loxone | Virtual Output: digital output on, Command OFF empty |
Next steps
- Loxone PV Forecast — step-by-step with PicoC
- Weather — site weather (display)
- Hours Demand — charge plan with PV balance
- Code samples
Register for Community or code samples with your personal key.