August 27, 2024
Key
Value
Authorization
Token +your token
The key must be 'Authorization' and the associate value must start with the word 'Token' followed by your token value. For example :
headers = {'Authorization': 'Token 254b.....e098384..........xxx'}
Here below is list of values and their corresponding integer.
Parameters
Value
Integer (int)
pv_type
fixed
tacker single_axis
tracker double_axis
module_technology
standard
bifacial
module_material
monosi
cigs
asi
cdte
xsi
multisi
polysi
racking
open_rack
close_mount
insulated_back
module_type
glass_polymer
glass_glass
Other optional parameters:
The 'tracker_config' is only relevant in case of a tracker PV type. If none is provided, some default parameters are assumed which can be found in the exemple below.
API endpoint https://steadyweb.steady-sun.com/api/v1/pvsystem/
# Imports
import requests
import json
# Configure API authentification
# Keep in mind 'Authorization' value must start with the word 'Token'
# followed by your token value.
# eg. 'Authorization': 'Token 254b.....e098384..........xxx'
headers = {
'Content-type':'application/json',
'Accept':'application/json',
'Authorization':'Token your_token'
}
url = "https://steadyweb.steady-sun.com/api/v1/pvsystem/"
config = {
"title": "My_Test_Site", # this field is required
"name": "My_Test_Site", # this field is required
"location": { # this field is required
"type": "Point",
"coordinates": [
9.429554,
42.173204
]
},
"altitude": 215.0, # in m
"installation_date": "2023-02-23", # this field is required
"pv_type": 2, # this field is required
"arrays": [
{
"pvmodules_pdc0": 10000, # of AC, in W, this field is required
"orientation": 180, # in °, this field is required
"inclination": 20, # in °, this field is required
"module_technology": 1, # => "standard"
"module_material": 1, # => "monosi"
"racking": 1, # => "open_rack"
"module_type": 1, # => "glass_polymer"
"power_temp_coeff": -0.4,
}
],
"requested_fields": [ # this field is required one value at least
1,2,3,4,5,6,7,8,9,10,11,12, #pac+quantiles
13,14,15,16,17,18,19,20,21,22,23,24, #ghi+quantiles
],
"tracker_config": { # only if you have a tracker
"max_angle": 90,
"backtrack": True,
"gcr": 0.34,
"slope_azimuth": 0,
"slope_tilt": 0,
},
"bifacial_config": { # only if you have bifacial panels
"bifaciality": 0.8,
"gcr": 0.34,
"pvrow_height": 2,
"pvrow_width": 4,
},
"inverter_parameters":{
"pdc0": 10000,
"eta_inv_norm": 0.97,
}
}
json_object = json.dumps(config)
result = requests.post(url, headers=headers, data=json_object)
print(json.loads(result.text))
Language
Python
To ensure the PVSystem was created properly, check the answer of the server: it must be 201. The answer should also return a dictionary with the information and especially the uuid of the pvsystem you just created.
import requests
import json
# Configure API authentification
# Keep in mind 'Authorization' value must start with the word 'Token'
# followed by your token value.
# eg. 'Authorization': 'Token 254b.....e098384..........xxx'
headers = {
'Content-type':'application/json',
'Accept':'application/json',
'Authorization':'Token your_token'
}
url = "https://steadyweb.steady-sun.com/api/v1/pvsystem/"
result = requests.get(url, headers=headers)
print(json.loads(result.text))
Language
Python
import requests
import json
# Configure API authentification
# Keep in mind 'Authorization' value must start with the word 'Token'
# followed by your token value.
# eg. 'Authorization': 'Token 254b.....e098384..........xxx'
headers = {
'Content-type':'application/json',
'Accept':'application/json',
'Authorization':'Token your_token'
}
url = "https://steadyweb.steady-sun.com/api/v1/group/"
result = requests.get(url, headers=headers)
print(json.loads(result.text))
Language
Python
import requests
import json
# Configure API authentification
# Keep in mind 'Authorization' value must start with the word 'Token'
# followed by your token value.
# eg. 'Authorization': 'Token 254b.....e098384..........xxx'
headers = {
'Content-type':'application/json',
'Accept':'application/json',
'Authorization':'Token your_token'
}
url = f"https://steadyweb.steady-sun.com/api/v1/pvsystem/uuid/"
config={
"title":"NewTitle_PVsystem",
"arrays": [
{
"pvmodules_pdc0": 5000,
"inclination": 30,
}
],
}
json_object = json.dumps()
result = requests.patch(url, headers=headers, data=json_object)
print(json.loads(result.text))
Language
Python
* when you push arrays data, the new configurations overwrite all old ones.
# Imports
import requests
import json
# Configure API authentification
# Keep in mind 'Authorization' value must start with the word 'Token'
# followed by your token value.
# eg. 'Authorization': 'Token 254b.....e098384..........xxx'
headers = {
'Content-type':'application/json',
'Accept':'application/json',
'Authorization':'Token your_token'
}
url = f"https://steadyweb.steady-sun.com/api/v1/pvsystem/uuid/"
config = {
"irradiances":
{
"timestamp_interval": 1,
"decomposition_model": 1,
"transposition_model": 1,
"aoi_model": 1,
"albedo": 0.35,
},
"losses_parameters" :
{
"wiring": 7,
"lid": 5,
"nameplate_rating": 1,
"mismatch": 15,
"soiling": 50,
"snow": 0,
"shading": 0,
"aging": 5,
},
}
json_object = json.dumps(config)
result = requests.patch(url, headers=headers, data=json_object)
print(result.json())
Language
Python
To ensure the PVSystem was updated properly, check the answer of the server: it must be 200. The answer should also return a dictionary with the information.
TIPS & TRICKS
import requests
import json
# Configure API authentification
# Keep in mind 'Authorization' value must start with the word 'Token'
# followed by your token value.
# eg. 'Authorization': 'Token 254b.....e098384..........xxx'
headers = {
"Content-type": "application/json",
"Accept": "application/json",
"Authorization": "Token your_token",
}
url = "https://steadyweb.steady-sun.com/api/v1/windturbinetype/"
# all parameters are required
config = {
"manufacturer":7, # ex:Alstom
"reference":"Haliade 150",
"hub_heigh":100, # Hub height of the wind turbine type, in meter
"diameter":151, # Diameter of the wind turbine type, in meter
"power":6000000, #Power output of the wind turbine type, in W
"u_list":"string (list of integer)", # List of u values, separated by commas
"power_list":"string (list of integer)", # List of power values, separated by commas
}
json_object = json.dumps(config)
result = requests.post(url, headers=headers, data=json_object)
print(result.text)
Language
Python
To ensure the wind turbine type was created properly, check the answer of the server: it must be 201.
The answer should also return a dictionary with the information and especially the id of the windfarm you just created.
import requests
import json
# Configure API authentification
# Keep in mind 'Authorization' value must start with the word 'Token'
# followed by your token value.
# eg. 'Authorization': 'Token 254b.....e098384..........xxx'
headers = {
"Content-type": "application/json",
"Accept": "application/json",
"Authorization": "Token your_token",
}
url = f"https://steadyweb.steady-sun.com/api/v1/windfarm/"
# all this parameters are required
config = {
"title": "windfarm_v2",
"name": "windfarm_v2",
"location": {
"type": "Point",
"coordinates": [
139.6082, #lon
35.8658 #lat
]
},
"altitude": 10.0,
"requested_fields": [ # As many as needed, but must include at least one variable
1,2,3,4,5,6,7,8,9,10,11,12, #pac+q
97, #10m_gust
158, #10m_wind_direction
104,366,367,368,369,370,371,372,373,374,375,376, #10m_wind_speed+q
378,379,380,381,382,383,384,385,386,387,388,389, #hhws+q
],
"defined_wind_turbines":"false", # (boolean)
"wind-turbine_type": 12, # id of wind_turbine_type previously created
"wind_turbine_count": 1, # number of wind turbines in the wind farm
}
json_object = json.dumps(config)
result = requests.post(url, headers=headers, data=json_object)
print(result.text)
Language
Python
To ensure the windfarm was created properly, check the answer of the server: it must be 201.
The answer should also return a dictionary with the information and especially the uuid of the windfarm you just created.
Case 2 : “with turbine associated”
To create a wind farm with turbine parameters, proceed as follows:
1- create a windfarm via a POST request (described in this section)
2- retrieve your windfarm's id via a GET/windfarm/ via this request
3- create the windturbines associated with the windfarm (you'll need the windfarm id)
To add one windfarm, its parameters have to be specified in a POST request with following requirements. Requested parameters:
import requests
import json
# Configure API authentification
# Keep in mind 'Authorization' value must start with the word 'Token'
# followed by your token value.
# eg. 'Authorization': 'Token 254b.....e098384..........xxx'
headers = {
"Content-type": "application/json",
"Accept": "application/json",
"Authorization": "Token your_Token",
}
url = "https://steadyweb.steady-sun.com/api/v1/windfarm/"
# all this parameters are required
config = {
"title": "windfarm_v2",
"name": "windfarm_v2",
"location": {
"type": "Point",
"coordinates": [
139.6082, #lon
35.8658 #lat
]
},
"altitude": 10.0,
"requested_fields": [ # As many as needed, but must include at least one variable
1,2,3,4,5,6,7,8,9,10,11,12, #pac+q
97, #10m_gust
158, #10m_wind_direction
104,366,367,368,369,370,371,372,373,374,375,376, #10m_wind_speed+q
378,379,380,381,382,383,384,385,386,387,388,389, #hhws+q
],
"defined_wind_turbines" :"true", # Not required, true is the default value.
}
json_object = json.dumps(config)
result = requests.post(url, headers=headers, data=json_object)
print(result.text)
Language
Python
To ensure the windfarm was created properly, check the answer of the server: it must be 201.
The answer should also return a dictionary with the information and especially the id of the windfarm you just created
Here's a simple example of the way to create a single wind turbine
# Imports
import requests
import requests
import json
# Configure API authentification
# Keep in mind 'Authorization' value must start with the word 'Token'
# followed by your token value.
# eg. 'Authorization': 'Token 254b.....e098384..........xxx'
headers = {
"Content-type": "application/json",
"Accept": "application/json",
"Authorization": "Token your_token",
}
url = "https://steadyweb.steady-sun.com/api/v1/windturbine/"
config = {
"title": "windfarm_v2_wt1",
"name": "windfarm_v2_wt1",
"location": { # this field is required
"type": "Point",
"coordinates": [
140.22, #lon
36.65 #lat
]
},
"altitude": 0.0,
"requested_fields": [ # this field is required
1, #pac
378, #hhws
158, #10m_wind_direction
104, #10m_wind_speed
],
"wind_turbine_type": 35, # (int) id wind turbine type
"wind_farm": 62, # (int) id windfarm associated
}
json_object = json.dumps(config)
result = requests.post(url, headers=headers, data=json_object)
print(result.text)
Language
Python
Here's an example of the way to create a set of wind turbines, by iterating over a compiled csv file
import requests
import json
import pandas as pd
# Configure API authentification
# Keep in mind 'Authorization' value must start with the word 'Token'
# followed by your token value.
# eg. 'Authorization': 'Token 254b.....e098384..........xxx'
headers = {
'Content-type':'application/json',
'Accept':'application/json',
'Authorization':'Token your_token',
}
url = "https://steadyweb.steady-sun.com/api/v1/windturbine/"
data = pd.read_csv("windturbine_lat_lon.csv",index_col="name")
for turbine in data.index:
latitude = (data["lat"].loc[turbine])
longitude = (data["lon"].loc[turbine])
config = {
"title": f"windfarmName_{turbine}",
"name": f"windfarmName_{turbine}",
"requested_fields": [
1, #pac
378, #hhws
158, #10m_wind_direction
104, #10m_wind_speed ],
"location": {
"type": "Point",
"coordinates": [longitude,latitude]
},
"altitude":1060,
"wind_turbine_type":"integer", # id wind turbine type
"wind_farm":"integer", # id windfarm associated
}
json_object = json.dumps(config)
result = requests.post(url, headers=headers, data=json_object)
print(json.loads(result.text))
Language
Python
import requests
import json
# Configure API authentification
# Keep in mind 'Authorization' value must start with the word 'Token'
# followed by your token value.
# eg. 'Authorization': 'Token 254b.....e098384..........xxx'
headers = {
'Content-type':'application/json',
'Accept':'application/json',
'Authorization':'Token your_token'
}
url = "https://steadyweb.steady-sun.com/api/v1/windfarm/"
result = requests.get(url, headers=headers)
print(json.loads(result.text))
Language
Python
import requests
import json
# Configure API authentification
# Keep in mind 'Authorization' value must start with the word 'Token'
# followed by your token value.
# eg. 'Authorization': 'Token 254b.....e098384..........xxx'
headers = {
'Content-type':'application/json',
'Accept':'application/json',
'Authorization':'Token your_token'
}
url = "https://steadyweb.steady-sun.com/api/v1/windtrubine/"
result = requests.get(url, headers=headers)
print(json.loads(result.text))
Language
Python
import requests
import json
# Configure API authentification
# Keep in mind 'Authorization' value must start with the word 'Token'
# followed by your token value.
# eg. 'Authorization': 'Token 254b.....e098384..........xxx'
headers = {
'Content-type':'application/json',
'Accept':'application/json',
'Authorization':'Token your_token'
}
url = "https://steadyweb.steady-sun.com/api/v1/windfarm/windfarm_uuid/"
requested_fields = [
97, #10m_gust
158, #10m_wind_direction
]
json_object = json.dumps({"requested_fields": requested_fields})
result = requests.patch(url, headers=headers, data=json_object)
print(result)
Language
Python
import requests
import json
# Configure API authentification
# Keep in mind 'Authorization' value must start with the word 'Token'
# followed by your token value.
# eg. 'Authorization': 'Token 254b.....e098384..........xxx'
headers = {
'Content-type':'application/json',
'Accept':'application/json',
'Authorization':'Token your_token'
}
url = "https://steadyweb.steady-sun.com/api/v1/windturbine/windturbine_uuid/"
config = {
"title": "NewTitle_v2_wt1",
"name": "NewName_v2_wt1",
"wind_turbine_type":12, # id wind turbine type
}
json_object = json.dumps(config)
result = requests.patch(url, headers=headers, data=json_object)
print(result.text)
Language
Python
import pandas as pd
import requests
# Configure API authentification
# Keep in mind 'Authorization' value must start with the word 'Token'
# followed by your token value.
# eg. 'Authorization': 'Token 254b.....e098384..........xxx'
headers = {'Authorization':'Token your_token'}
plant_uuid = "replace-this-with-uuid" # Fill in the plant's UUID
url = f"https://steadyweb.steady-sun.com/api/v1/forecast/pvsystem/{uuid}/"
parameters = {'time_step':60, 'horizon':2880}
api_data = requests.get(url=url,params=parameters,headers=headers).json()
forecast = pd.DataFrame(
data=api_data['data'],
index=api_data['index'],
columns=api_data['columns'],
)
print(forecast)
Language
Python
Parameters
Data Type
Description
data_format
String (str)
precision
Integer (int)
horizon
Integer (int)
fields
String (str)
time_step
String (str)
date_time_format
String (str)
time_stamp_unit
String (str)
Result
StatusCode
Success
200 OK
Success
201 OK
Success
204 OK
Error
400 Bad Request
Error
401 Unauthorized
Error
403 Forbidden
Error
429 Forbidden
Too many requests
Failed
500 Internal Server Error
Failed
502 Bad Gateway Error
The result is a JSON array including all the forecast variables for each time step. Here’s an example. The JSON format depends on your settings.
Parameters
Data Type
Description
data_format
String (str)
date_time_format
String (str)
timezone
String (str)
field_format
String (str)
import requests
import json
uuid = 'your_uuid' # Fill in the pvsystem's UUID
token = 'your_token'
measures_to_send = [
{
"datetime": "2022-12-02T13:00",
"power_ac": 3655500.5,
"all_sky_global_horizontal_irradiance": 121.21,
"all_sky_diffuse_horizontal_irradiance": 42.23,
"all_sky_beam_normal_irradiance": 464.41,
"2m_temperature": 2.07,
"10m_wind_speed": 4.9
},
{
"datetime": "2022-12-02T14:00",
"power_ac":891005.94,
"all_sky_global_horizontal_irradiance": 31.25,
"all_sky_diffuse_horizontal_irradiance": 17.6,
"all_sky_beam_normal_irradiance": 130.74,
"2m_temperature": 1.97,
"10m_wind_speed": 4.73
}
]
headers = {'Authorization': f'Token {token}','Content-Type': 'application/json'}
url = f'https://steadyweb.steady-sun.com/api/v1/measures/pvsystem/{uuid}/'
parameters = {
"field_format": "long_name",
"timezone": "Europe/Paris",
"data_format":"columns",
"date_time_format":"%Y-%m-%dT%H:%M",
}
result = requests.post(url, headers=headers, data=json.dumps(measure_to_send), params=parameters)
print(json.loads(result.text))
Language
Python
Category
Short Name
Long Name
Description
Unit
Production
pac
power_ac
Solar or wind AC power production of the plant. Alternating current (AC) power is measured at the output of the inverter.
W
Radiation
ghi
all_sky_global_horizontal_irradiance
Global horizontal irradiance with the cloud cover taken into account.
W.m-2
bni
all_sky_beam_normal_irradiance
Beam normal irradiance with the cloud cover taken into account.
W.m-2
dhi
all_sky_diffuse_horizontal_irradiance
Diffuse horizontal irradiance with the cloud cover taken into account.
W.m-2
bhi
all_sky_beam_horizontal_irradiance
Beam horizontal irradiance with the cloud cover taken into account..
W.m-2
par
photosynthetic_active_radiation
Photosynthetic active radiation
W.m-2
Wind
10m_gust
10m_wind_gust
Maximum wind gust speed 10 meters above ground
m.s-1
10m_wind_direction
10m_wind_direction
Direction from which the wind blows 10 meters above ground. (North = 0°, East= 90°, South = 180°, West= 270°)
°
10m_wind_speed
10m_wind_speed
Average wind speed 10 meters above ground.
m.s-1
hhws
hub_height_wind_speed
Average wind speed at the wind turbine's hub height. Hub heights typically range between 25m (for smaller wind turbines) and 100m (for large wind turbines).
m.s-1
Temperature
t2m
2m_temperature
Air temperature 2 meters above ground.
°C
td
2m_dewpoint
Dewpoint 2 meters above ground. The dewpoint is the temperature to which the air mass should be cooled to become saturated in water vapor. When compared to the air temperature at the same height, the dewpoint gives information about the air humidity.
°C
t_cell
cell_temperature
The cell temperature of a photovoltaic panel. The efficiency and therefore the output power is a function of the cell's temperature.
°C
Clouds
hcc
high_cloud_cover
Proportion, ranging from 0 to 1, of the cloud cover produced by high altitude clouds.
[0-1]
lcc
low_cloud_cover
Proportion, ranging from 0 to 1, of the cloud cover produced by high altitude clouds.
[0-1]
mcc
medium_cloud_cover
Proportion, ranging from 0 to 1, of the cloud cover produced by medium altitude clouds.
.
[0-1]
tcc
total_cloud_cover
Proportion of cloud cover ranging from 0 to 1.
[0-1]
Humidity
q
specific_humidity
Concentration (in g per kg) of water in the air 2 meters above ground. This variable gives information about the air humidity near the ground or sea surface.
g.kg
rh2m
2m_relative_humidity
Relative humidity 2 meters above ground.
%
tcwv
total_column_water_vapor
The total amount of water vapor in a vertical column of air.
kg.m-2
Precipitation
mtpr
mean_total_precipitation_rate
Precipitation rate in mm/h over a specific period of time. For example if the selected time step is 5min and the value is 12mm/h, the forecast estimate that 1mm of water will precipitate in these 5 minutes
mm.h-1
Pressure & Density
mlsp
mean_sea_level_pressure
Pressure in hPa calculated back to the sea level.
hPa
msp
mean_surface_pressure
Surface pressure.
hPa