Should anyone ask, monitoring energy usage around the apartment.

I was interested in calculating the expected power cost per appliance for the year based on historical data

This works as follows:

The actual prometheus query looks like this:

label_replace(avg_over_time(openhab2_metric_number{instance="bunker.imagilan:9997",job="openhab",name=~".*Hs110.*Power.*"}[14d]), "name", "$1", "name", ".*Hs110(.*)_Power")*24*365*0.26/1000

and the updating graph:

label_replace(openhab2_metric_number{instance="bunker.imagilan:9997",job="openhab",name=~".*Hs110.*Power.*"}, "name", "$1", "name", ".*Hs110(.*)_Power")

If you are interested, here’s my OpenHab Grafana page that I use for creating the embedded graphs.

Summary:

  • My fridge could be more efficient.
  • The CatGenie, while using a lot of power, is still more pleasant than carrying cat litter home on my bike.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.