Keeping track of electricity usage using AWS services, Tibber's API and the Watty energy monitor/load balancer. (example exported diagram)
Uses the following services:
- AWS API Gateway
- AWS Lambda
- AWS EventBridge for scheduling
- AWS Timestream for time-series data
- AWS Secret Manager for storing Tibber API key
All lambdas are written in Golang.
AWS CDK is used for all provisioning, building the Go lambda's etc.
Change cdk.json
in order to deploy either the powertracker or the chargerstatus stacks:
"app": "npx ts-node --prefer-ts-exts bin/chargerstatus.ts",
or
"app": "npx ts-node --prefer-ts-exts bin/powertracker.ts.ts",
This project was generated using
The cdk.json
file tells the CDK Toolkit how to execute your app.
npm run build
compile typescript to jsnpm run watch
watch for changes and compilenpm run test
perform the jest unit testscdk deploy
deploy this stack to your default AWS account/regioncdk diff
compare deployed stack with current statecdk synth
emits the synthesized CloudFormation template