Long time database storage of sensor values

Hi

I would like to save certain sensor values (temperature, electricity meter) in a long time database. I already use Maria DB for my recorder database. Thus it comes in handy to use just another table within Maria DB for long time storage. But how do I write - let’s say once a day at midnight) - data from sensors to an SQL database? Do I have to write a script or is there another build in way to do that?

Thx

1 Like

Hm. So no one is saving their electricity meter values for a couple of years? Maybe I have to look for another solution…

Would be nice if the recorder database could provide an averaging function to thin out historical data.

I use fhem in parallel to HA and the module DbLog with the reduceLog function to do exactly that at night. At the moment I am averaging the historical sensor values to one per hour. It is also possible to create daily averages.

reduceLogState reduceLogNbl finished. Rows processed: 220417, deleted: 14318, updated: 579, time: 117.00sec 2019-11-30 02:01:57

This is one of the three reasons/killer functions where IMHO fhem is superior to HA.

I totally agree! But compared to fhem, hass is very, very young with enormous potential to grow and add all kind of features.

I would like to see this kind of functionality within the recorder integration.

What are the other features that you miss in hass?

A little off topic, but I need native CUL433 and CUL868 RF support and a match for the famous DOIF module in fhem to elegantly describe complex automations with multiple independent triggers, actions and repeat execution control. Even nodered is not a realistic migration option for DOIF.

1 Like