Ertragsprognose über Solcast

Alle zusätzlichen Module, die in die Solaranzeige integriert wurden, wie den Wetterbericht, die Solarprognose, der Messenger Pushover, Sun & Moon, aWATTar Strompreise und weitere Module.

Moderator: Ulrich

Icebox82
Beiträge: 69
Registriert: Di 17. Jan 2023, 08:30
Hat sich bedankt: 3 Mal
Danksagung erhalten: 1 Mal

Re: Ertragsprognose über Solcast

Beitrag von Icebox82 »

meinst du die config.ini ? Eine solcast.ini hab ich nicht gefunden

Die config.ini liegt in /home/pi/PV

Code: Alles auswählen

# Usage note: replace values <xx> with legal values (NOT repeating the angle-brackets <>)
# outcommented keys contain default values

[DEFAULT]
    # ----------------------------------------------------- Storage locations
    storePath         = ./temp/                                # storage location for files (.csv, .kml, ..._ and SQLite database)
    # following parameters could be overwritten for individual forecast providers
    storeDB           = 0                                      # store to SQLite database (see [DBRepo] for name)
    storeCSV          = 0                                      # store .csv files (mainly for debugging)
    storeInflux       = 1                                      # store DC power output estimates in Influx (see [Influx] for name)
    # dropWeather     = 1                                      # drop weather parameters irrelevant for PV forecasting for 'storeDB', 'storeCSV'
    # force           = 0                                      # force downloading of new data

    # ----------------------------------------------------- Location of PV system
    Latitude          = 53.132262
    Longitude         = 8.25375
    # Altitude        = 5                                      # altitude of system (meters above sea level)
    
[Forecasts]                                                    # enable / disable certain forecasts
    # ----------------------------------------------------- PV output power forecast sources
    Solcast           = 1                                      # Solcast.com
    VisualCrossing    = 0                                      # VisualCrossing.com
    MOSMIX_L          = 0                                      # single station file, updated every 6h
    MOSMIX_S          = 0                                      # all stations,        updated hourly download
    OWM               = 0                                      # OpenWeatherMap.org - based on cloud coverage only
    # ----------------------------------------------------- CO2 intensity related
    Entso-E           = 0                                      # CO2 intensity forecast based on transparency.entsoe.eu data
    CO2signal         = 0                                      # actual CO2 intensity, from electricitymaps.com
    # ----------------------------------------------------- other
    FileInput         = 0                                      # file input for weather data (for debugging)
    
[SolCast]                                                      # register free rooftop site at https://solcast.com/pricing/
    resource_id       = 63e1-XXXX-29cb-XXXX
    resource_id_2   = 6816-XXXX-3313-XXXX                      # for dual-array systems
    api_key           = <meineAPI>
    interval        = 0                                      # interval at which SolCast is read (during daylight only):
                                                               #    positive number: minutes between API calls
                                                               #    0, early, late:  15min intervals where possible, stretching intervals to 30m where needed
                                                               #                     See readme.md for details. (30min / 60min respectively for dual-array systems)
    # hours           = 168                                    # forecast period defaults to 7 days, up to 14 days (336h)
    # apiCalls        =  50       # number of API calls supported by SolCast   
    # optimal         =  15                                    # optimal time interval to call SolCast, in minutes

[VisualCrossing]                                               # register for free API access at https://www.visualcrossing.com/weather-data-editions
    api_key           = <api_id_from_visualcrossing.com>
    # Irradiance      = disc                                   # irrandiance model (for VisualCrossing) - one of below, or comma separated list of below; default 'disc'
                                                               # 'all'                                    all below
                                                               # 'disc', 'dirint', 'dirindex', 'erbs'     GHI decomposition models - needs a station which supports Rad1h
                                                               # 'clearsky'                               clear sky model

[OpenWeatherMap]                                               # register free API access at https://openweathermap.org/price
    api_key           = <api_id_from_openweathermap.org>
    # Irradiance      = clearsky_scaling                       # irrandiance model (for OWM) - one of below, or comma separated list of below; default 'clearsky_scaling'
                                                               # 'all'                                    all below
                                                               # 'campbell_norman', 'clearsky_scaling'    cloud coverage to irradiance
                                                               # 'clearsky'                               clear sky model
 
[DWD]                                                          # Deutscher Wetterdienst, https://www.dwd.de/DE/leistungen/met_verfahren_mosmix/met_verfahren_mosmix.html
    DWDStation        = <station_number>                       # Station number, select from https://wettwarn.de/mosmix/mosmix.html
    # DWD_URL_L       = https://opendata.dwd.de/weather/local_forecasts/mos/MOSMIX_L/single_stations/
    # DWD_URL_S       = https://opendata.dwd.de/weather/local_forecasts/mos/MOSMIX_S/all_stations/kml/
    # storeKMZ        = 0                                      # store downloaded .kmz files (.kml compressed as .zip)
    # keepKMZ_S       = 0                                      # keep MOSMIX_S original file after downloading     
    # Irradiance      = disc                                   # irrandiance model (for MOSMIX) - one of below, or comma separated list of below; default 'disc'
                                                               # 'all'                                    all below
                                                               # 'disc', 'dirint', 'dirindex', 'erbs'     GHI decomposition models - needs a station which supports Rad1h
                                                               # 'campbell_norman', 'clearsky_scaling'    cloud coverage to irradiance
                                                               # 'clearsky'                               clear sky model

[Entso-E]
    api_key             = <api_from_Entso-E>
    zones               = DE, DE_AMPRION                       # comma separated list of zones to be analyzed
    # resolution        = 60T                                  # some countries offer bidding prices for different time intervals, typically 15T and 60T
    # verbose           = 0                                    # verbosity level: 0=default, 1=basic, 2=max; forced =2 if start/end date are given
    # keepRaw           = 0                                    # default 0, together with start/end can be used to dump Entso-E data to .csv
    # start             = 2023-01-01T23:00Z                    # - see User's Guid
    # end               = 2023-02-18T23:00Z                    # -
    # loop              = 0                                    # -
    # modelDays         = 7                                    # number of days used to model correlation between actual and forecasted CO2

[CO2signal]
    api_key             = <api_from_www.co2signal.com>         # register free API access at https://www.co2signal.com/
    zones               = DE                                   # comma separated list of zones to be downloaded

[FileInput]                                                    # this is mainly for debugging - refer to code for details (ForecastManager.processFileInput)
    type                = kml                                  # kml, csv
    file                = ./temp/mosmix_export.csv.gz          # file or directory to process: file can be .csv(.gz|.zip) or .kml(.gz|.zip)
                                                               # directory can contain files (.gz|.zip) with .kml files inside
    extension           = zip                                  # extension to process, if 'file' refers to a directory
    # Irradiance        = disc, clearsky_scaling               # ... for .csv files; .kml files are treated as described in section [DWD]
                                                          
[PVSystem]                                                     # PV system to be modeled (for DWD, OpenWeatherMap based forecasts)
    # Model            = PVWatts                               # modeling strategy for PV: 'PVWatts' or 'CEC'
    # TemperatureModel = open_rack_glass_glass                 # https://pvlib-python.readthedocs.io/en/stable/generated/pvlib.temperature.sapm_cell.html
    # clearsky_model   = simplified_solis                      # model in pvlib.location.get_clearsky (note: 'haurwitz' not supported)
    
    # ----------------------------------------------------- physical definition of PV System, using CEC database
    # based on .csv files at ~/.local/lib/python3.8/site-packages/pvlib/data, special characters to be replaced by '_'
    ModuleName        = LG_Electronics_Inc__LG325N1W_V5        # select your panel (or same Wp as yours, eg. 325Wp)
    InverterName      = SMA_America__SB10000TL_US__240V_       # select an inverter comparable name plate power (eg. 10kW)
    NumStrings        =   2                                    # number of strings 
    NumPanels         =  15                                    # number of panels per string
    
    # ----------------------------------------------------- PVWatts definition
    InverterPower     = 10000                                  # name-plate inverter max. power
    NominalEfficiency = 0.965                                  # nominal European inverter efficiency
    SystemPower       = 12640                                  # system power [Wp]
    TemperatureCoeff  = -0.27                                # temperature coefficient (efficiency loss per 1C)
   
    # ----------------------------------------------------- orientation of solar panels
    # location (Latitude, Longitude) defined in [DEFAULT] section above
    Tilt              =  45
    Azimuth           = 127                                    # 270=West, 180=South, 90=East
    
[DBRepo]
    dbName            = pvforecasts.db                         # SQLite database name (at 'storePath')
                                                               # database tables are created on-the-fly as needed (but not altered if more/less fields appear:
                                                               #    - new, additional fields after inital table creation) are supporessed with a warning
                                                               #    - missing fields are left empty)
                                                               # table names:     dwd             weather fields and forecast from MOSMIX_L
                                                               #                  dwd_s           weather fields and forecast from MOSMIX_S
                                                               #                  owm             weather fields and forecast from OpenWeatherMap
                                                               #                  visualcrossing  weather fields and forecast from VisualCrossing
                                                               #                  solcast         Solcast estimates
                                                               # older (long-range) forecasts are kept in database. Differentiation is by field IssueTime
                                                               # Depending on how many forecasts are downloaded and calculated, this database can grow at
                                                               # up to 120MByte/month
    
[Influx]
    host              = localhost                        # can be localhost
    # port            = 8086
    database          = solaranzeige                  # older (long-range) forecasts are overwritten with newer (short-range) forecasts as they become available
    
    # ----------------------------------------------------- in case Influx 2.x is used (default is Influx 1.x)
    # influx_V2       = 0                                      # enable, if Influx 2.x is used
    # token           = <token_for_Influx_2.x>                 # to be generated in Influx GUI
    # org             = <your_org>                             # as Influx 2.x is setup
    # bucket          = <your_influx_db_name>                  # fall-back is `database`

schiefke
Beiträge: 47
Registriert: Sa 19. Aug 2023, 13:51
Hat sich bedankt: 1 Mal
Danksagung erhalten: 3 Mal

Re: Ertragsprognose über Solcast

Beitrag von schiefke »

Sorry, ja! Bei mir heißt die Datei solcast.ini (für die Eindeutigkeit) und ich rufe diese mit "-c" auf. Wenn du die config.ini nutzt, auch gut.

Sonnige Grüße

Leon
Wechselrichter Sungrow SH10.0RT
Speicher Sungrow SBR096
Module 23 x JinkoSolar 430 Wp allblack

Anlage 18 Grad Süd

schiefke
Beiträge: 47
Registriert: Sa 19. Aug 2023, 13:51
Hat sich bedankt: 1 Mal
Danksagung erhalten: 3 Mal

Re: Ertragsprognose über Solcast

Beitrag von schiefke »

Moin,

das Einzige, was mir auffällt ist, dass du solcast nicht sagst, in welchem Intervall die Daten abgeholt werden sollen.
Dies wird unter dem API-Key eingetragen. Probiere bitte mal den Wert "15".

Sonnige Grüße

Leon
Wechselrichter Sungrow SH10.0RT
Speicher Sungrow SBR096
Module 23 x JinkoSolar 430 Wp allblack

Anlage 18 Grad Süd

Icebox82
Beiträge: 69
Registriert: Di 17. Jan 2023, 08:30
Hat sich bedankt: 3 Mal
Danksagung erhalten: 1 Mal

Re: Ertragsprognose über Solcast

Beitrag von Icebox82 »

danke auf jeden fall schon mal für deine Hilfe!

Ich habe da jetzt mal 15 eingetragen. Spätestens in einer Stunde sollten dann ja neuere Daten da sein.
Das komische ist ja auch wenn ich das in putty über "python PVForecast.py" aufrufe funktioniert alles. Ich hab auch alles ins Verzwichnis /home/pi/PV/ reingepackt.

Bei solcast.com kann man nicht sehen ob für die API schon Daten abgerufen wurden oder finde ich das nur nicht?

schiefke
Beiträge: 47
Registriert: Sa 19. Aug 2023, 13:51
Hat sich bedankt: 1 Mal
Danksagung erhalten: 3 Mal

Re: Ertragsprognose über Solcast

Beitrag von schiefke »

Bei dir sollte im Verzeichnis /home/pi/PV/data eine Datei mit Namen "err.txt" liegen. Falls es nicht funktioniert kannst ja einmal deren Inhalt posten.

Sonnige Grüße

Leon
Wechselrichter Sungrow SH10.0RT
Speicher Sungrow SBR096
Module 23 x JinkoSolar 430 Wp allblack

Anlage 18 Grad Süd

Icebox82
Beiträge: 69
Registriert: Di 17. Jan 2023, 08:30
Hat sich bedankt: 3 Mal
Danksagung erhalten: 1 Mal

Re: Ertragsprognose über Solcast

Beitrag von Icebox82 »

Also es läuft immer noch nicht :(

Der Ordner existiert bei mir nicht.

Da es aber nur automatisch nicht läuft scheint es irgendwo in der crontab oder so zu hängen. PVForecast selbst läuft ja wenn ich es aufrufe ohne Fehler:

pi@solaranzeige:~/PV $ python PVForecasts.py
------------------------- Start (config.ini at 2023-12-08, 12:05:20 - local)
Message - downloading SolCast data at (UTC): 2023-12-08 11:05:20.455184+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-08, 12:05:24 - local)

Icebox82
Beiträge: 69
Registriert: Di 17. Jan 2023, 08:30
Hat sich bedankt: 3 Mal
Danksagung erhalten: 1 Mal

Re: Ertragsprognose über Solcast

Beitrag von Icebox82 »

@schiefke: Ich habe dir eine PN geschrieben. Würde mich über eine Antwort freuen

schiefke
Beiträge: 47
Registriert: Sa 19. Aug 2023, 13:51
Hat sich bedankt: 1 Mal
Danksagung erhalten: 3 Mal

Re: Ertragsprognose über Solcast

Beitrag von schiefke »

Moin,

bitte poste doch einmal den Inhalt der Datei err.txt, die bei deinem crontab-Aufruf generiert wird. Falls du diese Datei nicht findest, wird dein crontab-Eintrag wahrscheinlich nicht ausgeführt. Den Eintrag für solcast habe ich unter user "pi" mit crontab -e angelegt. Der sieht wie folgt aus:

30 * * * * python /home/pi/PV/PVForecasts.py -c /home/pi/PV/solcast.ini >> /home/pi/PV/picron.log 2>&1

Der letzte Eintrag in meiner "err.txt" die bei mir picron.log heißt ist folgender:

/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]
------------------------- Start (/home/pi/PV/solcast.ini at 2023-12-17, 13:30:04 - local)
Message - downloading SolCast data at (UTC): 2023-12-17 12:30:04.005742+00:00
------------------------- End (2023-12-17, 13:30:05 - local)

Die Fehlermeldung am Anfang kannst du ignorieren. Hier habe ich bereits einen request an die Entwickler auf github gesandt.

Die "config.ini", die bei mir solcast.ini heißt, hat folgenden Inhalt:

# Usage note: replace values <xx> with legal values (NOT repeating the angle-brackets <>)
# outcommented keys contain default values

[DEFAULT]
# ----------------------------------------------------- Storage locations
storePath = ./temp/ # storage location for files (.csv, .kml, ..._ and SQLite database)
# following parameters could be overwritten for individual forecast providers
storeDB = 0 # store to SQLite database (see [DBRepo] for name)
storeCSV = 0 # store .csv files (mainly for debugging)
storeInflux = 1 # store DC power output estimates in Influx (see [Influx] for name)
# dropWeather = 1 # drop weather parameters irrelevant for PV forecasting for 'storeDB', 'storeCSV'
# force = 0 # force downloading of new data

# ----------------------------------------------------- Location of PV system
Latitude = 53.333328
Longitude = 8.48333
# Altitude = 0 # altitude of system (meters above sea level)

[Forecasts] # enable / disable certain forecasts
# ----------------------------------------------------- PV output power forecast sources
Solcast = 1 # Solcast.com
VisualCrossing = 0 # VisualCrossing.com
MOSMIX_L = 0 # single station file, updated every 6h
MOSMIX_S = 0 # all stations, updated hourly download
OWM = 0 # OpenWeatherMap.org - based on cloud coverage only
# ----------------------------------------------------- CO2 intensity related
Entso-E = 0 # CO2 intensity forecast based on transparency.entsoe.eu data
CO2signal = 0 # actual CO2 intensity, from electricitymaps.com
# ----------------------------------------------------- other
FileInput = 0 # file input for weather data (for debugging)

[SolCast] # register free rooftop site at https://solcast.com/pricing/
resource_id = 2d2f-6e3c-6fc8-a62a
# resource_id_2 = <second_resource_id_from_solcast.com> # for dual-array systems
api_key = <mein API-Key>
interval = 30 # interval at which SolCast is read (during daylight only)
# positive number: minutes between API calls
# 0, early, late: 15min intervals where possible, stretching intervals to 30m where needed
# See readme.md for details. (30min / 60min respectively for dual-array systems)
hours = 168 # forecast period defaults to 7 days, up to 14 days (336h)
apiCalls = 50 # number of API calls supported by SolCast
optimal = 30 # optimal time interval to call SolCast, in minutes


[Influx]
host = 192.168.178.38 # can be localhost
port = 8086
database = solaranzeige # older (long-range) forecasts are overwritten with newer (short-range) forecasts as they become available

# ----------------------------------------------------- in case Influx 2.x is used (default is Influx 1.x)
# influx_V2 = 0 # enable, if Influx 2.x is used
# token = <token_for_Influx_2.x> # to be generated in Influx GUI
# org = <your_org> # as Influx 2.x is setup
bucket = vorhersage # fall-back is `database`


Ich hoffe, das hilft dir ein wenig weiter.

Vielen Dank

Leon
Wechselrichter Sungrow SH10.0RT
Speicher Sungrow SBR096
Module 23 x JinkoSolar 430 Wp allblack

Anlage 18 Grad Süd

Icebox82
Beiträge: 69
Registriert: Di 17. Jan 2023, 08:30
Hat sich bedankt: 3 Mal
Danksagung erhalten: 1 Mal

Re: Ertragsprognose über Solcast

Beitrag von Icebox82 »

Vielen Dank schon mal für deine Antwort!!


Ich habe jetzt nochmal alles neu installiert. Neue SD-Karte mit frischem Image V5.1.1 64bit, Daten von meinem Wechselrichter sind in Grafana zu sehen. Dann die Datein und Ordner von Github in den Ordner /home/pi/PV kopiert und die config.ini mit meinen Standortdaten, API und Resource-ID angepasst. Dann "sudo apt install python3-pip" und "python -m pip install -r /home/pi/PV/requirements.txt" installiert. Dabei bekomme ich die Fehlermeldung

WARNING: The script normalizer is installed in '/home/pi/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
WARNING: The script f2py is installed in '/home/pi/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
WARNING: The script anyconfig_cli is installed in '/home/pi/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location

Führe ich dann python PVForecasts.py aus kommt nur

pi@solaranzeige:~/PV $ python PVForecasts.py
------------------------- Start (config.ini at 2023-12-20, 16:30:29 - local)
------------------------- End (2023-12-20, 16:30:29 - local)

Bin echt ratlos wo der Fehler liegt.
Was ist mit den Fehlermeldungen, wie bekomme ich das Problem gelöst? Muss da noch was nachinstalliert werden?

schiefke
Beiträge: 47
Registriert: Sa 19. Aug 2023, 13:51
Hat sich bedankt: 1 Mal
Danksagung erhalten: 3 Mal

Re: Ertragsprognose über Solcast

Beitrag von schiefke »

Moin,

poste mal bitte den Inhalt der Datei ".profile" im Verzeichnis /home/pi

Sonnige Grüße

Leon
Wechselrichter Sungrow SH10.0RT
Speicher Sungrow SBR096
Module 23 x JinkoSolar 430 Wp allblack

Anlage 18 Grad Süd

Zurück zu „Wetterdaten, Börsenstrompreise, Solarprognose, Nachrichtendienst usw.“

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 0 Gäste