Page 1 of 1

The problem with SEQDAY1 statement in template

Posted: Mon Jan 11, 2010 3:57 pm
by vecerapl
I need to write to the table with template listing MIN and MAX temperature, but not to reflect reality.

Temperature as today was MIN: -1.7 ° C, but the output is -0.3 ° C and time min/max wants to see.

Temperature over seqday1 writes. I also tried seqlast24, but this does not work.

TEMPLATE:
<tr class="column-light">
<td>[seqday1_localdate@1#GH].[seqday1_localdate@1#EF]</td>
<td>[seqday1_th0_tempmin_time@1#IJ].[seqday1_th0_tempmin_time@1#KL]</td>
<td>[seqday1_th0_tempmin_c@1] °C</td>
<td>[seqday1_th0_tempmax_time@1#IJ].[seqday1_th0_tempmax_time@1#KL]</td>
<td>[seqday1_th0_tempmax_c@1] °C</td>
</tr>

<tr class="column-dark">
<td>[seqday1_localdate@2#GH].[seqday1_localdate@2#EF]</td>
<td>[seqday1_th0_tempmin_time@2#IJ].[seqday1_th0_tempmin_time@2#KL]</td>
<td>[seqday1_th0_tempmin_c@2] °C</td>
<td>[seqday1_th0_tempmax_time@2#IJ].[seqday1_th0_tempmax_time@2#KL]</td>
<td>[seqday1_th0_tempmax_c@2] °C</td>
</tr>

Result:

<tr class="column-light">
<td>11.01</td>
<td>[seqday1_th0_tempmin_time].[seqday1_th0_tempmin_time]</td>
<td>-0.6 °C</td>
<td>[seqday1_th0_tempmax_time].[seqday1_th0_tempmax_time]</td>
<td>2.3 °C</td>

</tr>
<tr class="column-dark">
<td>10.01</td>
<td>[seqday1_th0_tempmin_time].[seqday1_th0_tempmin_time]</td>
<td>-1.3 °C</td>
<td>[seqday1_th0_tempmax_time].[seqday1_th0_tempmax_time]</td>
<td>1.5 °C</td>
</tr>

Re:The problem with SEQDAY1 statement in template

Posted: Mon Jan 11, 2010 8:39 pm
by admin
When you call your meteohub with "http://your-meteohub-ip/meteograph.cgi?text=all" you get all available variables listed for your specific sensor setup.

You will see, that there is no variable "seqday1_th0_tempmin_time".

There are time stamps available to associate the values to certain days by this sequence:
seqday1_localdate 20100111181535_20100110181535_20100109181535_20100108181535

This should normally be dates like 20100111000000, 20100110000000, etc... I will check why that is not the case and that might be the reason that does not match teh values you are expecting. However you can address these to get values matched to certain days, hours, etc...

Re:The problem with SEQDAY1 statement in template

Posted: Mon Jan 11, 2010 8:55 pm
by admin
I just checked the code, values are correct min/max values for a certain day.
As values are computed for completed periods only (as always in Meteohub) the first value you see in the "seqday1_th0_tempmin_c" sequence is the one from yesterday. "seqday1_localdate" variable lists days stating from the actual point in time. As a result a YYYYMMDD pattern of "seqday1_localdate" date information at position X in the list matches to the sensor data at position X-1 in the list.

Example:
seqday1_localdate 20100111181535_20100110181535_20100109181535_20100108181535
seqday1_th0_tempmin_c -0.4_-5.1_-9.6_-8.8_-7.5_-2.5_-8.1_-7.8

Bold parts do match. Cutoff last 6 digits from time stamp as they are not helpful here.