Tag 24h ago

Discussion of the Meteohub software package

Moderator: Mattk

Post Reply
Chill
Expert Boarder
Expert Boarder
Posts: 151
Joined: Fri Feb 15, 2008 6:38 pm

Tag 24h ago

Post by Chill » Wed Dec 20, 2017 6:17 pm

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
Last edited by Chill on Thu Dec 28, 2017 4:31 pm, edited 1 time in total.

User avatar
YJB
Platinum Boarder
Platinum Boarder
Posts: 387
Joined: Thu Feb 19, 2009 5:53 pm
Location: Venhuizen, Netherlands
Contact:

Re: Tag 24h ago

Post by YJB » Fri Dec 22, 2017 9:29 am

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

Mattk
Platinum Boarder
Platinum Boarder
Posts: 417
Joined: Mon Sep 22, 2014 3:24 am

Re: Tag 24h ago

Post by Mattk » Fri Dec 22, 2017 12:31 pm

You could use the Delta selector

Chill
Expert Boarder
Expert Boarder
Posts: 151
Joined: Fri Feb 15, 2008 6:38 pm

Re: Tag 24h ago

Post by Chill » Fri Dec 22, 2017 2:04 pm

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

Mattk
Platinum Boarder
Platinum Boarder
Posts: 417
Joined: Mon Sep 22, 2014 3:24 am

Re: Tag 24h ago

Post by Mattk » Fri Dec 22, 2017 11:45 pm

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

Chill
Expert Boarder
Expert Boarder
Posts: 151
Joined: Fri Feb 15, 2008 6:38 pm

Re: Tag 24h ago

Post by Chill » Sat Dec 23, 2017 12:10 pm

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

Mattk
Platinum Boarder
Platinum Boarder
Posts: 417
Joined: Mon Sep 22, 2014 3:24 am

Re: Tag 24h ago

Post by Mattk » Sat Dec 23, 2017 1:40 pm

MeteoHub? Ok then that's different to Meteobridge templates

Chill
Expert Boarder
Expert Boarder
Posts: 151
Joined: Fri Feb 15, 2008 6:38 pm

Re: Tag 24h ago

Post by Chill » Sat Dec 23, 2017 8:37 pm

Mattk,
I feared!
thanks anyway!

Regards,
Chill

Chill
Expert Boarder
Expert Boarder
Posts: 151
Joined: Fri Feb 15, 2008 6:38 pm

Re: Tag 24h ago

Post by Chill » Thu Dec 28, 2017 5:09 pm

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

Post Reply