Giter Club home page Giter Club logo

solar-monitor's Introduction

Solar Monitor Bulb

AWS Lambda and step function scripts to enable you to simply monitor your solar sytem with a smart light bulb.

Full story can be found here: https://medium.com/p/97b2735e48aa

Quick setup

Prerequisites

  • AWS account
  • Solar Edge monitoring account
  • IFTTT account (for smart bulb)

Basic setup

  • Create three new AWS lambda functions using each .js file
  • Configure Lambda environment variables for each corresponding process.env.* values listed in each function
  • Create a new AWS Step Function state machine using statemachine.json
  • Replace each ARN value with the equivalent Lambda ARN IDs (i.e. 1_LAMBDA_ARN replaced with arn:aws:lambda:us-west-2:1234567890:function:1_SolarEdgeTime)
  • Run state machine on a scheduler (using CRON)
  • Congfigure 2 x IFTTT.com webhooks for turning on/off your smart bulb (of choice), ensure webhook names match events listed in 3_iftttewbhook.js

solar-monitor's People

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

motecreative

solar-monitor's Issues

Issues with the tool / something I do wrong i guess

Would love to build that what you have done, but somehow I have no success, the Overview works, so 1_solaredgetime is ok, no error and I get an output to it while testing on AWS

2_solaredgedetails I get errors, output is:
Response:
{
"errorType": "TypeError",
"errorMessage": "Cannot read property 'Payload' of undefined",
"trace": [
"TypeError: Cannot read property 'Payload' of undefined",
" at Runtime.exports.handler (/var/task/index.js:6:42)",
" at Runtime.handleOnce (/var/runtime/Runtime.js:66:25)"
]
}

3_iftttwebhook does not work as well with me, following errors:
Response:
{
"errorType": "TypeError",
"errorMessage": "Cannot read property 'Payload' of undefined",
"trace": [
"TypeError: Cannot read property 'Payload' of undefined",
" at Runtime.exports.handler (/var/task/index.js:10:30)",
" at Runtime.handleOnce (/var/runtime/Runtime.js:66:25)"
]
}

Do you have a hint for me what I am doing wrong? I guess 3 is not working because of 2.

Would appreciate your help... very much beginner here...

API Key from SolarEdge and Site Id I changed, and this seems to work because 1_solaredgetime works and brings back the following result:
Response:
{
"overview": {
"lastUpdateTime": "2020-08-11 11:48:23",
"lifeTimeData": {
"energy": 12473005,
"revenue": 623.5971
},
"lastYearData": {
"energy": 11816433
},
"lastMonthData": {
"energy": 655243
},
"lastDayData": {
"energy": 22985
},
"currentPower": {
"power": 3969
},
"measuredBy": "INVERTER"
}
}

Use lambda environment variables for custom values

Rather than having to replace values in the code with your credentials and IFTTT URLs, these could be specified as Lambda environment variables. This would allow the code to be used without any modification.

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.