Author Topic: Meteotemplate  (Read 65481 times)

idunn

  • Strong Breeze
  • ***
  • Posts: 146
  • name: idunn
    • icantono2
    • Magpie Hill
  • Station Details: WS1080, iMac 10.9.5, Canon Powershot A510 zoomed with gphoto2, located at 950m in Gross Switzerland, Webcam view SE to Alps on magpie-hill.com on WeatherCloud (MagpieHill) and Wunderground (ID icantono2)
Re: Meteotemplate
« Reply #45 on: September 25, 2016, 03:19:26 pm »
I have only seen the daily rain set to zero at midnight. So yes accumulation since midnight.

Irving

jachym

  • Strong Breeze
  • ***
  • Posts: 210
    • Meteotemplate
  • Station Details: WH1080
Re: Meteotemplate
« Reply #46 on: September 25, 2016, 03:34:36 pm »
Yes it would because remember that the template saves this to its own database only as a number and then on the page all rain rates are taken from the db as a number and the units appended (either in/h or mm/h, that depends on user selection), but it is always "per hour", so the number in the template db must be per hour.

jachym

  • Strong Breeze
  • ***
  • Posts: 210
    • Meteotemplate
  • Station Details: WH1080
Re: Meteotemplate
« Reply #47 on: September 25, 2016, 03:37:57 pm »
Bascially, the most important thing to understand is:

Meteotemplate does not work like all the other templates. It does not replace tags with values. Instead it does all the calculations itself. There is no tag for for example avg daily temperature. What the template does is save current conditions periodically to the database and then instead of replacing in the above example, the avg temperature tag with the number by WC, it calculates and pulls the average value from the db.

So the process is like this (will be :D)
- template with tags inserted in WC -> this will generate a file with only current conditions and will be periodically uploaded to your server
- the WC plugin will periodically read the content of this file and save it with the corresponding timestamp to the database

Then, all the rest is done by the template and the MySQL, the only tags used will be the ones for current conditions. However the fact you have the database means you can then calculate absolutely anything. Thats the main difference between for example Saratoga or Leuven template, they use the tag replacement, but no database in the backend.

Alan Rowley

  • Strong Breeze
  • ***
  • Posts: 148
  • It is far better to wear out than to rust away.
    • D3696
    • INOTTING15
    • Selston Weather
  • Station Details: Weather station: Davis Vantage Pro2. Software: WeatherCat. Computer: Mac Mini, High Sierra OS
Re: Meteotemplate
« Reply #48 on: September 25, 2016, 03:51:59 pm »
Jachym, a quick question.

I used Weather Display from September 2009 until July 2015 before moving to WeatherCat. Can I import both sets of data to use with your template, or would I be better to use data from my Weather Underground account which runs continuously from October 2009 until today?

ALAN.

jachym

  • Strong Breeze
  • ***
  • Posts: 210
    • Meteotemplate
  • Station Details: WH1080
Re: Meteotemplate
« Reply #49 on: September 25, 2016, 04:02:12 pm »
Hi,
there is a script for importing WD logs, Cumulus logs, directly from WU and using CSV. So if you have continuous data at WU, that would be the easiest.

The other option would be importing WD logs directly and for WC you would use the CSV import. Instructions for how exactly that CSV file has to look like are in the wiki.

Alan Rowley

  • Strong Breeze
  • ***
  • Posts: 148
  • It is far better to wear out than to rust away.
    • D3696
    • INOTTING15
    • Selston Weather
  • Station Details: Weather station: Davis Vantage Pro2. Software: WeatherCat. Computer: Mac Mini, High Sierra OS
Re: Meteotemplate
« Reply #50 on: September 25, 2016, 04:28:53 pm »
Thanks for the quick reply Jachym. I think I will go for the WU option.

ALAN.

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 5445
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Thanks Jachym! (Re: Meteotemplate)
« Reply #51 on: September 25, 2016, 11:19:57 pm »
Thanks Jachym for taking the time to make your templates available to WeatherCat!

They are very impressive! [tup]

Cheers, Edouard  [cheers1]

jachym

  • Strong Breeze
  • ***
  • Posts: 210
    • Meteotemplate
  • Station Details: WH1080
Re: Meteotemplate
« Reply #52 on: September 26, 2016, 12:42:45 am »
Thanks guys, slowly getting there :)

I have a file that I need someone to test. Just upload it as a template to your WC and then let WC to process the tags and upload the corresponding text file to your server. Then please post here the produced text file so that I can check it looks the way I meant it.

Thanks!

xairbusdriver

  • Storm
  • *****
  • Posts: 2447
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.14.4/WC 3.0.4
Re: Meteotemplate
« Reply #53 on: September 26, 2016, 02:23:35 am »
I don't see an answer to your question about the meaning or use of "STAT$RAIN:CURRENT$". It is a confusing construction to me. I thought "STAT$" was used to get 'historical info from the WC database. In this case you seem to want the 'current' rain amount. I would suggest simply using the RS$ tag would give you the "Current rain storm value" and the user set units; "6.0 mm".

OTOH, "CR$" might be what you wanted, that is the value of the "hourly precip rate"; " 0.8 mm/h (0.1)" means .8 mm current rate, as compared to the previous rate of .1 mm/hr.

Instead of "STAT$TEMPERATURE:CURRENT$" I think all you need is CT$. I think all tags starting with "C" provide 'current data'. Likewise, "CW$" provides the average current speed in place of STAT$AVERAGEWINDSPEED:CURRENT$

At least WC doesn't issue any errors, but it looks counter-intuitive to see "STAT$" and "CURRENT$" in the same tag combination. ;)

I'm not sure you understand that "current" values will be generated every number of minutes the user defines in the WC Prefs. Mine are generated every 2 minutes, which is probably fairly common. I think you'd need to have the user enter this frequency in your setup GUI so you'll know how often to check his uploaded data file. You could use the CU$ tag and check for changes every 30 seconds for several minutes and see when that value changes, but that seems like a pretty brute force way to do it! ;)

jachym

  • Strong Breeze
  • ***
  • Posts: 210
    • Meteotemplate
  • Station Details: WH1080
Re: Meteotemplate
« Reply #54 on: September 26, 2016, 10:16:55 am »
I did this because this is exactly what it states in the manual and they seem to be more "up-to-date"

Page 209 of the manual says:

Quote
CURRENT will display the real-time value of a given item ? these queries are replaced
with the data value at the time of the query. This is different to the higher level tags such as
CT$ or CD$ etc. as those values are pulled from the database which has a resolution of 1
minute.

To display the current outdoor temperature:
STAT$TEMPERATURE:CURRENT$
This is rendered as:
12.17


I originally used the "CT..." syntax, but this seems to be more up-to-date and also, as far as I can see, there are not tags for for example current solar radiation, other than this one.

jachym

  • Strong Breeze
  • ***
  • Posts: 210
    • Meteotemplate
  • Station Details: WH1080
Re: Meteotemplate
« Reply #55 on: September 26, 2016, 10:25:57 am »
I also think I found the problem in the original file, if someone could please try this one:


idunn

  • Strong Breeze
  • ***
  • Posts: 146
  • name: idunn
    • icantono2
    • Magpie Hill
  • Station Details: WS1080, iMac 10.9.5, Canon Powershot A510 zoomed with gphoto2, located at 950m in Gross Switzerland, Webcam view SE to Alps on magpie-hill.com on WeatherCloud (MagpieHill) and Wunderground (ID icantono2)
Re: Meteotemplate
« Reply #56 on: September 26, 2016, 02:15:38 pm »
Greetings All
Do I need to upload Meteotemplate to my provider to test it or will WC do that offline, as with Simple Web?  Also I now have Simple Web on my provider. Can I just upload Meteotemplate without deleting Simple Web, or will there be confusion?
Thanks for help and regards,  Irving

jachym

  • Strong Breeze
  • ***
  • Posts: 210
    • Meteotemplate
  • Station Details: WH1080
Re: Meteotemplate
« Reply #57 on: September 26, 2016, 02:37:07 pm »
No, for now I just need to see what the file I posted above produces. It should produce a text file on your server where the tags are replaced with the particular values. Then please just post this resulting file here.
You can then install the template fully once the plugin is ready and yes you can install it into a separate directory and all your other stuff will stay untouched. Meteotemplate can be uploaded to any directory on the server.

idunn

  • Strong Breeze
  • ***
  • Posts: 146
  • name: idunn
    • icantono2
    • Magpie Hill
  • Station Details: WS1080, iMac 10.9.5, Canon Powershot A510 zoomed with gphoto2, located at 950m in Gross Switzerland, Webcam view SE to Alps on magpie-hill.com on WeatherCloud (MagpieHill) and Wunderground (ID icantono2)
Re: Meteotemplate
« Reply #58 on: September 26, 2016, 02:58:47 pm »
You won't believe it, but I do not understand what you mean when you say "on my server". Is this the provider, such as GoDaddy or what?
Regards, Irving

jachym

  • Strong Breeze
  • ***
  • Posts: 210
    • Meteotemplate
  • Station Details: WH1080
Re: Meteotemplate
« Reply #59 on: September 26, 2016, 03:01:13 pm »
Hi,
you said you have a webpage already, that means you must have some "space" on some server, where you upload your files. And there you might have some directories/files already, just like you have on your PC. And you can simply create a new folder and upload all the template files into it and use that and have all the rest the way it is now.