Skip to content

pletourneau/enDash

Repository files navigation

Enphase Solar Dashboard

By Paul LeTourneau

User dashboard for monitoring solar arrays that use Enphase microinverters

Technologies Used

  • JavaScript
  • HTML
  • CSS
  • Node.js v18.17.1
  • NPM v9.6.7
  • React
  • JSX
  • Figma
  • OAuth 2.0
  • Enphase API v4
  • Express
  • Axios
  • React_Chart_JS_2

Description

Solar Dashboard for owners of residential solar systems that use compatible Enphase Energy microinverters. Dashboard was designed with free version of API and can only access system summary and microinverter telemetry data. With paid subscription or installer partner plan many more options, including live data, are available. Current outputs display as a graph with the last 288, five minute, intervals, filtering only non-zero intervals for display. There is a status section that shows the status message from the API call. It also converts lifetime production into kWh and total trees grown for 10 years from seedlings. And has a picture of Bob Ross. Other comedic output can be added to keep user engagement up. See examples near the bottom.

Setup/Installation Requirements

  • $ clone project from github (https://github.com/pletourneau/enDash)

  • $ cd enDash

  • $ npm install

  • register app with enphase (https://developer-v4.enphase.com/admin/applications) to get API Key, Client ID, Client Secret to use below in environment variables

  • encode the Client ID and Client Secret into base64 (following instructions in step 8 here https://developer-v4.enphase.com/docs/quickstart.html) at this website https://www.base64encode.org/ and save the result as an environment variable

  • get System ID from residential solar system owner with compatible Enphase Microinverters

  • set up account on Heroku (or host of your choosing) https://devcenter.heroku.com/articles/heroku-cli

    NOTE: This app will not work locally without significant changes. The API will not exchange the code for a token with a "localhost" uri. If you decide to try this route you will need to use Enphase's default URI and pop it out in a different window and have the user copy and paste the code into another page you will need to create.

  • $ heroku create

  • set environment variables on Heroku in dashboard OR heroku config $ heroku config: set varName=value

  • $ git push heroku main

  • $ heroku open

  • $ npm start

Source for Production Estimates

https://www.epa.gov/energy/greenhouse-gas-equivalencies-calculator#results

Known Bugs

  • Refresh token is not currently used. Code is outlined, but not correct
  • System ID is currently hard coded as an env variable. For production releases that should be an input

Example comedic output pictures

  • These are pictures of sample output to keep users engaged with app

License

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Copyright (c) 2023 Paul LeTourneau

Research & Planning Log

Friday, 12/01

Thursday, 12/07 (Confirmed with Cameron that we could work on project after applying for jobs)

Friday, 12/08

  • 9:00am testing out queries in postman. got this to work around 940 to grant a token. still not working in app curl --location 'https://api.enphaseenergy.com/oauth/token'
    --header 'Authorization: Basic MTkyZWY0YzJiMmY2NWFlMGU2N2ViOTNlYjQwMmU0MzA6ZDJhNzM5NjRhMTg5NjhkM2I2MWZjNzA0Yjg5YWQzMmY=='
    --header 'Content-Type: application/x-www-form-urlencoded'
    --header 'Cookie: SESSION=dfd660ba-e931-4168-8382-d6318abb6a91'
    --data-urlencode 'grant_type=authorization_code'
    --data-urlencode 'code=QboYec'
    --data-urlencode 'redirect_uri=https://api.enphaseenergy.com/oauth/redirect_uri'

Friday, 12/15

Tuesday, 12/19

-1:15 pm finding out how to translate kwh into trees/miles driven https://forterra.org/carbon-calculator-individuals/?gclid=Cj0KCQiAm4WsBhCiARIsAEJIEzXz2RHTLcJ0VLCY4vSRv8lGWMao0vfNMXjadtwKMgSSvR7UpssZHxcaAq33EALw_wcB etAl...

Wednesday, 12/20

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published