A Python CLI tool to get data from Enphase API and accompanying dashboard for reporting.
UNDER CONSTRUCTION
Coming soon.
Coming soon.
- You will need an Enphase API dev account and a registered app.
- See the Enphase API "Quick Start"
See script/mvp for an example of how to call the Enphase API. Requires a valid access token.
Assuming you have a valid access token, the simplest way to print a response from Enphase is to call the try_to_get()
function:
from utils.Enphase import Enphase
# initialize with json configs
enphase = Enphase(APP, API, AUTH, SYS, is_verbose=True)
enphase.try_to_get("systems") # https://api.enphaseenergy.com/api/v4/systems
With the EnphaseEndpointLibrary
class, you can call the record_response()
function to record responses as JSON to the 'response_logs' folder.
from utils.Enphase import Enphase
from utils.EnphaseEndpointLibrary import EnphaseEndpointLibrary
from utils.FileWriter import FileWriter
from utils.JsonCopier import JsonCopier
# initialize JSON configs
enphase = Enphase(_APP, _API, _AUTH, _SYS, is_verbose=True)
file_writer = FileWriter('./response_logs/')
enphase_api = EnphaseEndpointLibrary(enphase, file_writer)
enphase_api.record_response('systems.json', 'systems') # https://api.enphaseenergy.com/api/v4/systems
Additional descriptions for using modules in version 1 coming soon.
Open an issue or hit me up.
PRs accepted.
- Build a Reporting Module for turning responses into formatted JSON for the web UI.
- Build the web UI.
MIT