nordpool_diff icon indicating copy to clipboard operation
nordpool_diff copied to clipboard

idea: take past hours into account

Open derSchreifritz opened this issue 5 months ago • 2 comments

this is more of a feature request (if it doesn't exist already): Beside future hours, I'd like to take into account x past hours. So to have a reference window starting from somewhere before, not only with future hours. So far I only have the alternative option to compare with the daily average or mean. But for my heatpump and house with little buffer, a window of a few hours would be better. Only future hours doesn't compensate for past situation.

edit: I tried to use a negative filter length, but that is not possible, must be an integer between 2...20 But maybe something in this direction? I wanted with filterlength -2 to have current and past hour. Such a sensor I could then combine with a regular one that looks into the future. edit2: changing numbers in my local version of https://github.com/jpulakka/nordpool_diff/blob/7fa73ed6d3b292e9aff2db7b382008dfdf5b46b9/custom_components/nordpool_diff/sensor.py#L38C58-L38C69 didn't help yet. But then, I don't understand much of it anyway.

derSchreifritz avatar Jan 26 '24 09:01 derSchreifritz

Thanks for the idea.

My thinking so far has been that if the past should affect your heating, that should happen via observing current reality such as room temperature, which is affected by not only past electricity price but also accounts for other environmental factors. This actually happens automagically if you control setpoint of your air heat pump with nordpool_diff output; what the heat pump actually does depends on the difference between setpoint and the actual temperature in the room.

(But then, regular air heat pump can't possibly measure room, let alone whole house temperature particularly well. It would be better to use separate temperature sensors (I'm using ruuvitags) and maybe measure thermal radiation of walls with infrared thermometer (haven't done that yet :)).

That said, it could also be an option to modify the filter to take into account x past hours. Need to think about this because the devil is in the details: how exactly?

jpulakka avatar Jan 27 '24 14:01 jpulakka

thanks for the reply! The room temperature measurement of the heatpump and its compensation doesn't work too well here. I noticed that it gets cold when the price is still decreasing but quite cheap already, and it gets unnecessarily hot when the price is high but later still gets higher. For the time being, I got 2 nice suggestions for a workaround solution, thanks to sicco92 at tweakers.nl:

  • a dummy sensor that reverses the actual list of say entso-e, and base a nordpool_diff sensor on that. https://gathering.tweakers.net/forum/list_message/77943118#77943118 My problem is then that I can't have 2 nordpool_diff sensors with the same configuration but 2 different sources. I'd like to use say 2 length 3 triangle sensors to look back and forward. The workaround now is to have 2 slightly different ones.
  • workaround option 2 is a sql query sensor that picks up the value of a length 2 sensor from the hour before. Then I use the negative value of that. This looks back only one hour, but better than nothing. https://gathering.tweakers.net/forum/list_message/77942420#77942420

derSchreifritz avatar Jan 27 '24 14:01 derSchreifritz