Ertragsprognose über Solcast
Moderator: Ulrich
-
- Beiträge: 69
- Registriert: Di 17. Jan 2023, 08:30
- Hat sich bedankt: 3 Mal
- Danksagung erhalten: 1 Mal
Re: Ertragsprognose über Solcast
Ich versuch das mal zu ordnen bzw zu „beantworten“:
- die PVForecasts.py kann ich morgen mal posten wenn das weiterhilft
- ich verwende das Solaranzeigen Image 5.1.2 64bit
- ich habe zuletzt die light Version installiert mit ich meine python3 pip, panda, numpy, pysolcast und astral. Das hat ohne Fehlermeldung geklappt, also keine bottleneck-Probleme oder andere.
- das Abfrageinterval: das mit 10 Abfragen bzw 2,5Std hatte ich mir auch schon ausgerechnet. Da ich eine Ost-West Anlage habe dann nur noch die Hälfte. Da eine Abfrage erfolgreich war hat Solcast 2 (wegen Ost-West) von 10 benutzt angezeigt. Aber da noch 8 übrig waren hätten doch auch nach 15:30 Abfragen laufen können?! Und selbst am nächsten Tag funktioniert es nicht mehr, was mich daran am meisten verwirrt. Selbst über python SolCastLight.py klappt es nicht, da kommt nur Start - Ende, ohne downloading data dazwischen.
Re: Ertragsprognose über Solcast
... komisch. Das sollte so nicht sein. - aber vorher auch frohe Weihnachten!
Ich schau grad in den Code. Jetzt wird's leider etwas kompliziert ... Ich versuch's mal ...
Ich nehme mal an, das `solcast.ini` File das Du am 8. Dezember gepostet hast, stimmt noch? - scheint mir auch richtig zu sein. Damit müsstest Du in `solcast.py` in `getSolCast` landen (Zeile 119). Dort heisst es:
Code: Alles auswählen
def getSolCast(self):
if (self._doDownload()):
hours = self.config['SolCast'].getint('Hours', 168) # requires update of pysolcast
Code: Alles auswählen
if self._force or self._interval == -3 or (now_utc > mySun['sunrise'] and now_utc < mySun['sunset']): # storeDB enabled, SolCast enabled, daylight
if self._storeDB or self._storeInflux:
Code: Alles auswählen
print("day time")
Code: Alles auswählen
print("---")
print(delta_t)
print(interval)
if delta_t > interval - 2:
retVal = True
Lass uns das mal ausführen und dann weiter sehen. Falls Du eine effizientere Idee hast, das remote zu debuggen, lass es mich wissen

Stefan
-
- Beiträge: 69
- Registriert: Di 17. Jan 2023, 08:30
- Hat sich bedankt: 3 Mal
- Danksagung erhalten: 1 Mal
Re: Ertragsprognose über Solcast

Damit ich eine saubere Installation habe habe ich nochmal alles neu aufgesetzt und die packages einzeln installiert und nicht über die requirements.txt. Lief alles ohne Fehler. Config.ini wieder angepasst, Test cd Pv -> python PVForecasts.py :
Code: Alles auswählen
pi@solaranzeige:~/PV $ python PVForecasts.py
------------------------- Start (config.ini at 2023-12-25, 14:30:13 - local)
Message - downloading SolCast data at (UTC): 2023-12-25 13:30:13.736624+00:00
/home/pi/PV/PVForecast/solcast.py:146: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
period = df['period'][0]
------------------------- End (2023-12-25, 14:30:17 - local)
Dann den Eintrag in crontab gemacht.
Code: Alles auswählen
*/15 * * * * cd /home/pi/PV && /usr/bin/python3 PVForecast[b]S[/b].py >> /home/pi/PV/data/err.txt 2>&1
14:45 nichts, 15:00 nichts,...
Nochmal cd PV -> python PVForecasts.py probiert:
Code: Alles auswählen
pi@solaranzeige:~/PV $ python PVForecasts.py
------------------------- Start (config.ini at 2023-12-25, 15:04:25 - local)
------------------------- End (2023-12-25, 15:04:25 - local)
Dann habe ich mal den Code den du gepostet hast in die solcast.py in /PV/PVForecast/ eingefügt:
Code: Alles auswählen
storeDB enabled, SolCast enabled, daylight
if self._storeDB or self._storeInflux:
print("day time")
if self._storeDB:
self._db = DBRepository(self.config)
self.last_issue = self._db.getLastIssueTime(self.SQLTable)
Code: Alles auswählen
# download in regular intervals during full day (24h)
interval = optimal
else:
interval = optimal
print("---")
print(delta_t)
print(interval)
if delta_t > interval - 2:
retVal = True
cd PV -> python PVForecasts.py ergab dann
Code: Alles auswählen
pi@solaranzeige:~/PV $ python PVForecasts.py
------------------------- Start (config.ini at 2023-12-25, 15:09:21 - local)
day time
---
39
180
------------------------- End (2023-12-25, 15:09:21 - local)
Re: Ertragsprognose über Solcast
... also, macht ja nichts. Du solltest ja gar nicht diese Probleme habenAlso erstmal: ich kann kein python, php etc und bessere Ideen habe ich leider auch nicht. Ich bin da leider echt auf fremde Hilfe angewiesen

... hast Du recht, werde ich anpassen in Githubfehlt da eigentlich das s hinter PVForecast? Hab das so von Github kopiert

mit Deinen print Statements sieht man jetzt wenigstens, wo's nicht weiter geht:
delta_t = 39, interval = 180 - somit delta_t < interval, und der nächste Call ist noch nicht fällig. Du hast den ersten Call so abgesetzt, dass die erste Forecast Period um 15:00 geendet hat ... Dein Call war also irgendwann zwischen 14:30 und 15:00 - frühestens um 14:30. Deshalb ist interval um 15:09 eben (15:09 - 14:30) = 39m
Wenn jetzt Sommer wäre (also lange Tage), würdest Du jetzt sehen: 54/180 --> 69/180 --> ... --> 174/180 --> 189/180/call --> 15/180 --> ...
Das siehst Du jetzt nicht, weil die Sonne vorher untergeht, und Du nicht mehr da vorbei kommst.
Morgen, nach Sonnenaufgang (sagen wir 8:40, je nach dem wo Du genau bist) findet der crontab call um 8:45 statt. Dann ist (8:45 - 14:30_vortag) = 18h15m = 1095m > 180m und die Abfrage sollte starten. Lass das System mal laufen bis morgen Mittag und schick die Einträge im log file, falls es nicht geht ... (Kann es sein, dass heute die Abfrage nicht gestartet hat wegen meinem Schreibfehler im crontab Eintrag?)
Was mich noch etwas verwirrt, ist interval = 180. Das sollte nur im Süden (südlich von ca. Florenz) vorkommen, wo die Tage länger sind. Hier im Norden (ich bin in NRW) würden 90m Intervalle genügen, auch mit nur fünf Abfragen für Dual-Array. Kann es sein, dass Du so weit südlich bist?
Das Spiel geht immer wie hier beschriebenFunktioniert eine manuelle Zwischen-Abfrage überhaupt oder wird die irgendwo durch das Time Intervall "unterbunden"?
- delta_t = now - last_successful_download > interval (wobei interval optimiert wird, wie beschrieben)
- last_successful_download = 1. Jan. 1970 falls noch kein Download; nach jedem erfolgreichen Download wird die Zeit in `forecast_log` gespeichert
Code: Alles auswählen
force = 1

Ich hoffe, das hier hilft etwas ...? Sonst machen wir halt weiter

-
- Beiträge: 69
- Registriert: Di 17. Jan 2023, 08:30
- Hat sich bedankt: 3 Mal
- Danksagung erhalten: 1 Mal
Re: Ertragsprognose über Solcast
ES LÄUFT!

Hier nochmal die log-Datei bis jetzt:
Code: Alles auswählen
/home/pi/PV/PVForecast/solcast.py:150: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
period = df['period'][0]
------------------------- Start (config.ini at 2023-12-26, 10:30:03 - local)
day time
---
1200
90
Message - downloading SolCast data at (UTC): 2023-12-26 09:30:03.888782+00:00
------------------------- End (2023-12-26, 10:30:05 - local)
------------------------- Start (config.ini at 2023-12-26, 10:45:03 - local)
day time
---
15
90
------------------------- End (2023-12-26, 10:45:03 - local)
------------------------- Start (config.ini at 2023-12-26, 11:00:03 - local)
day time
---
30
90
------------------------- End (2023-12-26, 11:00:03 - local)
------------------------- Start (config.ini at 2023-12-26, 11:15:03 - local)
day time
---
45
90
------------------------- End (2023-12-26, 11:15:03 - local)
------------------------- Start (config.ini at 2023-12-26, 11:30:04 - local)
day time
---
60
90
------------------------- End (2023-12-26, 11:30:04 - local)
------------------------- Start (config.ini at 2023-12-26, 11:45:03 - local)
day time
---
75
90
------------------------- End (2023-12-26, 11:45:03 - local)
/home/pi/PV/PVForecast/solcast.py:150: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
period = df['period'][0]
------------------------- Start (config.ini at 2023-12-26, 12:00:03 - local)
day time
---
90
90
Message - downloading SolCast data at (UTC): 2023-12-26 11:00:03.226494+00:00
------------------------- End (2023-12-26, 12:00:07 - local)
------------------------- Start (config.ini at 2023-12-26, 12:15:03 - local)
day time
---
15
90
------------------------- End (2023-12-26, 12:15:03 - local)
------------------------- Start (config.ini at 2023-12-26, 12:30:03 - local)
day time
---
30
90
------------------------- End (2023-12-26, 12:30:03 - local)
------------------------- Start (config.ini at 2023-12-26, 12:45:03 - local)
day time
---
45
90
------------------------- End (2023-12-26, 12:45:03 - local)
------------------------- Start (config.ini at 2023-12-26, 13:00:03 - local)
day time
---
60
90
------------------------- End (2023-12-26, 13:00:03 - local)
------------------------- Start (config.ini at 2023-12-26, 13:15:03 - local)
day time
---
75
90
------------------------- End (2023-12-26, 13:15:03 - local)
/home/pi/PV/PVForecast/solcast.py:150: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
period = df['period'][0]
------------------------- Start (config.ini at 2023-12-26, 13:30:03 - local)
day time
---
90
90
Message - downloading SolCast data at (UTC): 2023-12-26 12:30:03.279127+00:00
------------------------- End (2023-12-26, 13:30:06 - local)
------------------------- Start (config.ini at 2023-12-26, 13:45:03 - local)
day time
---
15
90
------------------------- End (2023-12-26, 13:45:03 - local)
------------------------- Start (config.ini at 2023-12-26, 14:00:03 - local)
day time
---
30
90
------------------------- End (2023-12-26, 14:00:03 - local)
------------------------- Start (config.ini at 2023-12-26, 14:15:03 - local)
day time
---
45
90
------------------------- End (2023-12-26, 14:15:03 - local)
------------------------- Start (config.ini at 2023-12-26, 14:30:04 - local)
day time
---
60
90
------------------------- End (2023-12-26, 14:30:04 - local)
------------------------- Start (config.ini at 2023-12-26, 14:45:03 - local)
day time
---
75
180
------------------------- End (2023-12-26, 14:45:03 - local)
------------------------- Start (config.ini at 2023-12-26, 15:00:03 - local)
day time
---
90
180
------------------------- End (2023-12-26, 15:00:03 - local)
------------------------- Start (config.ini at 2023-12-26, 15:15:03 - local)
day time
---
105
180
------------------------- End (2023-12-26, 15:15:03 - local)
------------------------- Start (config.ini at 2023-12-26, 15:30:03 - local)
day time
---
120
180
------------------------- End (2023-12-26, 15:30:03 - local)
------------------------- Start (config.ini at 2023-12-26, 15:45:03 - local)
day time
---
135
180
------------------------- End (2023-12-26, 15:45:03 - local)
------------------------- Start (config.ini at 2023-12-26, 16:00:03 - local)
day time
---
150
180
------------------------- End (2023-12-26, 16:00:04 - local)
------------------------- Start (config.ini at 2023-12-26, 16:15:03 - local)
------------------------- End (2023-12-26, 16:15:03 - local)
------------------------- Start (config.ini at 2023-12-26, 16:30:03 - local)
------------------------- End (2023-12-26, 16:30:03 - local)
------------------------- Start (config.ini at 2023-12-26, 16:45:03 - local)
------------------------- End (2023-12-26, 16:45:03 - local)
------------------------- Start (config.ini at 2023-12-26, 17:00:04 - local)
------------------------- End (2023-12-26, 17:00:04 - local)
------------------------- Start (config.ini at 2023-12-26, 17:15:03 - local)
------------------------- End (2023-12-26, 17:15:03 - local)
------------------------- Start (config.ini at 2023-12-26, 17:30:04 - local)
------------------------- End (2023-12-26, 17:30:04 - local)
------------------------- Start (config.ini at 2023-12-26, 17:45:03 - local)
------------------------- End (2023-12-26, 17:45:03 - local)
------------------------- Start (config.ini at 2023-12-26, 18:00:03 - local)
------------------------- End (2023-12-26, 18:00:03 - local)
------------------------- Start (config.ini at 2023-12-26, 18:15:03 - local)
------------------------- End (2023-12-26, 18:15:03 - local)
------------------------- Start (config.ini at 2023-12-26, 18:30:03 - local)
------------------------- End (2023-12-26, 18:30:03 - local)
------------------------- Start (config.ini at 2023-12-26, 18:45:03 - local)
------------------------- End (2023-12-26, 18:45:03 - local)
------------------------- Start (config.ini at 2023-12-26, 19:00:04 - local)
------------------------- End (2023-12-26, 19:00:04 - local)
------------------------- Start (config.ini at 2023-12-26, 19:15:03 - local)
------------------------- End (2023-12-26, 19:15:03 - local)
------------------------- Start (config.ini at 2023-12-26, 19:30:03 - local)
------------------------- End (2023-12-26, 19:30:03 - local)
------------------------- Start (config.ini at 2023-12-26, 19:45:03 - local)
------------------------- End (2023-12-26, 19:45:03 - local)
------------------------- Start (config.ini at 2023-12-26, 20:00:04 - local)
------------------------- End (2023-12-26, 20:00:04 - local)
------------------------- Start (config.ini at 2023-12-26, 20:15:03 - local)
------------------------- End (2023-12-26, 20:15:04 - local)
------------------------- Start (config.ini at 2023-12-26, 20:30:03 - local)
------------------------- End (2023-12-26, 20:30:03 - local)
------------------------- Start (config.ini at 2023-12-26, 20:45:03 - local)
------------------------- End (2023-12-26, 20:45:03 - local)
------------------------- Start (config.ini at 2023-12-26, 21:00:03 - local)
------------------------- End (2023-12-26, 21:00:03 - local)
------------------------- Start (config.ini at 2023-12-26, 21:15:03 - local)
------------------------- End (2023-12-26, 21:15:03 - local)
------------------------- Start (config.ini at 2023-12-26, 21:30:03 - local)
------------------------- End (2023-12-26, 21:30:03 - local)
------------------------- Start (config.ini at 2023-12-26, 21:45:03 - local)
------------------------- End (2023-12-26, 21:45:03 - local)
------------------------- Start (config.ini at 2023-12-26, 22:00:03 - local)
------------------------- End (2023-12-26, 22:00:03 - local)
------------------------- Start (config.ini at 2023-12-26, 22:15:03 - local)
------------------------- End (2023-12-26, 22:15:03 - local)
------------------------- Start (config.ini at 2023-12-26, 22:30:03 - local)
------------------------- End (2023-12-26, 22:30:03 - local)
------------------------- Start (config.ini at 2023-12-26, 22:45:03 - local)
------------------------- End (2023-12-26, 22:45:03 - local)
------------------------- Start (config.ini at 2023-12-26, 23:00:03 - local)
------------------------- End (2023-12-26, 23:00:03 - local)
------------------------- Start (config.ini at 2023-12-26, 23:15:03 - local)
------------------------- End (2023-12-26, 23:15:03 - local)
------------------------- Start (config.ini at 2023-12-26, 23:30:03 - local)
------------------------- End (2023-12-26, 23:30:03 - local)
------------------------- Start (config.ini at 2023-12-26, 23:45:03 - local)
------------------------- End (2023-12-26, 23:45:03 - local)
------------------------- Start (config.ini at 2023-12-27, 00:00:04 - local)
------------------------- End (2023-12-27, 00:00:04 - local)
------------------------- Start (config.ini at 2023-12-27, 00:15:03 - local)
------------------------- End (2023-12-27, 00:15:03 - local)
------------------------- Start (config.ini at 2023-12-27, 00:30:03 - local)
------------------------- End (2023-12-27, 00:30:03 - local)
------------------------- Start (config.ini at 2023-12-27, 00:45:03 - local)
------------------------- End (2023-12-27, 00:45:03 - local)
------------------------- Start (config.ini at 2023-12-27, 01:00:03 - local)
------------------------- End (2023-12-27, 01:00:03 - local)
------------------------- Start (config.ini at 2023-12-27, 01:15:03 - local)
------------------------- End (2023-12-27, 01:15:03 - local)
------------------------- Start (config.ini at 2023-12-27, 01:30:03 - local)
------------------------- End (2023-12-27, 01:30:03 - local)
------------------------- Start (config.ini at 2023-12-27, 01:45:03 - local)
------------------------- End (2023-12-27, 01:45:03 - local)
------------------------- Start (config.ini at 2023-12-27, 02:00:03 - local)
------------------------- End (2023-12-27, 02:00:03 - local)
------------------------- Start (config.ini at 2023-12-27, 02:15:03 - local)
------------------------- End (2023-12-27, 02:15:03 - local)
------------------------- Start (config.ini at 2023-12-27, 02:30:03 - local)
------------------------- End (2023-12-27, 02:30:03 - local)
------------------------- Start (config.ini at 2023-12-27, 02:45:03 - local)
------------------------- End (2023-12-27, 02:45:03 - local)
------------------------- Start (config.ini at 2023-12-27, 03:00:03 - local)
------------------------- End (2023-12-27, 03:00:03 - local)
------------------------- Start (config.ini at 2023-12-27, 03:15:03 - local)
------------------------- End (2023-12-27, 03:15:03 - local)
------------------------- Start (config.ini at 2023-12-27, 03:30:03 - local)
------------------------- End (2023-12-27, 03:30:03 - local)
------------------------- Start (config.ini at 2023-12-27, 03:45:03 - local)
------------------------- End (2023-12-27, 03:45:03 - local)
------------------------- Start (config.ini at 2023-12-27, 04:00:03 - local)
------------------------- End (2023-12-27, 04:00:03 - local)
------------------------- Start (config.ini at 2023-12-27, 04:15:03 - local)
------------------------- End (2023-12-27, 04:15:03 - local)
------------------------- Start (config.ini at 2023-12-27, 04:30:04 - local)
------------------------- End (2023-12-27, 04:30:04 - local)
------------------------- Start (config.ini at 2023-12-27, 04:45:03 - local)
------------------------- End (2023-12-27, 04:45:03 - local)
------------------------- Start (config.ini at 2023-12-27, 05:00:03 - local)
------------------------- End (2023-12-27, 05:00:03 - local)
------------------------- Start (config.ini at 2023-12-27, 05:15:03 - local)
------------------------- End (2023-12-27, 05:15:03 - local)
------------------------- Start (config.ini at 2023-12-27, 05:30:03 - local)
------------------------- End (2023-12-27, 05:30:03 - local)
------------------------- Start (config.ini at 2023-12-27, 05:45:03 - local)
------------------------- End (2023-12-27, 05:45:03 - local)
------------------------- Start (config.ini at 2023-12-27, 06:00:03 - local)
------------------------- End (2023-12-27, 06:00:03 - local)
------------------------- Start (config.ini at 2023-12-27, 06:15:03 - local)
------------------------- End (2023-12-27, 06:15:03 - local)
------------------------- Start (config.ini at 2023-12-27, 06:30:03 - local)
------------------------- End (2023-12-27, 06:30:03 - local)
------------------------- Start (config.ini at 2023-12-27, 06:45:03 - local)
------------------------- End (2023-12-27, 06:45:03 - local)
------------------------- Start (config.ini at 2023-12-27, 07:00:03 - local)
------------------------- End (2023-12-27, 07:00:03 - local)
------------------------- Start (config.ini at 2023-12-27, 07:15:03 - local)
------------------------- End (2023-12-27, 07:15:03 - local)
------------------------- Start (config.ini at 2023-12-27, 07:30:03 - local)
------------------------- End (2023-12-27, 07:30:03 - local)
------------------------- Start (config.ini at 2023-12-27, 07:45:03 - local)
------------------------- End (2023-12-27, 07:45:03 - local)
------------------------- Start (config.ini at 2023-12-27, 08:00:04 - local)
------------------------- End (2023-12-27, 08:00:04 - local)
------------------------- Start (config.ini at 2023-12-27, 08:15:03 - local)
------------------------- End (2023-12-27, 08:15:03 - local)
------------------------- Start (config.ini at 2023-12-27, 08:30:03 - local)
------------------------- End (2023-12-27, 08:30:03 - local)
/home/pi/PV/PVForecast/solcast.py:150: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
period = df['period'][0]
------------------------- Start (config.ini at 2023-12-27, 08:45:03 - local)
day time
---
1155
180
Message - downloading SolCast data at (UTC): 2023-12-27 07:45:03.768425+00:00
------------------------- End (2023-12-27, 08:45:06 - local)
------------------------- Start (config.ini at 2023-12-27, 09:00:03 - local)
day time
---
15
180
------------------------- End (2023-12-27, 09:00:03 - local)
------------------------- Start (config.ini at 2023-12-27, 09:15:03 - local)
day time
---
30
180
------------------------- End (2023-12-27, 09:15:03 - local)
------------------------- Start (config.ini at 2023-12-27, 09:30:03 - local)
day time
---
45
180
------------------------- End (2023-12-27, 09:30:03 - local)
------------------------- Start (config.ini at 2023-12-27, 09:45:03 - local)
day time
---
60
180
------------------------- End (2023-12-27, 09:45:03 - local)
------------------------- Start (config.ini at 2023-12-27, 10:00:04 - local)
day time
---
75
180
------------------------- End (2023-12-27, 10:00:04 - local)
/home/pi/PV/PVForecast/solcast.py:150: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
period = df['period'][0]
------------------------- Start (config.ini at 2023-12-27, 10:15:03 - local)
day time
---
90
90
Message - downloading SolCast data at (UTC): 2023-12-27 09:15:03.641041+00:00
------------------------- End (2023-12-27, 10:15:07 - local)
------------------------- Start (config.ini at 2023-12-27, 10:30:03 - local)
day time
---
15
90
------------------------- End (2023-12-27, 10:30:03 - local)
------------------------- Start (config.ini at 2023-12-27, 10:45:03 - local)
day time
---
30
90
------------------------- End (2023-12-27, 10:45:03 - local)
------------------------- Start (config.ini at 2023-12-27, 11:00:03 - local)
day time
---
45
90
------------------------- End (2023-12-27, 11:00:03 - local)
------------------------- Start (config.ini at 2023-12-27, 11:15:03 - local)
day time
---
60
90
------------------------- End (2023-12-27, 11:15:03 - local)
------------------------- Start (config.ini at 2023-12-27, 11:30:03 - local)
day time
---
75
90
------------------------- End (2023-12-27, 11:30:03 - local)
/home/pi/PV/PVForecast/solcast.py:150: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
period = df['period'][0]
------------------------- Start (config.ini at 2023-12-27, 11:45:03 - local)
day time
---
90
90
Message - downloading SolCast data at (UTC): 2023-12-27 10:45:03.197616+00:00
------------------------- End (2023-12-27, 11:45:06 - local)
------------------------- Start (config.ini at 2023-12-27, 12:00:03 - local)
day time
---
15
90
------------------------- End (2023-12-27, 12:00:03 - local)
------------------------- Start (config.ini at 2023-12-27, 12:15:03 - local)
day time
---
30
90
------------------------- End (2023-12-27, 12:15:03 - local)
------------------------- Start (config.ini at 2023-12-27, 12:30:03 - local)
day time
---
45
90
------------------------- End (2023-12-27, 12:30:03 - local)
------------------------- Start (config.ini at 2023-12-27, 12:45:03 - local)
day time
---
60
90
------------------------- End (2023-12-27, 12:45:03 - local)
------------------------- Start (config.ini at 2023-12-27, 13:00:03 - local)
day time
---
75
90
------------------------- End (2023-12-27, 13:00:03 - local)
/home/pi/PV/PVForecast/solcast.py:150: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
period = df['period'][0]
------------------------- Start (config.ini at 2023-12-27, 13:15:03 - local)
day time
---
90
90
Message - downloading SolCast data at (UTC): 2023-12-27 12:15:03.802702+00:00
------------------------- End (2023-12-27, 13:15:06 - local)
------------------------- Start (config.ini at 2023-12-27, 13:30:03 - local)
day time
---
15
90
------------------------- End (2023-12-27, 13:30:03 - local)
------------------------- Start (config.ini at 2023-12-27, 13:45:03 - local)
day time
---
30
90
------------------------- End (2023-12-27, 13:45:03 - local)
------------------------- Start (config.ini at 2023-12-27, 14:00:03 - local)
day time
---
45
90
------------------------- End (2023-12-27, 14:00:03 - local)
------------------------- Start (config.ini at 2023-12-27, 14:15:04 - local)
day time
---
60
90
------------------------- End (2023-12-27, 14:15:04 - local)
------------------------- Start (config.ini at 2023-12-27, 14:30:03 - local)
day time
---
75
90
------------------------- End (2023-12-27, 14:30:03 - local)
------------------------- Start (config.ini at 2023-12-27, 14:45:03 - local)
day time
---
90
180
------------------------- End (2023-12-27, 14:45:03 - local)
Erstens:
Wieso springt hier am 26.12. das Intervall von 90 auf 180?
Code: Alles auswählen
Start (config.ini at 2023-12-26, 14:30:04 - local)
day time
---
60
90
------------------------- End (2023-12-26, 14:30:04 - local)
------------------------- Start (config.ini at 2023-12-26, 14:45:03 - local)
day time
---
75
180
------------------------- End (2023-12-26, 14:45:03 - local)
Code: Alles auswählen
------------------------- Start (config.ini at 2023-12-27, 10:00:04 - local)
day time
---
75
180
------------------------- End (2023-12-27, 10:00:04 - local)
/home/pi/PV/PVForecast/solcast.py:150: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
period = df['period'][0]
------------------------- Start (config.ini at 2023-12-27, 10:15:03 - local)
day time
---
90
90
Message - downloading SolCast data at (UTC): 2023-12-27 09:15:03.641041+00:00
------------------------- End (2023-12-27, 10:15:07 - local)
das zweiten:
Wenn ich dich richtig verstanden habe wird das Intervall anhand der 10 verfügbaren Calls automatisch errechnet? Also das zB im Sommer bei längeren Tagen nur alle 2,5Std abgrufen wird? Und das ich pro Abruf zwei API-Calls verbrauche wird auch berücksichtigt?
Und die unterschiedlichen Zeiten Zeitangaben von "local" und "UTC" beim Download wie kommen die zustande oder ist die Abweichung von einer Stunde egal? Im Raspberry ist Datum und Uhrzeit korrekt eingestellt.
Re: Ertragsprognose über Solcast

Intern im Script geht alles in UTC. Wenn man nach Influx schreibt, hat Influx auch immer die Annahme, dass die Timestamps in UTC sind. Erst Grafana verwandelt das wieder in local. Also ist auch all mein Output in UTC. Das macht auch Sommerzeit, etc. überflüssig: Im Sommer ist local (DE) und UTC einfach 2h auseinander statt 1h im Winter. Das einzige Problem das mein Script hat (soweit ich das erfasse), ist, wenn Du es an einem Ort laufen lässt, wo UTC Midnight am Tag ist. Bis jetzt kenne ich keine Benutzer in Asien/OzeanienUnd die unterschiedlichen Zeiten Zeitangaben von "local" und "UTC" beim Download wie kommen die zustande oder ist die Abweichung von einer Stunde egal?

Die einzige Ausnahme von UTC ist start/end - die sind local.
ok., hab ich auch raus gefunden, da es in Deinem solcast.ini file steht. Kann es sein, dass Du Dich beim neu aufsetzten vertippt hast und jetzt `Latitude = 43.132262` steht?Achso, ich bin weder in Florenz noch weit südlich sondern im Norden von Niedersachsen.
Genau ... im Directory `debug` gibt's ein kleines Script `solcast_timeInterval` das die gleiche Logik implementiert, aber nur Terminal Output generiert - praktisch zum debuggen. Das ist nur ein kleines Script für mich ... aber wenn Du das wie folgt konfigurierst:Wieso springt hier am 26.12. das Intervall von 90 auf 180?
...
Wenn ich dich richtig verstanden habe wird das Intervall anhand der 10 verfügbaren Calls automatisch errechnet? Also das zB im Sommer bei längeren Tagen nur alle 2,5Std abgrufen wird? Und das ich pro Abruf zwei API-Calls verbrauche wird auch berücksichtigt?
Code: Alles auswählen
# --------------------------------------------------------------------------- User Input required here
location = LocationInfo('na', 'na', 'UTC', latitude=43.132262, longitude=8.25375) # Frankfurt: 50.2N / 8.7E
day = datetime(2023, 12, 26, 0, 0, 0, tzinfo=timezone.utc) # day, from which to run
DAYS = 1 # number of days to run (more verbpose output if DAYS = 1)
INTERVAL = 0 # interval used (as in solcast.py: 0 .. -3)
apiCalls = 10 # available API credits
isDualArray = True # whether we have a dual-array config
Code: Alles auswählen
Sunrise= 2023-12-26 06:57:42.291564+00:00 ; Sunset= 2023-12-26 15:57:09.225022+00:00 ; Minutes= 539.4488909666667
want= 107.88977819333334 ; optimal= 90
1 -- 2023-12-26 07:00:00+00:00 ; 28392900
2 -- 2023-12-26 10:00:00+00:00 ; 180
3 -- 2023-12-26 11:30:00+00:00 ; 90
4 -- 2023-12-26 14:30:00+00:00 ; 180
day: 2023-12-26 nCalls= 4 Intervals used: {90, 180}
--- overall run summary
credits used: {4}
all steps: {90, 180}

Wenn ich jetzt zurück schalte auf 53.13N und neu konfiguriere:
Code: Alles auswählen
# --------------------------------------------------------------------------- User Input required here
location = LocationInfo('na', 'na', 'UTC', latitude=53.132262, longitude=8.25375) # Frankfurt: 50.2N / 8.7E
day = datetime(2023, 1, 1, 0, 0, 0, tzinfo=timezone.utc) # day, from which to run
DAYS = 365 # number of days to run (more verbose output if DAYS = 1)
INTERVAL = 0 # interval used (as in solcast.py: 0 .. -3)
apiCalls = 10 # available API credits
isDualArray = True # whether we have a dual-array config
# --------------------------------------------------------------------------- End of User Input
Ich werde eine neue Version auf Github stellen, die etwas genauer berichtet, was bei SolCast passiert. (Beachte das 'after', da das script nicht weiss, wann genau es von crontab gerufen wird)
Code: Alles auswählen
Message - SolCast download inhibted between sunset and sunrise (see 'interval' parameter)
Message - SolCast download inhibted to preserve credits; next DL planned after (UTC): YYYY/mm/dd HH:MM:SS
Vielen Dank für Deine Geduld

-
- Beiträge: 69
- Registriert: Di 17. Jan 2023, 08:30
- Hat sich bedankt: 3 Mal
- Danksagung erhalten: 1 Mal
Re: Ertragsprognose über Solcast

Die config.ini habe ich nochmal kontrolliert und die Koordinaten stimmen Latitude = 53.132995 und Longitude = 8.249164 (aus Solcast übernommen)
Und heute hat auch mit den Zeiten alles gepasst. Sonnenaufgang war 8:41 und Untergang ist 16:15
Code: Alles auswählen
------------------------- Start (config.ini at 2023-12-28, 08:30:03 - local)
------------------------- End (2023-12-28, 08:30:03 - local)
/home/pi/PV/PVForecast/solcast.py:150: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
period = df['period'][0]
------------------------- Start (config.ini at 2023-12-28, 08:45:03 - local)
day time
---
1170
180
Message - downloading SolCast data at (UTC): 2023-12-28 07:45:03.637898+00:00
------------------------- End (2023-12-28, 08:45:06 - local)
------------------------- Start (config.ini at 2023-12-28, 09:00:03 - local)
day time
---
15
180
------------------------- End (2023-12-28, 09:00:03 - local)
------------------------- Start (config.ini at 2023-12-28, 09:15:03 - local)
day time
---
30
180
------------------------- End (2023-12-28, 09:15:03 - local)
------------------------- Start (config.ini at 2023-12-28, 09:30:03 - local)
day time
---
45
180
------------------------- End (2023-12-28, 09:30:03 - local)
------------------------- Start (config.ini at 2023-12-28, 09:45:03 - local)
day time
---
60
180
------------------------- End (2023-12-28, 09:45:03 - local)
------------------------- Start (config.ini at 2023-12-28, 10:00:03 - local)
day time
---
75
180
------------------------- End (2023-12-28, 10:00:03 - local)
/home/pi/PV/PVForecast/solcast.py:150: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
period = df['period'][0]
------------------------- Start (config.ini at 2023-12-28, 10:15:03 - local)
day time
---
90
90
Message - downloading SolCast data at (UTC): 2023-12-28 09:15:03.475894+00:00
------------------------- End (2023-12-28, 10:15:05 - local)
------------------------- Start (config.ini at 2023-12-28, 10:30:03 - local)
day time
---
15
90
------------------------- End (2023-12-28, 10:30:03 - local)
------------------------- Start (config.ini at 2023-12-28, 10:45:03 - local)
day time
---
30
90
------------------------- End (2023-12-28, 10:45:03 - local)
------------------------- Start (config.ini at 2023-12-28, 11:00:03 - local)
day time
---
45
90
------------------------- End (2023-12-28, 11:00:03 - local)
------------------------- Start (config.ini at 2023-12-28, 11:15:03 - local)
day time
---
60
90
------------------------- End (2023-12-28, 11:15:03 - local)
------------------------- Start (config.ini at 2023-12-28, 11:30:03 - local)
day time
---
75
90
------------------------- End (2023-12-28, 11:30:03 - local)
/home/pi/PV/PVForecast/solcast.py:150: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
period = df['period'][0]
------------------------- Start (config.ini at 2023-12-28, 11:45:03 - local)
day time
---
90
90
Message - downloading SolCast data at (UTC): 2023-12-28 10:45:03.624558+00:00
------------------------- End (2023-12-28, 11:45:06 - local)
------------------------- Start (config.ini at 2023-12-28, 12:00:03 - local)
day time
---
15
90
------------------------- End (2023-12-28, 12:00:03 - local)
------------------------- Start (config.ini at 2023-12-28, 12:15:03 - local)
day time
---
30
90
------------------------- End (2023-12-28, 12:15:03 - local)
------------------------- Start (config.ini at 2023-12-28, 12:30:03 - local)
day time
---
45
90
------------------------- End (2023-12-28, 12:30:03 - local)
------------------------- Start (config.ini at 2023-12-28, 12:45:03 - local)
day time
---
60
90
------------------------- End (2023-12-28, 12:45:03 - local)
------------------------- Start (config.ini at 2023-12-28, 13:00:03 - local)
day time
---
75
90
------------------------- End (2023-12-28, 13:00:03 - local)
/home/pi/PV/PVForecast/solcast.py:150: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
period = df['period'][0]
------------------------- Start (config.ini at 2023-12-28, 13:15:03 - local)
day time
---
90
90
Message - downloading SolCast data at (UTC): 2023-12-28 12:15:03.655455+00:00
------------------------- End (2023-12-28, 13:15:06 - local)
------------------------- Start (config.ini at 2023-12-28, 13:30:03 - local)
day time
---
15
90
------------------------- End (2023-12-28, 13:30:03 - local)
------------------------- Start (config.ini at 2023-12-28, 13:45:03 - local)
day time
---
30
90
------------------------- End (2023-12-28, 13:45:03 - local)
------------------------- Start (config.ini at 2023-12-28, 14:00:03 - local)
day time
---
45
90
------------------------- End (2023-12-28, 14:00:03 - local)
------------------------- Start (config.ini at 2023-12-28, 14:15:03 - local)
day time
---
60
90
------------------------- End (2023-12-28, 14:15:03 - local)
------------------------- Start (config.ini at 2023-12-28, 14:30:03 - local)
day time
---
75
90
------------------------- End (2023-12-28, 14:30:03 - local)
/home/pi/PV/PVForecast/solcast.py:150: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
period = df['period'][0]
------------------------- Start (config.ini at 2023-12-28, 14:45:03 - local)
day time
---
90
90
Message - downloading SolCast data at (UTC): 2023-12-28 13:45:03.318884+00:00
------------------------- End (2023-12-28, 14:45:05 - local)
------------------------- Start (config.ini at 2023-12-28, 15:00:03 - local)
day time
---
15
180
------------------------- End (2023-12-28, 15:00:03 - local)
Ich bin somit erstmal zufrieden!
Nur schade das man nicht mehr die 50/25 Abrufe von damals hat, damit wäre man grade im Sommer flexibler und könnte die Intervalle auf zB 60min belassen. Hoffentlich wird es nicht noch weiter reduziert, die Vorhersagen treffen bei mir doch schon sehr gut zu. Besser wie bei anderen Diensten.
Danke und falls wir uns nicht mehr hören guten Rutsch!

Re: Ertragsprognose über Solcast
Ja ... stimmt alles - war ein Ueberlegungsfehler meinerseitsDie config.ini habe ich nochmal kontrolliert und die Koordinaten stimmen Latitude = 53.132995 und Longitude = 8.249164 (aus Solcast übernommen)
edit/added
Da Du sowieso nie 15min Intervalle kriegst, kannst Du den crontab auf 30 min hochsetzen. Damit lädst Du die Daten immer um xx:00 oder xx:30.
Wenn Du um xx:15 lädst, sind im ersten Intervall die ersten 15min (xx:00 .. xx:15) schon Vergangenheit. Das macht nur Sinn, wenn Du alle 15min laden kannst, und so die 2. Viertelstunde nochmals updaten kannst ...
Auch guten Rutsch - und viel Sonne!
-
- Beiträge: 69
- Registriert: Di 17. Jan 2023, 08:30
- Hat sich bedankt: 3 Mal
- Danksagung erhalten: 1 Mal
Re: Ertragsprognose über Solcast

Kann ich einfach im „laufenden Betrieb“ die geänderten Dateien ins Verzeichnis kopieren und es läuft dann oder muss noch was gemacht werden?
Ach so, crontab hab ich noch auf alle 30 Minuten geändert
Wer ist online?
Mitglieder in diesem Forum: 0 Mitglieder und 1 Gast