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.
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:
- Have your Slack Web hook URL ready
- Login to repeat.dev and create a
new Repeat
using theCRON job
template - Copy
cron.ts
from this repository into the editor - Click on the
Events
tab and select the interval.- Click the
circle
to enter a custom schedule, my 6:30 am =30 6 * * *
- Click the
- Click on the
Variables
tab and add the followingelectricityThreshold
, the electricity price (number) per kWh to trigger the alert, for example 1.0electricityFreeThreshold
, the negative electricity price (number) per kWh to trigger the free electricity alert, for example -15.0gasThreshold
, the gas price (number) per m3 to trigger the alert, for example 1.45slackUrl
, your Web hook URL (I have this encrypted)
- Press the green
Deploy
button
For a test run, set the price thresholds to 0, hit Play ‼️ price ‼️
message appear in your Slack.