Page 1 of 1

Tag 24h ago

Posted: Wed Dec 20, 2017 6:17 pm
by Chill
Hi,
Does anyone know if there are '24 hours ago' tags.
Say
- Temp now
- Temp 24 h ago

or barometer, wind, ...

I couldn't find them in the meteohub's manual..

Thanks in advance.
Chill

Re: Tag 24h ago

Posted: Fri Dec 22, 2017 9:29 am
by YJB
Hi,

You could use (with some scripting):

Code: Select all

http://meteohub/meteolog.cgi?mode=data&start=20171221081400&sensor=th1

20171221081408 th1 8.3 95 7.5
20171221081507 th1 8.3 95 7.5
20171221081605 th1 8.3 95 7.5
20171221081723 th1 8.3 95 7.5
20171221081820 th1 8.3 95 7.5
<SNIP>
In this case you are looking at raw values (ie all the values reported by the sensor). Obviously one needs to inject the current date-24h and use "head -1" assuming Linux

Or, use the fields provided by seqhour1_thb1_temp_c, the latter gives a granularity of approx 5 minutes.

Code: Select all

http://meteohub/meteograph.cgi?text=seqhour1_th1_temp_c

6.8_6.5_6.5_6.8_6.8_6.8_6.4_6.5_6.9_6.9_6.8_6.5_6.3_6.5_6.8_7.1_7.5_7.9_8.1_8.2_8.3_8.2_8.3_8.3_8.3_8.3_
Field 1 is the most recent calculated value (max 5 mins ago) and then, "_" separated in steps of one hour.

Ysbrand

Re: Tag 24h ago

Posted: Fri Dec 22, 2017 12:31 pm
by Mattk
You could use the Delta selector

Re: Tag 24h ago

Posted: Fri Dec 22, 2017 2:04 pm
by Chill
Ysbrand,
Many thannks for your info.
Unfortunately I don't know how to implement a script here.
Would it be possible to insert the code inside the "test-template.html" ?
What would I need to do so ?

As you can see I'm not used to scripting java/html...
Have a nice day,

Chill

Re: Tag 24h ago

Posted: Fri Dec 22, 2017 11:45 pm
by Mattk
There is no scripting required with this one

[th0temp-delta24h.1:] will return the difference in temp between the current temp and that of 24 hours ago. The value will be - (minus) if the temp has decreased or + (plus) if the temp has increased.

You can do whatever you like with this delta value, used with arithmetic operators you could derive the actual temp value for 24 hours ago etc, just depends on what you intend to show? Simply use this value or derived expression value as you would any other template value

Re: Tag 24h ago

Posted: Sat Dec 23, 2017 12:10 pm
by Chill
Hi Mattk,
Thanks for your post.
I can't see it.
Actually I'm using [actual_th0_temp_c:ND] to show T now

Whats the tag to be used to see T 24 h. ago?
If I try [actual_th0_temp_c-delta24h.1:] it doesn't work. And I couldn't find any info in meteohub's manual...

Best Regards,
Chill

Re: Tag 24h ago

Posted: Sat Dec 23, 2017 1:40 pm
by Mattk
MeteoHub? Ok then that's different to Meteobridge templates

Re: Tag 24h ago

Posted: Sat Dec 23, 2017 8:37 pm
by Chill
Mattk,
I feared!
thanks anyway!

Regards,
Chill

Re: Tag 24h ago

Posted: Thu Dec 28, 2017 5:09 pm
by Chill
Again,
In all-sensors.xml I can find:
<data timeframe="last24h">
<item sensor="date0" cat="date" unit="utc">20171228144513</item>
<item sensor="date0" cat="date" unit="local">20171228154513</item>
<item sensor="rain0" cat="rate" unit="mm">0.0</item>
...
...
<item sensor="thb0" cat="tempmax" unit="c">23.6</item>
<item sensor="thb0" cat="tempmax" unit="f">74.5</item>
<item sensor="thb0" cat="temp" unit="trend">1</item>
<item sensor="thb0" cat="tempdelta" unit="c">0.9</item>
<item sensor="thb0" cat="tempdelta" unit="f">1.6</item>

What's the meaning of this tag? (in timeframe="last24h"). Is it the delta between last reading and 24h ago? If >0 is it warmer now? or just the opposite?

TIA,
Chill