- Data is from the Solar Protocol API: http://solarprotocol.net/api/v2/. Please read the documentation there.
- Offline examples of API data are saved in the data folder in this repository.
Examples are in Javascript (p5js) and Python (Gizeh).
- Javascript using the P5 library. https://p5js.org/
- If running your code from a local server, access the network data direct from the Solar Protocol API. If developing in an online editor, you will need to use the development server to access network data due to the Cross-Origin Resource Sharing standard that will block http requests from https servers. Development server is here: https://server.solarpowerforartists.com
- Either download the library and run a server locally.
- Or use the online editor.
- Access a single data point from the server
- Code
- Example in code editor
To access the data, loadJSON() is used with a callback function called gotData.
loadJSON(URL, gotData);
-
Work with the timeseries of a charge controller parameter like current or voltage.
-
Uses day.js library to deal with dates and timestamps: https://day.js.org/en/
-
Visualize the timeseries of all charge controller parameters
-
Uses day.js library to deal with dates and timestamps: https://day.js.org/en/
- Visualizes time series of parameters from all servers on the network.
- Code
- Visualizing data server side using Python and either a plotting library called Plotly or a graphics library called Gizeh:
- Documentation: https://plotly.com/
- Access a single data point from the server
- Code
- Documentation: https://github.com/Zulko/gizeh
- Upgrade pip:
python3 -m pip install --upgrade pip
- Install cairo
sudo apt-get install libcairo2-dev
- Install gizeh
sudo pip3 install gizeh
- Or use the online editor.
Color
- Takes RGB color of the form (r,g,b) where each element is comprised between 0 and 1 (1 is 100%).
- (1,1,1) is white
- (0,0,0) is black
- See the rip codes in this online color converter
- Access a single data point from the server
- Code
- Work with the timeseries of a charge controller parameter like current or voltage.
- Code
- Visualize the timeseries of all charge controller parameters
- Code coming soon.