Giter Club home page Giter Club logo

anwb-price-watcher's Introduction

ANWB Dynamic Energy Pricing Alert

This project provides code to monitor today's prices of ANWB Energie and to push out a Slack alerts when prices are too high for your taste, allowing you time to turn off stuff and put on an extra sweater for the day ⛄️.

ANWB Energie is a dynamic pricing contract, so power and gas prices vary per day / hour. You can view the current prices in this handy graph. Prices are updated every morning around 6am for the next 24hr, this CRON job pulls their API and notifies you when prices go over your threshold, saving you time and hassle to check it yourself every day.

How to DIY 🛠️

To host this code, you'll need a Slack, setup Web hook integrations and sign up for repeat.dev. Given the low volume of repeats and messages, all should be free.

Once you have your accounts and channel integration ready, the following steps should get you going:

  1. Have your Slack Web hook URL ready
  2. Login to repeat.dev and create a new Repeat using the CRON job template
  3. Copy cron.ts from this repository into the editor
  4. Click on the Events tab and select the interval.
    1. Click the circle to enter a custom schedule, my 6:30 am = 30 6 * * *
  5. Click on the Variables tab and add the following
    1. electricityThreshold, the electricity price (number) per kWh to trigger the alert, for example 1.0
    2. electricityFreeThreshold, the negative electricity price (number) per kWh to trigger the free electricity alert, for example -15.0
    3. gasThreshold, the gas price (number) per m3 to trigger the alert, for example 1.45
    4. slackUrl, your Web hook URL (I have this encrypted)
  6. Press the green Deploy button

Test run 💪🏻

For a test run, set the price thresholds to 0, hit Play ▶️ and watch the ‼️ price ‼️ message appear in your Slack.

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.