Posts: 411
Threads: 103
Joined: Oct 2016
Reputation:
9
Hello
Do you have any idea or experience how to calculate outside temperature tendency?
I'm thinking about linear regression for last 1 hr where the angle of the regression line is the tendency.
Or simply sum (dT) for the last 60 minutes (maybe it's the same value).
Have you found any better algorithm?
LM5Lp, firmware: 2018.08.22 and 2021.12.15, FlashSYS v2, ARMv7 Processor rev 5 (v7l), kernel 4.4.151 and 4.4.259
Posts: 7764
Threads: 42
Joined: Jun 2015
Reputation:
447
What is the use case for this? Why not use weather forecast for this? yr.no XML forecast has temperature values for each 6 hours which should be enough for most cases.
Posts: 7764
Threads: 42
Joined: Jun 2015
Reputation:
447
Yes, but it won't work over plain HTTP. Change socket.http to ssl.https and http to https.
Posts: 411
Threads: 103
Joined: Oct 2016
Reputation:
9
The idea is to show the tendency in visu as simple as possible. Just arrow up or down. The question is about best low-pass filter setting.
What algorithm is mostly used?
LM5Lp, firmware: 2018.08.22 and 2021.12.15, FlashSYS v2, ARMv7 Processor rev 5 (v7l), kernel 4.4.151 and 4.4.259
Posts: 1764
Threads: 6
Joined: Jul 2015
Reputation:
117
Hi,
If you just need arrow up/down then comparing last value with new value is enough in my opinion, when last value is 19 and new is > then last value then tendency is "UP" and when new value is < last value then tendency is "DOWN", to make it more stable / less fluctuating you could make a average of last 5 values and compare it with new value.
BR,
Erwin