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

This works as follows:
- set up a bunch of HS110 devices to monitor power use around the house. (10s refresh rate)
- I run a Prometheus server with a retention time of 2.5 years (would be nice to compare yearly data + some buffer)
- item values are scraped every 10s using the Openhab Exporter. Thanks to @gersilex for turning me onto the Prometheus Exporter Project!
- Habpanel is running with embedded Grafana graphs (also with a 10s refresh).
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.