Strange Template behaviour **solved**
Posted: Sat Sep 16, 2017 6:34 am
Hi, I have a template file set up to create a JSON data file with contents partly as follows...
"windtrend": [
"[wind0wind-act]","[wind0wind-val1]", "[wind0wind-val2]", "[wind0wind-val3]", "[wind0wind-val4]",
"[wind0wind-val5]", "[wind0wind-val6]", "[wind0wind-val7]", "[wind0wind-val8]", "[wind0wind-val9]",
"[wind0wind-val10]", "[wind0wind-val11]", "[wind0wind-val12]", "[wind0wind-val13]", "[wind0wind-val14]",
"[wind0wind-val15]", "[wind0wind-val16]", "[wind0wind-val17]", "[wind0wind-val18]", "[wind0wind-val19]",
"[wind0wind-val20]", "[wind0wind-val21]", "[wind0wind-val22]", "[wind0wind-val23]", "[wind0wind-val24]",
"[wind0wind-val25]", "[wind0wind-val26]", "[wind0wind-val27]", "[wind0wind-val28]", "[wind0wind-val29]",
"[wind0wind-val30]","[wind0wind-val31]", "[wind0wind-val32]", "[wind0wind-val33]", "[wind0wind-val34]",
"[wind0wind-val35]", "[wind0wind-val36]", "[wind0wind-val37]", "[wind0wind-val38]", "[wind0wind-val39]",
"[wind0wind-val40]","[wind0wind-val41]", "[wind0wind-val42]", "[wind0wind-val43]", "[wind0wind-val44]",
"[wind0wind-val45]", "[wind0wind-val46]", "[wind0wind-val47]", "[wind0wind-val48]", "[wind0wind-val49]",
"[wind0wind-val50]","[wind0wind-val51]", "[wind0wind-val52]", "[wind0wind-val53]", "[wind0wind-val54]",
"[wind0wind-val55]", "[wind0wind-val56]", "[wind0wind-val57]", "[wind0wind-val58]", "[wind0wind-val59]"
],
The template regenerates each minute and is picked up repeatedly by a web page that plots this data. Everything works fine except that the plot has highlighted that the series of data isn't remaining consistent on repeated generations. You would expect that at each iteration a new value would appear at the front, the oldest value would be dropped off, and all the other valued would stay the same. This is not happening consistently and is very disconcerting because the shape of the plot changes as it moves across the screen. I've inspected the raw data comparing adjacent minutes and you can see sequences of up to 12 items where there is an exact match and then this is followed by 1 or 2 values that haven't been passed on without change. Then consistency returns for 3 or 4 values and then it goes amuck again.
Is this a bug or just a consequence of the necessary implementation? I can see that if you hold a series of values/timestamps and then recalculate the buckets on request the values will change due to timing differences. But I'm only guessing. Can you help ???
Steve
"windtrend": [
"[wind0wind-act]","[wind0wind-val1]", "[wind0wind-val2]", "[wind0wind-val3]", "[wind0wind-val4]",
"[wind0wind-val5]", "[wind0wind-val6]", "[wind0wind-val7]", "[wind0wind-val8]", "[wind0wind-val9]",
"[wind0wind-val10]", "[wind0wind-val11]", "[wind0wind-val12]", "[wind0wind-val13]", "[wind0wind-val14]",
"[wind0wind-val15]", "[wind0wind-val16]", "[wind0wind-val17]", "[wind0wind-val18]", "[wind0wind-val19]",
"[wind0wind-val20]", "[wind0wind-val21]", "[wind0wind-val22]", "[wind0wind-val23]", "[wind0wind-val24]",
"[wind0wind-val25]", "[wind0wind-val26]", "[wind0wind-val27]", "[wind0wind-val28]", "[wind0wind-val29]",
"[wind0wind-val30]","[wind0wind-val31]", "[wind0wind-val32]", "[wind0wind-val33]", "[wind0wind-val34]",
"[wind0wind-val35]", "[wind0wind-val36]", "[wind0wind-val37]", "[wind0wind-val38]", "[wind0wind-val39]",
"[wind0wind-val40]","[wind0wind-val41]", "[wind0wind-val42]", "[wind0wind-val43]", "[wind0wind-val44]",
"[wind0wind-val45]", "[wind0wind-val46]", "[wind0wind-val47]", "[wind0wind-val48]", "[wind0wind-val49]",
"[wind0wind-val50]","[wind0wind-val51]", "[wind0wind-val52]", "[wind0wind-val53]", "[wind0wind-val54]",
"[wind0wind-val55]", "[wind0wind-val56]", "[wind0wind-val57]", "[wind0wind-val58]", "[wind0wind-val59]"
],
The template regenerates each minute and is picked up repeatedly by a web page that plots this data. Everything works fine except that the plot has highlighted that the series of data isn't remaining consistent on repeated generations. You would expect that at each iteration a new value would appear at the front, the oldest value would be dropped off, and all the other valued would stay the same. This is not happening consistently and is very disconcerting because the shape of the plot changes as it moves across the screen. I've inspected the raw data comparing adjacent minutes and you can see sequences of up to 12 items where there is an exact match and then this is followed by 1 or 2 values that haven't been passed on without change. Then consistency returns for 3 or 4 values and then it goes amuck again.
Is this a bug or just a consequence of the necessary implementation? I can see that if you hold a series of values/timestamps and then recalculate the buckets on request the values will change due to timing differences. But I'm only guessing. Can you help ???
Steve