POST One PV System
POST Multiple PV System
GET PV System
GET Group
PATCH One PV System
PATCH Multiple PV System
Key
Value
Authorization
Token {your token}
Some parameters are indicated via integers. Here below is list of values and their corresponding integer.
Parameters
Value
Integer (int)
pv_type
fixed
single_axis
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
# Imports
import requests
import json
# Configure API authentification
headers = {
'Content-type':'application/json',
'Accept':'application/json',
'Authorization':'Token {your token}'
}
url = "https://steadyweb.steady-sun.com/api/v1/pvsystem/"
# Plant configuration
latitude = 45.19 # in decimal degrees
longitude = 5.82 # in decimal degrees
config = {
"title": "My_Test_Site",
"name": "My_Test_Site", # this field is required
"requested_fields": [ # this field is required
{"field": 13, "with_quantiles": True },
{"field": 78, "with_quantiles": True}
],
"location": { # this field is required
"type": "Point",
"coordinates": [longitude, latitude]
},
"altitude": 215.0, # in m, this field is required
"pv_type": 2, # this field is required
"horizon": 1440, # in minutes, 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,
}
],
"installation_date": "2023-02-23",
"is_active": True,
"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 numpy as np
import requests
import json
headers = {
'Content-type':'application/json',
'Accept':'application/json',
'Authorization':'Token {your token}',
}
url = "https://steadyweb.steady-sun.com/api/v1/pvsystem/"
for site in range(0,10):
latitude = np.random.random() + 45
longitude = np.random.random()+ 5
config["title"] = f"My_Test_Site_{site}",
config["name"] = f"My_Test_Site_{site}",
config["location"] = {
"type": "Point",
"coordinates": [longitude, latitude],
}
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
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
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
headers = {
'Content-type':'application/json',
'Accept':'application/json',
'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/pvsystem/{plant_uuid}"
config={
"pv_type": 2, # changing the PVSystem type to a single-axis tracker
"arrays": [
{
"pvmodules_pdc0": 20000, # doubling the power of array
"orientation": 180, #
"inclination": 20, #
"module_technology": 1, # the folowing fields are not modified
"module_material": 1, # but must be specified either way
"racking": 1, #
"module_type": 1, #
"power_temp_coeff": -0.4, #
}
],
"inverter_parameters": { # modifying inverter_parameters as well
"pdc0": 21000, # to account for the change of power
"eta_inv_norm": 0.98,
}
}
json_object = json.dumps()
result = requests.patch(url, headers=headers, data=json_object)
print(json.loads(result.text))
Language
Python
import requests
import json
headers = {
"Content-type": "application/json",
"Accept": "application/json",
"Authorization": "Token {your token}",
}
uuids_list = [ # Fill in the plants' UUID
"replace-this-with-uuid1",
"replace-this-with-uuid2",
"replace-this-with-uuid3",
]
for plant_uuid in uuids_list:
url = f"https://steadyweb.steady-sun.com/api/v1/pvsystem/{plant_uuid}"
config = {"is_active" = False}
json_object = json.dumps(config)
result = requests.post(url, headers=headers, data=json_object)
print(json.loads(result.text))
Language
Python
import pandas as pd
import requests
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/{plant_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
import pandas as pd
import requests
headers = {'Authorization':'Token {your token}'}
group_uuid = "replace-this-with-uuid" # Fill in the group's UUID
url = f"https://steadyweb.steady-sun.com/api/v1/forecast/group/{group_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)
timezone
String (str)
import requests
import json
uuid = 'your_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}'}
url = f'https://steadyweb.steady-sun.com/api/v1/measures/{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, params=parameters, data=measures_to_send)
print(json.loads(result.text))
Language
Python
import requests
import json
uuid = 'your_uuid' # Fill in the group'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}'}
url = f'https://steadyweb.steady-sun.com/api/v1/group_measures/{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, params=parameters, data=measures_to_send)
print(json.loads(result.text))
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
Error
400 Bad Request
Error
401 Unauthorized
Error
403 Forbidden
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.
Category
Short Name
Long Name
Description
Unity
Production
pac
power_ac
Solar production of the plant in the output of the inverter
watt (W)
Radiation
ghi
all_sky_global_horizontal_irradiance
Global horizontal irradiance when the cloud cover is taken into account.
W.m-2
bni
all_sky_beam_normal_irradiance
Beam normal irradiance when the cloud cover is taken into account.
W.m-2
dhi
all_sky_diffuse_horizontal_irradiance
Diffuse horizontal irradiance when the cloud cover is taken into account.
W.m-2
bhi
all_sky_beam_horizontal_irradiance
Beam horizontal irradiance when the cloud cover is taken into account..
W.m-2
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 at 2 meter height. This variable give information about the air humidity near the ground or sea surface.
g.kg
rh2m
2m_relative_humidity
Relative humidity meters above the 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 your period of time considered. For example if your 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
hPa
Temperature
HI
heat_index
The heat index provides information on human's perception of temperature above 27°C. The heat index takes into account the humidity of the air which impacts the ability of the body to regulate its temperature by evaporation of sweat.
No unit.
null
t2m
2m_temperature
Air temperature 2 meters above the ground.
°C
td
2m_dewpoint
Dewpoint at 2 meter height. 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 give information about the air humidity.
°C
at
apparent_temperature
The apparent temperature provides information on human's perception of the temperature. It is based on wind speed and relative humidity. If the temperature is above 26°C, the heat index is provided. If the temperature is below 10°C and the wind speed exceeds 1.4 m/s, the wind chill is computed. Otherwise, the temperature is returned
No unit.
null
wind
10m_gust
10m_wind_gust
Wind gust at 10m above ground
m.s-1
10m_wind_direction
10m_wind_direction
Direction from which the wind blow at 10m above ground. (North = 0°, East= 90°, South = 180°, West= 270°)
°
10m_wind_speed
10m_wind_speed
Average wind speed at 10m above ground.
m.s-1