Author Topic: Connection errors and quality TAGS$  (Read 3801 times)

rkarpa01

  • Gentle Breeze
  • **
  • Posts: 14
    • EW6264
    • INIEDERS390
    • karpa-cuxhaven
  • Station Details: Oregon Scientific WMR200 using WeatherCat on dedicated iMac
Connection errors and quality TAGS$
« on: December 12, 2014, 07:59:38 AM »
Hi,

are there any tags available that allow me to export the weather station status data (comms error, quality, used data) to my website?


Ralf.

wurzelmac

  • Storm
  • *****
  • Posts: 1375
    • 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.5
Re: Connection errors and quality TAGS$
« Reply #1 on: December 12, 2014, 05:47:28 PM »
Hello again, Ralf!

Once upon a time there existed a gauge window with those errors added at the bottom of the gauges, and you were able to upload this whole window with a tag like the DALL$ tag that is present till now. In this discussion they decided to leave the errors away.

Oh, and on this page you can view all tags available for the current version of WeatherCat.

But there are some AppleScripters around the forum that provide those counts in their scripts - hopefully Edouard chimes in here, he can explain more about that.

Cheers,
Reinhard
Reinhard


rkarpa01

  • Gentle Breeze
  • **
  • Posts: 14
    • EW6264
    • INIEDERS390
    • karpa-cuxhaven
  • Station Details: Oregon Scientific WMR200 using WeatherCat on dedicated iMac
Re: Connection errors and quality TAGS$
« Reply #2 on: December 12, 2014, 06:38:35 PM »
Thanks again, Reinhard,

I will have a look into the scripting options as the DALL$ would give the whole gauges while I was only looking for the additional information.


Ralf.

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6512
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Can be done with AppleScripts. (Re: Connection errors and quality TAGS$)
« Reply #3 on: December 12, 2014, 11:07:54 PM »
Dear Ralf, Randall, and WeatherCat fans,

are there any tags available that allow me to export the weather station status data (comms error, quality, used data) to my website?

The only way to do this at the moment is to use the AppleScripts I wrote.  In particular you need to use the WC Status Growler AppleScript and then use the WC AppleScript Tags Processor to pre-process your web templates before allowing WeatherCat to make a second processing pass.  It is extremely complicated and clumsy, but it can be done.  Here is a link to the latest version of the scripts:

http://athena.trixology.com/index.php?topic=1039.0

All these AppleScripts are years old and sorely in need of a rewrite, but I just don't have the time to take that on right now.  However, there is a lot of documentation, and if you follow it to the letter, the AppleScripts do work fine.

Cheers, Edouard  [cheers1]

rkarpa01

  • Gentle Breeze
  • **
  • Posts: 14
    • EW6264
    • INIEDERS390
    • karpa-cuxhaven
  • Station Details: Oregon Scientific WMR200 using WeatherCat on dedicated iMac
Re: Connection errors and quality TAGS$
« Reply #4 on: December 13, 2014, 06:38:53 AM »
Hi Edouard,

Thanks for the answer. I downloaded the scripts yesterday but when unzipped they seem to be corrupted. I will have a closer look in 1 week's time when I do have some time to work on this.

Ralf.

Steve

  • Global Moderator
  • Storm
  • *****
  • Posts: 1563
    • DW8454
    • KOHAVON11
    • Avon Weather
  • Station Details: Davis Wireless VP2 Plus w/24 hr FARS, Leaf & Soil Station, 2023 Mac mini M2 Pro, 32GB RAM, Mac OS 14, WeatherCat 3.2
Re: Connection errors and quality TAGS$
« Reply #5 on: December 13, 2014, 04:57:58 PM »
Hi Ralf,

Edouard's Applescripts work fine for what you are asking. Try downloading again. Click on the link in my signature below to see what the output looks like.

Steve
Steve - Avon, Ohio, USA


CWOP: DW8454 - WU: KOHAVON11 - AWEKAS - CoCoRaHS
PWSweather - WeatherCloud - Twitter - Facebook

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6512
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Might be gatekeeper "issuez" (Re: Connection errors and quality TAGS$)
« Reply #6 on: December 13, 2014, 10:30:06 PM »
Dear Ralf and WeatherCat tinkerers,

Thanks for the answer. I downloaded the scripts yesterday but when unzipped they seem to be corrupted. I will have a closer look in 1 week's time when I do have some time to work on this.

I have seen the AppleScripts appear to be corrupted when the real problem is that they don't have a developer's signature.  These AppleScripts haven't been changed since I was running Snow Leopard and Apple it making it increasingly difficult to move any code around if you don't have a developer's signature.  I might have to send you the scripts as just that scripts and then tell you would make them into applications on your computer yourself.

Sorry, things just keep getting more and more complicated . . . .

Cheers, Edouard  [cheers1]

rkarpa01

  • Gentle Breeze
  • **
  • Posts: 14
    • EW6264
    • INIEDERS390
    • karpa-cuxhaven
  • Station Details: Oregon Scientific WMR200 using WeatherCat on dedicated iMac
Re: Connection errors and quality TAGS$
« Reply #7 on: December 21, 2014, 12:47:43 PM »
Hi,

thanks for all the hints so far. I wrote an applescript which writes the data into a ".json" file in the WeatherCat Template folder that I use. Thanks to WeatherCat using all files which it finds in the templates folder to upload, it gets uploaded each time the website build run happens. On the website a jquery function reads the file and places the data into the table I use for that.

The applescript runs once per hour via iCal, that should give some good overview even if it is asynchronously to the website build. Once I setup a dedicated machine to use for WeatherCat, I will run via launchd more frequent.

Haven't found a "tell application WeatherCat" option to execute the website build yet. If that one exists, I could use the script to generate and then build and upload the website.


Ralf.

WCDev

  • WeatherCat Developer
  • Administrator
  • Storm
  • *****
  • Posts: 2916
    • 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: Connection errors and quality TAGS$
« Reply #8 on: December 21, 2014, 01:36:12 PM »
It isn't possible to tell WeatherCat to process the web pages on demand as normally web-page processing is synched to the data update so the web pages have the latest data. I'll add it as a feature request though [tup]

Nice banner btw  :)

nowait

  • Strong Breeze
  • ***
  • Posts: 133
  • Station Details: Davis Vantage Pro 2 Wireless (Heated) on a Snow Leopard Mac Mini
Re: Connection errors and quality TAGS$
« Reply #9 on: December 21, 2014, 03:09:16 PM »
I'd love to see the applescript you wrote.  What status information does it collect for you?

nowait

rkarpa01

  • Gentle Breeze
  • **
  • Posts: 14
    • EW6264
    • INIEDERS390
    • karpa-cuxhaven
  • Station Details: Oregon Scientific WMR200 using WeatherCat on dedicated iMac
Re: Connection errors and quality TAGS$
« Reply #10 on: December 21, 2014, 04:02:55 PM »
It isn't possible to tell WeatherCat to process the web pages on demand as normally web-page processing is synched to the data update so the web pages have the latest data. I'll add it as a feature request though [tup]

That would be a nice add-on as one could control the website from outside using WeatherCat.


Nice banner btw  :)

Thanks.

rkarpa01

  • Gentle Breeze
  • **
  • Posts: 14
    • EW6264
    • INIEDERS390
    • karpa-cuxhaven
  • Station Details: Oregon Scientific WMR200 using WeatherCat on dedicated iMac
Re: Connection errors and quality TAGS$
« Reply #11 on: December 21, 2014, 04:22:16 PM »
I'd love to see the applescript you wrote.  What status information does it collect for you?

nowait

I am not deep into apple script programming (this is my first one) and there will definitely be things to improve. I try to attach the script. It uses 3 general functions to get the desired output to disk:

1. a write-file-to-disk function
2. a quick number rounding function (used for the station quality percentage)
3. a number-to-string function to get away from any float numbers and have ability to format easier using strings

The current data I retrieve with the script are

1. Station Errors (combined ErrorsTO and ErrorsVA)
2. Sensor Errors
3. Valid Data
4. Station Quality in %

Below is the file output which I named station_data.json:

[
  {"name":"Station Errors","value":"36"},
  {"name":"Sensor Errors","value":"56"},
  {"name":"Valid Data","value":"137375"},
  {"name":"Station Quality","value":"99.93%"}
]

Always being used with property-name and property-value pairs. Using the .json file, well, my son is great in website programming and he did it for me :-) I can have a look though if needed.

Screenshot of my final website output as attached.

Let me know if something's not clear.



SeanA

  • Gentle Breeze
  • **
  • Posts: 50
    • EW3381
    • INLANARK2
    • northlanarkshireweather.co.uk
  • Station Details: Davis Instruments Vantage VUE /MAC MINI/WeatherCat
Re: Connection errors and quality TAGS$
« Reply #12 on: December 21, 2014, 10:18:08 PM »
WOW...looks good!... my sons (x2) only talent/skill is trying to empty my wallet [lol]

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6512
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Thanks for sharing! (Re: Connection errors and quality TAGS$)
« Reply #13 on: December 21, 2014, 11:47:17 PM »
Dear rkarpa01 and WeatherCat tinkerers,

I am not deep into apple script programming (this is my first one) and there will definitely be things to improve. I try to attach the script.

Thanks for sharing!  [tup]  We are all richer when we share our extensions to WeatherCat, no matter how big or modest.  :)

Cheers, Edouard  [cheers1]