Interval function in the Devices tab

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
User avatar
Sigalou
New user
Posts: 9
Joined: 23 Jul 2019, 21:39

Interval function in the Devices tab

#1 Post by Sigalou » 23 Jul 2019, 21:45

Hello everyone,
I use a probe (temperature for example) that varies without stopping.
Which means that if I put an "interval" at 5s, a new value changes every 5 seconds.
My question is the following :
If I put 60s, the interval function gives:
* The value of the probe every 60s
or
* The average of the values recorded on 60s?

In the hypothesis that it is not the average, how to have the mean?
Thank you.
Sigalou

Utilisateur/Développeur Plugin Jeedom
Créateur des plugins Alexa-API & WatchDog



User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Interval function in the Devices tab

#2 Post by grovkillen » 23 Jul 2019, 22:26

The unit will poll the CURRENT VALUE once per interval. If you need to have a average or mean you would need to do that using rules. And change the interval to 1 second or something.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

User avatar
Sigalou
New user
Posts: 9
Joined: 23 Jul 2019, 21:39

Re: Interval function in the Devices tab

#3 Post by Sigalou » 23 Jul 2019, 22:33

grovkillen wrote: 23 Jul 2019, 22:26 The unit will poll the CURRENT VALUE once per interval. If you need to have a average or mean you would need to do that using rules. And change the interval to 1 second or something.
OK, with this ?

Code: Select all

On Temp#Value Do
 Let,10,[VAR#9]
 Let,9,[VAR#8]
 Let,8,[VAR#7]
 Let,7,[VAR#6]
 Let,6,[VAR#5]
 Let,5,[VAR#4]
 Let,4,[VAR#3]
 Let,3,[VAR#2]
 Let,2,[VAR#1]
 Let,1,[Temp#Value]
 TaskValueSet,12,1,([VAR#1]+[VAR#2]+[VAR#3]+[VAR#4]+[VAR#5]+[VAR#6]+[VAR#7]+[VAR#8]+[VAR#9]+[VAR#10])/10
EndOn
Sigalou

Utilisateur/Développeur Plugin Jeedom
Créateur des plugins Alexa-API & WatchDog



User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Interval function in the Devices tab

#4 Post by grovkillen » 24 Jul 2019, 00:00

Yep!
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 41 guests