Author Topic: Meteotemplate  (Read 27944 times)

wurzelmac

  • Storm
  • *****
  • Posts: 1064
    • 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 2,7 GHz Intel Core i7 with 8 GB of RAM | 2x Canon EOS 1100D | macOS 10.13.1 HighSierra
Re: Meteotemplate
« Reply #15 on: September 23, 2016, 04:22:41 PM »
Reinhard


jachym

  • Strong Breeze
  • ***
  • Posts: 207
    • Meteotemplate
  • Station Details: WH1080
Re: Meteotemplate
« Reply #16 on: September 23, 2016, 04:29:36 PM »
OK well I see the problem and it is what I feared... it is the same problem as with Cumulus.

The logs are not consistent, it uses various decimal separators etc. That is a problem, PHP does not recognize "," as a decimal comma. The ideal is when the logs are static, like in weather display, it is always easy for a developer to do whatever formatting they need to show it to the user and know exactly what input you are getting. Here the problem is in the commas, it cannot recognize that as a decimal, so it shows an error. Is there any way of generating this with decimal periods? (.)?

Ideal situation would be if WeatherCat could generate one log file that would disregard all user system settings and have one fixed structure. That is how most APIs work. I had lot of problems with this with Cumulus.

wurzelmac

  • Storm
  • *****
  • Posts: 1064
    • 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 2,7 GHz Intel Core i7 with 8 GB of RAM | 2x Canon EOS 1100D | macOS 10.13.1 HighSierra
Re: Meteotemplate
« Reply #17 on: September 23, 2016, 04:37:19 PM »
Thank you for confirming that I am not a perfect idiot.

 [rock]
Reinhard


jachym

  • Strong Breeze
  • ***
  • Posts: 207
    • Meteotemplate
  • Station Details: WH1080
Re: Meteotemplate
« Reply #18 on: September 23, 2016, 04:38:15 PM »
OK hang on, is that the same file? Even all the field delimiters are different.

Just to make sure, this is what I was working with:

{"date":"09/23/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"}

jachym

  • Strong Breeze
  • ***
  • Posts: 207
    • Meteotemplate
  • Station Details: WH1080
Re: Meteotemplate
« Reply #19 on: September 23, 2016, 04:39:01 PM »
OK I think it is a completely different file, it has different separator, delimiter, even the variables are different.

wurzelmac

  • Storm
  • *****
  • Posts: 1064
    • 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 2,7 GHz Intel Core i7 with 8 GB of RAM | 2x Canon EOS 1100D | macOS 10.13.1 HighSierra
Re: Meteotemplate
« Reply #20 on: September 23, 2016, 04:46:17 PM »
I think the developer of WeatherCat (Stu) has made it possible to export this very file with commas (for those of us who are looking for metric values) and with points (for those who are looking for english writings - is that correct???) as the settings are set in WeatherCat Preferences.

Maybe therefore the output is in *commas* here on my side, because in German it spells 10,7°C rather than 10.7°C.
Reinhard


jachym

  • Strong Breeze
  • ***
  • Posts: 207
    • Meteotemplate
  • Station Details: WH1080
Re: Meteotemplate
« Reply #21 on: September 23, 2016, 04:48:05 PM »
Hi,
well not really though. Because if you look at it, the files are differnt. I could try to handle the comma/period issue, but it is everyything - separators, fields... it is a different file.

jachym

  • Strong Breeze
  • ***
  • Posts: 207
    • Meteotemplate
  • Station Details: WH1080
Re: Meteotemplate
« Reply #22 on: September 23, 2016, 04:49:20 PM »
Example:
beginnig of your file:

{"date":"23/09/16",
"timeUTC":"2016,9,23,15,48,23",

Beginning of the file that I was using:
{"date":"09/23/16 13:03 "|"dateFormat":"d/m/y"

wurzelmac

  • Storm
  • *****
  • Posts: 1064
    • 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 2,7 GHz Intel Core i7 with 8 GB of RAM | 2x Canon EOS 1100D | macOS 10.13.1 HighSierra
Re: Meteotemplate
« Reply #23 on: September 23, 2016, 04:54:07 PM »
So maybe we will wait on a response of the person who sent you the file you are using.

 [tup]
Reinhard


wurzelmac

  • Storm
  • *****
  • Posts: 1064
    • 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 2,7 GHz Intel Core i7 with 8 GB of RAM | 2x Canon EOS 1100D | macOS 10.13.1 HighSierra
Re: Meteotemplate
« Reply #24 on: September 23, 2016, 04:57:29 PM »
Reinhard


WCDev

  • WeatherCat Developer
  • Global Moderator
  • Storm
  • *****
  • Posts: 2735
    • 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 #25 on: September 23, 2016, 06:33:25 PM »
Hi Jachym,
It looks like you are dependent on another template's file to get at the data. It would be better to provide your own so that people don't have to download two templates and you don't break when the author of the template you are dependent on changes their file.

If you don't want localised numbers in the file, you can used the DOTSEPARATORS$ tag which will turn off localised numerical output for the STAT$ tag (so you'll always get a decimal point).

Hope that helps!


jachym

  • Strong Breeze
  • ***
  • Posts: 207
    • Meteotemplate
  • Station Details: WH1080
Re: Meteotemplate
« Reply #26 on: September 23, 2016, 06:57:36 PM »
Hi,
sorry I am totally confused now :D
About a week ago, Tom contacted me asking if it would be possible to add support for WeatherCat to the template. I said I will try and I said I need to see the log files produced by weatherCat to create the necessary scripts, just like I did for the Weather Display clientraw, Cumulus realtime.txt etc etc.
He then sent me the file I posted above and I used it, thinking this is something that weatherCat produces and so will be possible to use by all WC users. So now Im really confused, what file is it then? It is not anything like any of the other programs, I made the WC scripts particularly for this file that I have never seen before Tom sent it to me.

So where does this file come from then?

jachym

  • Strong Breeze
  • ***
  • Posts: 207
    • Meteotemplate
  • Station Details: WH1080
Re: Meteotemplate
« Reply #27 on: September 23, 2016, 07:05:39 PM »
This was supposed to be a plugin for users particularly of WC and I thought (was told) this is a file that WC generates and based on that I created the script.... so I really dont know now

WCDev

  • WeatherCat Developer
  • Global Moderator
  • Storm
  • *****
  • Posts: 2735
    • 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 #28 on: September 23, 2016, 07:31:23 PM »
No problem, there's obviously some confusion about which file to process.

xairbusdriver

  • Storm
  • *****
  • Posts: 1835
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless w/remote wireless Anemometer Kit
Re: Meteotemplate
« Reply #29 on: September 23, 2016, 08:57:28 PM »
I the file "Tom" sent you is called "realtimeTags.txt". Since I'm not using a template, that's probably why that file is not sent to my web space. I think I only have it because I once used a template and that is how it accessed the WC data. I suspect it is simply a file, created by the template author, that the user must add to the "Additional Files" area in WC's Prefs. It is then used as any other file as described in the next paragraph.

As I understand WC, merely as a (very) simple user, the app "simply" runs the user's html/php (realtimeTags.txt?) pages through a parser and looks for any of the hundred or so "tags". It then replaces those tags with the appropriate values and sends them on to the user's web space.

I hope I have presented a general explanation of how WC works and how you might make use of the data. I have never used another hardware brand nor more than that one template, so I have no idea how or what other templates work. It might help if you had the WC Manual (pdf) to peruse. I think that might be available for free? ???