Giter VIP home page Giter VIP logo

endash's Introduction

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

endash's People

Contributors

pletourneau avatar

Stargazers

Joey Palchak avatar Jeremy Josol avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.