meltaxa / herculis

Use AWS Lambda to fetch your Sungrow Solar metrics and send these to the PVOutput website.
MIT License
11 stars 5 forks source link

Herculis

Use AWS Lambda to fetch your Sungrow Solar metrics and send these to the PVOutput website.

Herculis downloads the Sungrow metrics from the SolarInfo Bank:

alt tag

And uploads the relevant data to PVOutput.org:

alt tag

Prequisites

Your Sungrow inverter is registered to their SolarInfo Bank site.

An AWS account. Herculis is an AWS Lamdba function. If this will be your only Lambda function, you will remain within the AWS Free Tier. There will be nominal charges (a few cents per month) for Amazon S3 and data transfers.

To deploy the AWS Lamdba function, the Serverless framework is used.

Installation

  1. Download or clone this repository to your local workstation.

Serverless Framework

  1. To ease the setup and configuration of this Lamdba, Serverless is used to deploy the code and it's dependancies.

    On your local workstation, install serverless.

    npm install serverless
  2. Setup your AWS Profile as per Serverless guidelines.

  3. Edit serverless.yml and update the following API credentials and UTC timezone offset:

    # PVOutput API settings, see https://pvoutput.org/account.jsp
    pvo_key: XXXXXXXX
    pvo_systemid: XXXXXXXX
    # Sungrow settings
    sgDeviceId: XXXXXXXX
    # UTC timezone offset in hours, for example Brisbane/Australia wound be 10.0
    tzOffset: XX

    For PVOutput, you can find these under Settings.

    For Sungrow's Solarinfo Bank, you will need to traverse their website to discover your Device ID. Following these instructions if you are using the Google Chrome web browser.

    In Chrome, login to Sungrow's SolarInfo Bank site at http://www.solarinfobank.com.

    Enable Developer Tools (under View and Developer menus).

    Click on the Network tab and ensure recording is enabled.

    Navigate to Device Data on Sungrow's site.

    In the Developer Tools window, look for the Name that looks like ?unitId=123456&deviceId=123456. For example:

    http://www.solarinfobank.com/plant/devicestructtree/12345?unitid=54321&deviceid=123456789.

    The sgDeviceId in this case is 123456789.

Deployment

  1. Deploy Herculis:

    From your local workstation, deploy Herculis to AWS:

    serverless deploy 
  2. Now browse to your PVOutput.org system.

Acknowledgements

The python interface to PV Output API was forked from sungrow2pvoutput.

Donation

If this project helped you save time, you can buy me a beer :)

paypal