Energy harvesting


I have some Enocean and WEMO power switch with kw/h counter.
The Enocean counts from 0 to 65xxxx. Today this is going to a controller that has the logic for Today useage, yesterday, this week, last week, this month, last month, this year and last year.

But i dont like doing this in a controller, and also i can not go in and investigate if i see something strange. Any thought in how i can do this in openhab, and what databases is “best” for this?

You would set up persistence and if you want to put that information on your sitemap create Unbound Items for the historical values and a Rule that triggers every time the Item linked/bound to the Enocean device. The use the persistence methods to calculate and update the Unbound Items.

There is no “best” database for this. The only really bad choice is MapDB as it only stores the most recent value. rrd4j may be a poor choice if you want the data to be precise as it gets older. This db replaces a bunch of values with their average as the data ages so becomes less precise as the data ages. But the DB remains a fixed size.

Beyond that a lot of people choose MariaDB/MySQL out of familiarity. I like InfluxDB because of the ability to use Grafana for charting.

Thanks! I will try this.