Calculation of the relationship between two periodically stored items in influxdb

I am currently working on building an EMS with DSL rules.

I store the energy consumption per day of the heat pump in an Influxdb. I also store the average outside temperature for that day. I also retrieve the predicted daily temperature for the coming day.

There is a linear relationship between the daily temperature and the energy consumption of a heat pump. If I can calculate that relationship, then I can predict how much energy my heat pump will need in the coming day using the predicted daily temperature.

I can determine that relationship once with an export from the influxdb and Excel, but I would actually like to do that dynamically with an Openhab rule.

Does anyone know how I can periodically recalculate the relationship between the two items mentioned in the history in the influxdb to something like: energy consumption = constantI * daily temperature + constantII?

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.