Skip to content

ANWB Energy Price watcher, gives Slack alerts when prices cross your threshold

License

Notifications You must be signed in to change notification settings

ernstnaezer/anwb-price-watcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 

Repository files navigation

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.

About

ANWB Energy Price watcher, gives Slack alerts when prices cross your threshold

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages