These script allow you to automatically create plots of the future electricity prices using the Tibber API.
-
Install and configure the official "Terminal & SSH" plugin for Home Assistant
-
Configure it to install these additional packages:
gnuplot
jq
imagemagick
ttf-dejavu
-
Log into the SSH server on Home Assistant
-
Clone this repository into
/root/share/tibber-plots/
-
Switch to that directory
-
Create a file
token
that contains your Tibber API token -
If you run
./make-graph.sh
now, it should create a plotprices.svg
-
Create the folder
/root/config/www/plots
-
Still in
tibber-plots/
, run./install-cronjob.sh
-
If you run
/etc/periodic/15min/tibber-pricegraph-cronjob.sh
now, it should create a fileprices.svg
in/root/config/www/plots/
-
To add the plot to any of your dashboards, create a Generc Camera and use
http://127.0.0.1:8123/local/plots/prices.png
as the image path. -
Create a file
ha-token
with a long-lived Home Assistant token for the HTTP sensors.
The plots should be updated every 15 minutes.
You will have to re-do the install-conjob.sh
step every time the SSH container is restarted.