Author Topic: Meteotemplate  (Read 8961 times)

jachym

  • Strong Breeze
  • ***
  • Posts: 210
    • Meteotemplate
  • Station Details: WH1080
Meteotemplate
« on: September 20, 2016, 01:32:09 PM »
Hi guys,
I should probably first introduce myself. My name is Jachym, I am from the Czech Republic, and I am the developer of the Meteotemplate weather website template which maybe some of you even use already, however up until now it was not compatible with WeatherCat software.

I will not go into much details about the template as such, just provide a link where you will find all the information about what it is, a fully functional demo, wiki and a daily updated blog. The template is unique in that it uses its own MySQL database, which offeres much more possibilities compared to other templates currently available. There are over 100 plugins and 100 homepage widgets (blocks) available. I also often make plugins/blocks specifically for a country, which means you can customize it in infinite number of ways. I should also emphasize that the template is free (donationware) so you can download it and use it right away, including all the plugins and blocks. I also try to offer support as much as possible, it is obviously just a hobby for me, but I spend several hours/day working on it.

www.meteotemplate.com
More info also at: http://www.wxforum.net/index.php?topic=26825.0

The reason why I registered on this forum is that Ive been asked by one of the users at the wxforum.net if it would be possible to make it compatible with WeatherCat. I must admit I have never heard about this SW before and also, I use Linux so I guess I cannot install it myself even just for developing purposes.

Still, I would like to develop a plugin for the template that would actually allow updating the database directly from WeatherCat (currently it is possible to do it via Weather Display, Cumulus, Meteobridge, Weather View, NetAtmo, Weather Link and Weather Underground). The WU option is what most users of WeatherCat would probably be able to use even now, but it is not ideal because you rely on WU, which especially recently has not been very reliable.

Now, the problem I have is that I want to use one of the text files that WC generates. But I was not able to find documentation for it. I found documentation for the tags file, but I would prefer using the other one. The most important thing I need is what are the possible unit strings in that file, because that is crucial. I need to know that so that the updating script correctly converts the units if necessary.

I found this: http://wiki.trixology.com/index.php/WeatherCat_Webtags_with_Cumulus_Equivalents

However, I noticed that for example for the pressure units, this file shows possibilities as "Possible values are mBar, in Hg or hPa"
But in the other file I am using (realtime.wc.txt), the pressure units were given as "inhg", so I need to know the exact string so that it can be matched by the template, same goes for the wind units and precipitation units, temperature is I guess either "C" or "F".

I would love to get this working and maybe some of you will find the template interesting and give it a try.

xairbusdriver

  • Storm
  • *****
  • Posts: 3126
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.15.7/WC 3.0.5
Re: Meteotemplate
« Reply #1 on: September 20, 2016, 03:26:46 PM »
First, Welcome AboaRd, Jachym!

Glad you have discovered WeatherCat! In my own opinion, it's nearly enough reason to buy a Mac!

WOW! While I'm not an expert on any available 'template', I am very impressed with the depth of detailed info in the "Demo"! I have been working on a METAR display page for my site and now I see there are some 'Pressure Trend" symbols that could be quite useful. These may already be available on other 'templates', I've just not seen them.

I was very pleasantly surprised to see that your template is not a one-size-fits-all! I know that can be difficult with what is mainly a data display site, but you have done an excellent job in that regard! Congratulations! Looks like you have a 'mobile' version, also, which means your pages will probably work on any size screen. That's even more difficult, in my opinion, but CSS is probably your solution! ;) I plan on taking a more detailed look at your 'template' when I have the time.

In the meantime, hopefully Stu will answer your questions about documentation, either here or by email. He is a fantastic developer, so is is pretty busy. WeatherCat is actually his second-job, but you can tell he is a real professional! There are also many very helpful and knowledgeable folks here who might also be able to help.
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system


WCDev

  • WeatherCat Developer
  • Administrator
  • Storm
  • *****
  • Posts: 2911
    • CW9739
    • ISCOTLAN25
    • Trixology
  • Station Details: Main Station: Vantage Pro-2, 24hr fars, solar, soil/leaf station, extra temp stations, no U.V. WeatherLink IP.
Re: Meteotemplate
« Reply #2 on: September 20, 2016, 05:25:02 PM »
Hi Jachym,
Welcome to the forum (and thank you for the kind comments to xairbusdriver).

I think the wiki is wrong - here's the possible values for the unit tags:

TEMPUNITS$ - string describing the temperature units - one of ?C or ?F
RAINUNITS$ - string describing the rain units - one of  mm or in
WINDRUNUNITS - string describing the wind run units - one of km, miles, NM's or metres
PRESSUREUNIT$ - string describing the pressure units - one of mb, inHg,  hPa
WINDSPEEDUNITS$ - string describing the wind speed units - one of km/h, MPH, Knots, m/s

Hope that helps  [tup]

jachym

  • Strong Breeze
  • ***
  • Posts: 210
    • Meteotemplate
  • Station Details: WH1080
Re: Meteotemplate
« Reply #3 on: September 20, 2016, 10:58:12 PM »
Hi guys,

thanks for the warm welcome.

Yes, the template should work on all screen sizes, however... it is a bit complicated, I myself do not have a smartphone or tablet, so it is a bit complicated for me to test this. People asked for it so I tried, but... if it works :D I dont know, based on feedback I got it should :D

Buying a Mac? Hmmm.... I must say I did use it in the past, we had it in the library, Im not saying Apple products are bad, it is just not my cup of coffee. I did use it for quite a while and I just prefer different OS. The other problem is that I have a very old laptop, 10yrs... 1GB RAM and 60GB slow HDD so I had to uninstall XP and now I use Lubuntu. That is one of the reasons I rely on developers to tell me how to use thier SW, because testing on Linux is problematic, not to mention my laptop has problems running even Chrome and for coding I use Notepad++, but any other SW would probably freeze it. Even more than 2 tabs in Chrome freeze it. At this point it also must be said that although nice, the Apple products are IMHO quite over-priced and absolutely unaffordable for me.

Anyway, I will use the information you provided (thanks!) and then send the script for testing to one WCat user and if it works I will release it as a plugin for download by anyone and prepare documentation in the Meteotemplate wiki how to install it :-) I am almost done with the script so it should be within this week.

jachym

  • Strong Breeze
  • ***
  • Posts: 210
    • Meteotemplate
  • Station Details: WH1080
Re: Meteotemplate
« Reply #4 on: September 20, 2016, 11:06:19 PM »
And yes I totally agree, making it static would never fit all.

The way this works is you download the core files, which mostly are pages with stats and graphs from data from your station.

Then you choose the additional plugins you want. I try to also develop country-specific ones so you can even include regional info on your website. These are automatically added to the menu.

Then there are the so-called "blocks". These are like widgets that you put on your homepage. You can set the layout of the homepage absolutely as you like. Specify the number of columns, their widths, order of widgets, create overlaying widgets. The template also allows you to choose from 20 different color themes, 18 languages, set the units (which can also be changed by the user as a cookie), there is a password-protected admin section where you set it up and from version 8, everything is basically done via GUI, no setup in code directly.

One last thing I should emphasize however is that I am by no means a developer! I have a PWS and 2 yrs ago I thought it would be nice to have a webpage, so I began learning HTML and then gradually also CSS, PHP, SQL... and over time I created this, but I have never read any book from A to Z, attended any course or studied it. It is just my night-time hobby that I do now and since I also do all the support, wiki, blog etc. and I have a full-time and part-time job + doing PhD degree exterally, you will have to bear with me, this is not my full-time project :D Just fun :-) And Im glad people enjoy it, I do to, Im learning all the time, yr ago everything was different, no GUI, no plugins, no blocks... it all develops over time as I discover new and more efficient ways of doing things, but the other thing is I met so many great people, also talked to many on Skype and learned about them, their countries, cultures and I even learned some words in other languages while doing the translations and refreshed my French and German :D

Blicj11

  • Storm
  • *****
  • Posts: 3941
    • EW3808
    • KUTHEBER6
    • Timber Lakes Weather
  • Station Details: Davis Vantage Pro2 Plus | WeatherLinkIP Data Logger | iMac (2019), 3.6 GHz Intel Core i9, 40 GB RAM, macOS Ventura 13.6 | Sharx SCNC2900 Webcam | WeatherCat 3.3 | Supportive Wife
Re: Meteotemplate
« Reply #5 on: September 20, 2016, 11:36:06 PM »
Your English is very, very good. Better than mine and it is my mother tongue. Welcome to the forum and thanks for contributing.
Blick


elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6494
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Welcome! (Re: Meteotemplate)
« Reply #6 on: September 20, 2016, 11:37:48 PM »
Dear jachym and WeatherCat welcome wagon, . .

I should probably first introduce myself. My name is Jachym, I am from the Czech Republic, and I am the developer of the Meteotemplate weather website template which maybe some of you even use already.

By all means welcome to the WeatherCat forum!

Congratulations on your very impressive Meteotemplate weather website template!  [tup]

The reason why I registered on this forum is that Ive been asked by one of the users at the wxforum.net if it would be possible to make it compatible with WeatherCat. I must admit I have never heard about this SW before and also, I use Linux so I guess I cannot install it myself even just for developing purposes.

I think I speak for the WeatherCat community in saying that we greatly appreciate your efforts. 

Thanks for your interest and I hope indeed there will a version of Meteotemplate available for WeatherCat in the not too distant future!

Cheers, Edouard  [cheers1]

jachym

  • Strong Breeze
  • ***
  • Posts: 210
    • Meteotemplate
  • Station Details: WH1080
Re: Meteotemplate
« Reply #7 on: September 21, 2016, 03:38:18 PM »
Hi Jachym,
Welcome to the forum (and thank you for the kind comments to xairbusdriver).

I think the wiki is wrong - here's the possible values for the unit tags:

TEMPUNITS$ - string describing the temperature units - one of ?C or ?F
RAINUNITS$ - string describing the rain units - one of  mm or in
WINDRUNUNITS - string describing the wind run units - one of km, miles, NM's or metres
PRESSUREUNIT$ - string describing the pressure units - one of mb, inHg,  hPa
WINDSPEEDUNITS$ - string describing the wind speed units - one of km/h, MPH, Knots, m/s

Hope that helps  [tup]

OK, so here is the file I was provided with and which Im using to develop the plugin:

{"date":"09/13/16 13:03 "|"dateFormat":"d/m/y"|"temp":"86.6"|"tempTL":"69.3"|"tempTH":"88.2"|"intemp":"86.1"|"dew":"67.4"|"dewpointTL":"65.8"|"dewpointTH":"71.5"|"apptemp":"91.1"|"apptempTL":"73.5"|"apptempTH":"93.5"|"wchill":"86.6"|"wchillTL":"69.3"|"heatindex":"89.7"|"heatindexTH":"103.3"|"humidex":"86.6"|"wlatest":"1"|"wspeed":"2"|"wgust":"7"|"wgustTM":"10"|"bearing":"114"|"avgbearing":"99"|"press":"30.04"|"pressTL":"30.01"|"pressTH":"30.08"|"pressL":"29.29"|"pressH":"30.64"|"rfall":"0.00"|"rrate":"0"|"rrateTM":"0"|"hum":"53"|"humTL":"50"|"humTH":"91"|"inhum":"58"|"SensorContactLost":"0"|"forecast":"Increasing clouds with little temperature change. Precipitation possible within 24 to 48 hours."|"tempunit":"°F"|"windunit":"MPH"|"pressunit":"inHg"|"rainunit":"in"|"temptrend":"-1.5"|"TtempTL":"6:11 AM"|"TtempTH":"12:00 PM"|"TdewpointTL":"5:24 AM"|"TdewpointTH":"10:21 AM"|"TapptempTL":"6:00 AM"|"TapptempTH":"12:00 PM"|"TwchillTL":"6:11 AM"|"TheatindexTH":"11:44 AM"|"TrrateTM":"-"|"ThourlyrainTH":"-"|"LastRainTipISO":"-"|"hourlyrainTH":"-"|"ThumTL":"12:22 PM"|"ThumTH":"7:00 AM"|"TpressTL":"12:04 AM"|"TpressTH":"9:49 AM"|"presstrendval":"-0.01"|"Tbeaufort":"-"|"TwgustTM":"11:55 AM"|"windTM":"11:55 AM"|"bearingTM":"-"|"timeUTC":"2016,9,13,18,3,55"|"BearingRangeFrom10":"0"|"BearingRangeTo10":"359"|"UV":"0.0"|"SolarRad":"171"|"CurrentSolarMax":"-"|"SolarTM":"0.0"|"version":"WeatherCat"|"build":"V2.40, Build 198"|"ver":"8"}

So just to make sure, when you say for example:
Quote
WINDSPEEDUNITS$ - string describing the wind speed units - one of km/h, MPH, Knots, m/s

It means that for example km/h uses the slash (/) and also some words are capitalized right? Eg "MPH". It looks a bit inconsisent to me, so Im just not sure if it is really MPH or mph and km/h or kmh and Knots, knots or kts or kt... I will use what you posted, if you think there is something different let me know

WCDev

  • WeatherCat Developer
  • Administrator
  • Storm
  • *****
  • Posts: 2911
    • CW9739
    • ISCOTLAN25
    • Trixology
  • Station Details: Main Station: Vantage Pro-2, 24hr fars, solar, soil/leaf station, extra temp stations, no U.V. WeatherLink IP.
Re: Meteotemplate
« Reply #8 on: September 21, 2016, 05:42:27 PM »
Hi Jachym,
They are as posted. And you're right, they are inconsistent with each other, especially when there's more than one way of abbreviating something - MPH or mph for example.

Where possible I'll try to use the most common form of abbreviation - for example kilometres per hour is generally abbreviated km/h as this is the most commonly used form in the European Union and most other countries, but it can also be abbreviated in other ways, such as km?h−1 or kph.

jachym

  • Strong Breeze
  • ***
  • Posts: 210
    • Meteotemplate
  • Station Details: WH1080
Re: Meteotemplate
« Reply #9 on: September 21, 2016, 11:26:33 PM »
No problem, it was just a suggestion.

Either way, just to make sure, in the script I will convert all the unit strings to lowercase and delete all symbols like "/" etc.

This way I can make sure that the units will always be something like "kmh", "mph", "knots" etc.

xairbusdriver

  • Storm
  • *****
  • Posts: 3126
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.15.7/WC 3.0.5
Re: Meteotemplate
« Reply #10 on: September 21, 2016, 11:50:16 PM »
Quote
I will convert all the unit strings to lowercase and delete all symbols like "/" etc.
Not sure I understand the reason for that. Many folks want the "/" when it is appropriate. It is simply the short substitute for "per". The distance and the time are totally separate, except for "knots/knot/kt/kts". Note that the "s" is not required for a single quantity of anything. These kinds of differentiation are exactly what computers are good for. Why not use it? Having "1 knots" or "11 knot" just looks lazy to me. Or, better yet, give the user a choice! Now there's an idea! [cheer]

It's a bit harder to code, but "coding is just typing, after all"! [computer] It's the little things like this that make using some computers and OSs a pleasure! Most people will never see the "s" dropping off the "...seconds" or "minutes" remaining text, but it shows the care and attention to detail of the coder when it's done. [lol]
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system


TechnoMonkey

  • Strong Breeze
  • ***
  • Posts: 127
    • EW9323
    • KTXARANS6
    • TechnoMonkeys Weather
  • Station Details: La Crosse WS-2315 / High Sierra Server / Mac Mini 2.3 GHz Intel Core i5/ 8GB Ram / OS 120GB SSD / Home Folder 500GB FireWire / DATA 8TB RAID 5 / 1TB TIME CAPSULE
Re: Meteotemplate
« Reply #11 on: September 22, 2016, 12:46:09 AM »
Actually, whatever is easiest to do would be the way to go.  I would like to see the template up and running with the WC and the script can be easily modified after the fact.

jachym

  • Strong Breeze
  • ***
  • Posts: 210
    • Meteotemplate
  • Station Details: WH1080
Re: Meteotemplate
« Reply #12 on: September 22, 2016, 12:48:21 AM »
Sorry... I did not make myself clear...

yes the template of course uses the proper formatting (in this particular case the template uses: km/h, m/s, kts, mph, inHg, hPa, in, mm etc.). What I meant is that I will convert the unit string to lowercase and remove the symbols when matching it to the particular unit type.

The way this works is that the script checks what units you are used in the database and what is in the textfile. Then, if they are different from what is in the text file, it does the corresponding conversion.

So what I meant was for example (simplified), in the code you would have:
if(fileunits=databaseunits) -> do nothing
if(filewindunits=mph and databasewindunits=kmh) -> convert mph to kmh
etc etc for all units and all parameters
So what I meant by converting it to lowercase was that I will convert the string to lower case before trying to match it, so anything like "Km/h", "kmh", "Kmh" would be matched with kmh and converted correctly. The actual string (kmh etc.) is not saved in the database anyway, it is just the number that I need to get right

Blicj11

  • Storm
  • *****
  • Posts: 3941
    • EW3808
    • KUTHEBER6
    • Timber Lakes Weather
  • Station Details: Davis Vantage Pro2 Plus | WeatherLinkIP Data Logger | iMac (2019), 3.6 GHz Intel Core i9, 40 GB RAM, macOS Ventura 13.6 | Sharx SCNC2900 Webcam | WeatherCat 3.3 | Supportive Wife
Re: Meteotemplate
« Reply #13 on: September 22, 2016, 02:47:37 AM »
Don't worry about explaining things to Xair, he is still trying to learn English.  ;)

It's easy to tell from your signature banner and your website that the formatting is correct. Nice template work!
Blick


wurzelmac

  • Storm
  • *****
  • Posts: 1361
    • ITIROLPR2
    • Wetterstation Pr?graten am Gro?venediger
  • Station Details: Davis Vantage PRO2 Plus (24h fan aspirated, wireless) with UV/Solar | Weather Envoy Data Logger | Mac mini 2023 M2 8/256 | 1x Canon EOS 1300D | macOS Sonoma 14.2
Re: Meteotemplate
« Reply #14 on: September 22, 2016, 09:39:56 AM »
Very impressive Template, Jachym!
Reinhard