Solar Protocol - Open API:V2 Documentation

This server is: {"name":"Solar Power for Artists"}

Note: This is the publicly available open-access API. Developers on the network can view the complete API documentation on Github.

Solar Protocol is a network of servers located all over the world. The primary server, which we call the "point of entry" or "POE", is determined by whichever server is in the most sunlight at a given time (determined by wattage scaled to a 50 watt module). The data returned from these GET requests pertains to the POE server only (calls to other servers in the system are explained below). This means that every call you make to the API might get a response from a different device with different values of data.

There are 2 main types of data this API provides:
  1. Charge controller data - This pertains to the PV system, such as solar power production, battery status, etc.
  2. System information - This pertains to local server info, such as location and hardware specs.
By default, these results are queried from the POE, which means the results may change if the POE changes. By using the server argument you can collect data from a specific server or from all the servers in the network. In this API explorer, the results from these API calls are displayed in the browser console. All times are in the timezone for the server that logged that data and have not been adjusted. Use the networkInfo = tz call to get the time zones to make the adjustments.

Using this API explorer

Enter the value you want return in the form provided. The syntax for the call will be show in the browser bar and the results of the call will open up in the browser console. The console can be opened via the browser's developer settings or by pression the Fn and F12 keys simultaniously (works on most browsers).

Charge Controller Data

Charge controller data:

Value

value returns the specified value from the most recently collected line of data.

Example: http://solarprotocol.net/api/v2/opendata.php?value=PV-voltage

Possible values:

Optional modifier: duration returns the specified value over a given amount of days, from 1 to 7.

Example: http://solarprotocol.net/api/v2/opendata.php?value=PV-voltage&duration=2
Response: { header : {datetime : PV-voltage}, data {[...]}}

Example: http://solarprotocol.net/api/v2/opendata.php?value=PV-current
Response: { "PV-current": "0.76" }

Value

Duration (optional)

Line

line returns a line of data containing all of the possible values from the most recent file

Example: http://solarprotocol.net/api/v2/opendata.php?line=0

Possible values:

Line

Day

day returns all the data from a specific day or range of days. Note that days may not be consequetive if the server was off for an extended period of time.

Example: http://solarprotocol.net/api/v2/opendata.php?day=2

Possible values:

Day

System Info

systemInfo returns information about the system and that server's local variables

Example: http://solarprotocol.net/api/v2/opendata.php?systemInfo=tz

Possible values:

System Info

Network Info

networkInfo returns information about the network

Example: http://solarprotocol.net/api/v2/opendata.php?networkInfo=devices

Possible values:

Network Info

Remote Server Data

server returns 4 calendar days worth of data from the specified server.

Example: http://solarprotocol.net/api/v2/opendata.php?server=1

Possible values:

Server

API Response

API call:

http://solarprotocol.net/api/v2/opendata.php?

API response (also available in browser console):