Energy Site Management

The service offers a set of site management operations on the EnergySites endpoint. This method allows the client to generate a list of the sites associated with their license, request detailed information about specific solar sites, and set a site’s attributes or specifications. The response to each request depends on the specific operation. The response can be a single EnergySiteId, a list of EnergySiteIds or a full site specification.

EnergySite Operations

Create a solar energy site under your license using the EnergySites service endpoint.

import requests
from requests.auth import HTTPBasicAuth

url = "https://service.solaranywhere.com/api/v2/EnergySites"
userName = "your_username@your_company.com"
password = "your_password"

querystring = {"key":"your_client_key"}

payload = """<EnergySiteCreateRequest xmlns="http://service.solaranywhere.com/api/v2">
 <EnergySite Name="Sample Site" Description="Sample Site">
  <Location Latitude="34.65" Longitude="-119.10" />
  <PvSystems>
   <PvSystem Albedo_Percent="17" GeneralDerate_Percent="85.00">
    <Inverters>
     <Inverter Count="1" MaxPowerOutputAC_kW="4.470000" EfficiencyRating_Percent="97.000000" />
    </Inverters>
    <PvArrays>
     <PvArray>
      <PvModules>
       <PvModule Count="20" NameplateDCRating_kW="0.22000" PtcRating_kW="0.19760" 
        PowerTemperatureCoefficient_PercentPerDegreeC="0.4" NominalOperatingCellTemperature_DegreesC="45" />
      </PvModules>
      <ArrayConfiguration Azimuth_Degrees="177.000" Tilt_Degrees="25.000" Tracking="Fixed" TrackingRotationLimit_Degrees="90" />
      <SolarObstructions>
       <SolarObstruction Opacity_Percent="80.0" Azimuth_Degrees="90.000" Elevation_Degrees="33.000" />
       <SolarObstruction Opacity_Percent="100" Azimuth_Degrees="120.000" Elevation_Degrees="50.000" />
       <SolarObstruction Opacity_Percent="100" Azimuth_Degrees="150.000" Elevation_Degrees="22.000" />
       <SolarObstruction Opacity_Percent="100" Azimuth_Degrees="180.000" Elevation_Degrees="3.000" />
       <SolarObstruction Opacity_Percent="100" Azimuth_Degrees="210.000" Elevation_Degrees="1.000" />
       <SolarObstruction Opacity_Percent="100" Azimuth_Degrees="240.000" Elevation_Degrees="2.000" />
       <SolarObstruction Opacity_Percent="70.0" Azimuth_Degrees="270.000" Elevation_Degrees="4.000" />
      </SolarObstructions>
      <MonthlyShadings>
       <MonthlyShading MonthNumber="1" SolarAccess_Percent="77.0" />
       <MonthlyShading MonthNumber="2" SolarAccess_Percent="87.0" />
       <MonthlyShading MonthNumber="3" SolarAccess_Percent="98.0" />
       <MonthlyShading MonthNumber="4" SolarAccess_Percent="100.0" />
       <MonthlyShading MonthNumber="5" SolarAccess_Percent="100.0" />
       <MonthlyShading MonthNumber="6" SolarAccess_Percent="100.0" />
       <MonthlyShading MonthNumber="7" SolarAccess_Percent="100.0" />
       <MonthlyShading MonthNumber="8" SolarAccess_Percent="100.0" />
       <MonthlyShading MonthNumber="9" SolarAccess_Percent="100.0" />
       <MonthlyShading MonthNumber="10" SolarAccess_Percent="100.0" />
       <MonthlyShading MonthNumber="11" SolarAccess_Percent="100.0" />
       <MonthlyShading MonthNumber="12" SolarAccess_Percent="91.0" />
      </MonthlyShadings>
     </PvArray>
    </PvArrays>
   </PvSystem>
  </PvSystems>
 </EnergySite>
</EnergySiteCreateRequest>"""

headers = {
  'content-type': "text/xml; charset=utf-8",
  'content-length': "length",
  }

response = requests.post(url,auth = HTTPBasicAuth(userName,password),
           data=payload,headers=headers,params=querystring)

print(response.text)

Update a solar energy site, providing new site specifications.

import requests
from requests.auth import HTTPBasicAuth

url = "https://service.solaranywhere.com/api/v2/EnergySites/"
userName = "your_username@your_company.com"
password = "your password"
EnergySiteId = "your_site_id"

querystring = {"key":"your_client_key"}

payload = """<EnergySiteUpdateRequest xmlns="http://service.solaranywhere.com/api/v2">
 <EnergySite Name="Sample Site" Description="Sample Site">
  <Location Latitude="34.65" Longitude="-119.10" />
  <PvSystems>
   <PvSystem Albedo_Percent="17.00" GeneralDerate_Percent="85.00">
    <Inverters>
     <Inverter Count="1" MaxPowerOutputAC_kW="4.470000" EfficiencyRating_Percent="97.000000" />
    </Inverters>
    <PvArrays>
     <PvArray>
      <PvModules>
       <PvModule Count="20" NameplateDCRating_kW="0.22000" PtcRating_kW="0.19760" PowerTemperatureCoefficient_PercentPerDegreeC="0.4" NominalOperatingCellTemperature_DegreesC="45" />
      </PvModules>
      <ArrayConfiguration Azimuth_Degrees="177.000" Tilt_Degrees="25.000" Tracking="Fixed" TrackingRotationLimit_Degrees="90" ModuleRowCount="1" RelativeRowSpacing="3" />
      <SolarObstructions>
       <SolarObstruction Opacity_Percent="80.0" Azimuth_Degrees="90.000" Elevation_Degrees="33.000" />
       <SolarObstruction Opacity_Percent="100" Azimuth_Degrees="120.000" Elevation_Degrees="50.000" />
       <SolarObstruction Opacity_Percent="100" Azimuth_Degrees="150.000" Elevation_Degrees="22.000" />
       <SolarObstruction Opacity_Percent="100" Azimuth_Degrees="180.000" Elevation_Degrees="3.000" />
       <SolarObstruction Opacity_Percent="100" Azimuth_Degrees="210.000" Elevation_Degrees="1.000" />
       <SolarObstruction Opacity_Percent="100" Azimuth_Degrees="240.000" Elevation_Degrees="2.000" />
       <SolarObstruction Opacity_Percent="70.0" Azimuth_Degrees="270.000" Elevation_Degrees="4.000" />
      </SolarObstructions>
      <MonthlyShadings>
       <MonthlyShading MonthNumber="1" SolarAccess_Percent="77.0" />
       <MonthlyShading MonthNumber="2" SolarAccess_Percent="87.0" />
       <MonthlyShading MonthNumber="3" SolarAccess_Percent="98.0" />
       <MonthlyShading MonthNumber="4" SolarAccess_Percent="100.0" />
       <MonthlyShading MonthNumber="5" SolarAccess_Percent="100.0" />
       <MonthlyShading MonthNumber="6" SolarAccess_Percent="100.0" />
       <MonthlyShading MonthNumber="7" SolarAccess_Percent="100.0" />
       <MonthlyShading MonthNumber="8" SolarAccess_Percent="100.0" />
       <MonthlyShading MonthNumber="9" SolarAccess_Percent="100.0" />
       <MonthlyShading MonthNumber="10" SolarAccess_Percent="100.0" />
       <MonthlyShading MonthNumber="11" SolarAccess_Percent="100.0" />
       <MonthlyShading MonthNumber="12" SolarAccess_Percent="91.0" />
      </MonthlyShadings>
     </PvArray>
    </PvArrays>
   </PvSystem>
  </PvSystems>
 </EnergySite>
</EnergySiteUpdateRequest>"""

headers = {
  'content-type': "text/xml; charset=utf-8",
  'content-length': "length",
  }

response = requests.post(url + EnergySiteId, auth = HTTPBasicAuth(userName,password),
      data=payload,headers=headers,params=querystring)

print(response.text)

Request the list of solar energy sites assigned to your license.

To display a high volume of energy sites, there is an option to specify the PageSize in the URL: https://service.solaranywhere.com/api/v2/EnergySites?PageSize=100&PageIndex=0
import requests
from requests.auth import HTTPBasicAuth

url = "https://service.solaranywhere.com/api/v2/EnergySites"
userName = "your_username@your_company.com"
password = "your_password"

querystring = {"key":"your_client_key"}

response = requests.get(url, auth=HTTPBasicAuth(userName,password), params=querystring)

print(response.text)

Request the specifications for an existing solar site.

import requests
from requests.auth import HTTPBasicAuth

url = "https://service.solaranywhere.com/api/v2/EnergySites/"
userName = "your_username@your_company.com"
password = "your_password"
EnergySiteId = "your_site_id"

querystring = {"key":"your_client_key"}

response = requests.get(url + EnergySiteId,auth = HTTPBasicAuth(userName,password),
           params=querystring)

print(response.text)
EnergySiteCreateRequest

Within the set of EnergySite operations, the client can perform a number of tasks related to defining and reporting on their solar energy sites. Each solar site is defined by a specification tied to that site, according to input fields outlined in the Complete Schema.

 

Here are a few sample EnergySiteCreateRequest payloads using different types of site configurations.

<EnergySiteCreateRequest xmlns="http://service.solaranywhere.com/api/v2">
 <EnergySite Name="Sample Site" Description="Basic PV system">
  <Location Latitude="34.65" Longitude="-119.10" />
  <PvSystems>
   <PvSystem Albedo_Percent="17" GeneralDerate_Percent="85.00">
    <Inverters>
     <Inverter Count="1" MaxPowerOutputAC_kW="4.470000" EfficiencyRating_Percent="97.000000" />
    </Inverters>
    <PvArrays>
     <PvArray>
      <PvModules>
       <PvModule Count="20" NameplateDCRating_kW="0.22000" PtcRating_kW="0.19760" PowerTemperatureCoefficient_PercentPerDegreeC="0.4" NominalOperatingCellTemperature_DegreesC="45" />
      </PvModules>
      <ArrayConfiguration Azimuth_Degrees="177.000" Tilt_Degrees="25.000" Tracking="Fixed" TrackingRotationLimit_Degrees="90" />
     </PvArray>
    </PvArrays>
   </PvSystem>
  </PvSystems>
 </EnergySite>
</EnergySiteCreateRequest>
<EnergySiteCreateRequest xmlns="http://service.solaranywhere.com/api/v2">
 <EnergySite Name="Sample Site" Description="Sample Site">
  <Location Latitude="34.65" Longitude="-119.10" />
  <PvSystems>
   <PvSystem Albedo_Percent="17" GeneralDerate_Percent="85.00">
    <Inverters>
     <Inverter Count="1" MaxPowerOutputAC_kW="4.470000" EfficiencyRating_Percent="97.000000" />
    </Inverters>
    <PvArrays>
     <PvArray>
      <PvModules>
       <PvModule Count="20" NameplateDCRating_kW="0.22000" PtcRating_kW="0.19760" PowerTemperatureCoefficient_PercentPerDegreeC="0.4" NominalOperatingCellTemperature_DegreesC="45" />
      </PvModules>
      <ArrayConfiguration Azimuth_Degrees="177.000" Tilt_Degrees="25.000" Tracking="Fixed" TrackingRotationLimit_Degrees="90" />
      <SolarObstructions>
       <SolarObstruction Azimuth_Degrees="90.000" Elevation_Degrees="33.000" />
       <SolarObstruction Azimuth_Degrees="120.000" Elevation_Degrees="50.000" />
       <SolarObstruction Azimuth_Degrees="150.000" Elevation_Degrees="22.000" />
       <SolarObstruction Azimuth_Degrees="180.000" Elevation_Degrees="3.000" />
       <SolarObstruction Azimuth_Degrees="210.000" Elevation_Degrees="1.000" />
       <SolarObstruction Azimuth_Degrees="240.000" Elevation_Degrees="2.000" />
       <SolarObstruction Azimuth_Degrees="270.000" Elevation_Degrees="4.000" />
      </SolarObstructions>
     </PvArray>
    </PvArrays>
   </PvSystem>
  </PvSystems>
 </EnergySite>
</EnergySiteCreateRequest>
<EnergySiteCreateRequest xmlns="http://service.solaranywhere.com/api/v2">
 <EnergySite Name="Sample Site" Description="Sample Site">
  <Location Latitude="34.65" Longitude="-119.10" />
  <PvSystems>
   <PvSystem Albedo_Percent="17" GeneralDerate_Percent="85.00">
    <Inverters>
     <Inverter Count="1" MaxPowerOutputAC_kW="4.470000" EfficiencyRating_Percent="97.000000" />
    </Inverters>
    <PvArrays>
     <PvArray>
      <PvModules>
       <PvModule Count="20" NameplateDCRating_kW="0.22000" PtcRating_kW="0.19760" PowerTemperatureCoefficient_PercentPerDegreeC="0.4" NominalOperatingCellTemperature_DegreesC="45" />
      </PvModules>
      <ArrayConfiguration Azimuth_Degrees="177.000" Tilt_Degrees="25.000" Tracking="Fixed" TrackingRotationLimit_Degrees="90" />
      <MonthlyShadings>
       <MonthlyShading MonthNumber="1" SolarAccess_Percent="77.0" />
       <MonthlyShading MonthNumber="2" SolarAccess_Percent="87.0" />
       <MonthlyShading MonthNumber="3" SolarAccess_Percent="98.0" />
       <MonthlyShading MonthNumber="4" SolarAccess_Percent="100.0" />
       <MonthlyShading MonthNumber="5" SolarAccess_Percent="100.0" />
       <MonthlyShading MonthNumber="6" SolarAccess_Percent="100.0" />
       <MonthlyShading MonthNumber="7" SolarAccess_Percent="100.0" />
       <MonthlyShading MonthNumber="8" SolarAccess_Percent="100.0" />
       <MonthlyShading MonthNumber="9" SolarAccess_Percent="100.0" />
       <MonthlyShading MonthNumber="10" SolarAccess_Percent="100.0" />
       <MonthlyShading MonthNumber="11" SolarAccess_Percent="100.0" />
       <MonthlyShading MonthNumber="12" SolarAccess_Percent="91.0" />
      </MonthlyShadings>
     </PvArray>
    </PvArrays>
   </PvSystem>
  </PvSystems>
 </EnergySite>
</EnergySiteCreateRequest>
EnergySiteCreateResponse

The response will contain a unique EnergySiteId that the client can then use to reference the specific site when calling simulated PV output.

<EnergySiteCreateResponse RequestId="W19PR1UKF" EnergySiteId="NZ3RTPHLJE"
 xmlns="http://service.solaranywhere.com/api/v2" />

What’s Next?