Author Topic: Saratoga wxgraphs.php now displays Highchart graphs with CumulusMX  (Read 1528 times)

0 Members and 1 Guest are viewing this topic.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9288
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Sorry it's taken so long, but now CumulusMX users have a wxgraphs.php page that displays the Highchart graphs like those seen on the MX console on your Saratoga template site from the .json files uploaded by CumulusMX.

The language translation function was added to the graphs (using the stock language-LL.txt entries), but a few more need to be added to your language-LL.txt or language-LL-local.txt file:
Code: [Select]
langlookup|Trend Graphs|Trend Graphs|
langlookup|Wind Chill|Wind Chill|
langlookup|Heat Index|Heat Index|
langlookup|Indoor|Indoor|
langlookup|Daily Temperature|Daily Temperature|
langlookup|Daily Temp|Daily Temp|
langlookup|Wind Direction|Wind Direction|
langlookup|Bearing|Bearing|
langlookup|Avg Bearing|Avg Bearing|
langlookup|/hr|/hr|
langlookup|Theoretical Max|Theoretical Max|
langlookup|Sunshine Hours|Sunshine Hours|
langlookup|Graphs generated by|Graphs generated by|
langlookup|Click on a button to show the corresponding graph below.|Click on a button to show the corresponding graph below.|
I've updated the setup instructions to add a CumulusMX specific page in my Configuration section.
At the same time, I've updated the CU-defs.php file to automatically detect CumulusMX and change the $SITE entry to 'CumulusMX' for you.

Use the update tool page with query Base-*, Cumulus, 13-May-2020

Best regards,
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline Otis

  • (aka Paul)
  • Forecaster
  • *****
  • Posts: 728
    • Lake Huron Weather
Re: Saratoga wxgraphs.php now displays Highchart graphs with CumulusMX
« Reply #1 on: May 13, 2020, 07:21:40 PM »
First off Ken as always thank you for all you do for this forum, we do appreciate it.

Now my question.  I see today that a new error line (actually a Note) is showing up on my status page saying my scripts need updating.  Specifically pointing to the wxgraphs.php (https://lakehuronweather.org/wxStatus.php).

While I do use a (modified) version of this script (https://lakehuronweather.org/wxgraphs.php) it is very different from the one you just updated. 
Is there a way to eliminate the "note" from showing up on my status page?


CW3699

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9288
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Saratoga wxgraphs.php now displays Highchart graphs with CumulusMX
« Reply #2 on: May 13, 2020, 08:14:10 PM »
If you use a page name that is the same as the page name in the distribution, the update checking script assumes it's a distribution page and so checks it v.s. the installed page.  No good way to avoid that for pages named the same as a distribution page.

But.. if you rename your custom graphs script page to something else, and install the distributed one (which you won't use), then the checker will 'go quiet' and all is well.  Just change flyout-menu.xml when you rename your custom wxgraphs.php page to something else.

BTW.. I deliberately put the version check in the wxstatus page as many folks watch that, but seldom do a version check via check-fetch-times.php?show=versions .. they are also prone to email/post about an issue before doing a check to see if their scripts are current, but such is life :)
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline Otis

  • (aka Paul)
  • Forecaster
  • *****
  • Posts: 728
    • Lake Huron Weather
Re: Saratoga wxgraphs.php now displays Highchart graphs with CumulusMX
« Reply #3 on: May 13, 2020, 08:19:31 PM »
Well I kind of feel foolish, didn't think about renaming my custom page  :oops:

Oh and I do like the version check in the status page, I use that page a lot.

Thanks again Ken.

CW3699

Offline Forever

  • Senior Contributor
  • ****
  • Posts: 211
Re: Saratoga wxgraphs.php now displays Highchart graphs with CumulusMX
« Reply #4 on: May 14, 2020, 06:26:55 PM »
Hi Ken,

Don't know if it's just me but when I updated my wxgraphs.php page I noticed the bottom of the page did not look correct. It seems there was a missing </div>. I replaced it and it works now.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9288
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Saratoga wxgraphs.php now displays Highchart graphs with CumulusMX
« Reply #5 on: May 14, 2020, 07:01:07 PM »
Odd, I'd checked the display/validation for several weather software instances with V1.06 of wxgraphs.php.

Can you highlight an image of your wxgraphs.php source where you added the missing </div> ?
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline Forever

  • Senior Contributor
  • ****
  • Posts: 211
Re: Saratoga wxgraphs.php now displays Highchart graphs with CumulusMX
« Reply #6 on: May 14, 2020, 07:09:32 PM »
Never mind, looking again it was something I added. It should be good for everyone else.  #-o

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9288
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Saratoga wxgraphs.php now displays Highchart graphs with CumulusMX
« Reply #7 on: May 14, 2020, 07:57:59 PM »
Whew!  Thanks for checking!
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline ConligWX

  • Forecaster
  • *****
  • Posts: 843
  • #conligwx
    • conligwx.org
Re: Saratoga wxgraphs.php now displays Highchart graphs with CumulusMX
« Reply #8 on: May 15, 2020, 03:04:36 AM »
Ken.

I'm just curious as to why wxgraphs.php is part of the base-templates and not part of the saratoga weather station plugins?

wxgraphs.php is not supported in meteobridge, yet it is a requirement to update the file as I get out of date warnings  in the check-fetch-times.php?show=versions and wxstatus.php urls.

Just curious....
Regards Simon
Davis Vantage Pro2 Plus (6162UK) • Daytime FARS • WeatherLink Live • AirLink • PurpleAir PA-II-SD • CumulusMX •


Offline Otis

  • (aka Paul)
  • Forecaster
  • *****
  • Posts: 728
    • Lake Huron Weather
Re: Saratoga wxgraphs.php now displays Highchart graphs with CumulusMX
« Reply #9 on: May 15, 2020, 06:43:38 AM »
Okay no big deal but a question.
Is there a way to move the version check on the wxstatus page below any custom checks we have?
Just checking.

CW3699

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9288
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Saratoga wxgraphs.php now displays Highchart graphs with CumulusMX
« Reply #10 on: May 15, 2020, 11:34:45 AM »
Ken.

I'm just curious as to why wxgraphs.php is part of the base-templates and not part of the saratoga weather station plugins?

wxgraphs.php is not supported in meteobridge, yet it is a requirement to update the file as I get out of date warnings  in the check-fetch-times.php?show=versions and wxstatus.php urls.

Just curious....
When I developed the template set for V3, I decided to start with a fully-multilingual version (World) that would share the majority of the code with the Canada(en, fr) and USA versions(en) so common scripts and wx...php pages would be the same across the base distributions -- only country/region specific scripts would be included in the respective bases.  Just made it easier for me to maintain fewer disparate scripts.

For wxgraphs.php, it was always intended to support all the plugins that were capable of producing graphs and it's the same script for all the Base distributions.  The only exception was with the Ambientweather.net (AWN-plugin), where it was so different, I put a wxgraphsawn.php page in the AWN-Plugin to distribute it.  On hindsight, I probably should have added that to the wxgraphs.php, but it's structure made it much more complicated to merge in.

You're correct, Meteobridge doesn't produce native graphics nor the .json files (like CumulusMX), so in the flyout-menu.xml, the menu option is automatically turned off (by having the wxonly= attribute missing MH or MB entries).  The version checker considers wxgraphs.php to be a 'core' file, so does check for a current copy.

Hope that helps explain my rationale for using one wxgraphs.php to serve all Base and Plugin types (where possible).

Best regards,
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9288
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Saratoga wxgraphs.php now displays Highchart graphs with CumulusMX
« Reply #11 on: May 15, 2020, 11:43:04 AM »
Okay no big deal but a question.
Is there a way to move the version check on the wxstatus page below any custom checks we have?
Just checking.
Thanks for asking. Sadly, the answer is currently no.  The calling sequence is wxstatus.php -> include-wxstatus.php ->check-fetch-times.php (Versions) which directly prints the output just below the 'standard' checks in include-wxstatus.php and then returns to wxstatus.php for any 'custom' checks that may be there.

As a side note, I intended the version status to be quite visible on wxstatus.php to hopefully prod folks into keeping the scripts up-to-date themselves instead of finding something broken, posting/emailing about it, then discovering it was a missing script update as the cause.  Just trying to help y'all and help reduce the unneeded support requests.  Call me lazy -- after 14 years of doing this, the recurrent "it's broken. Did you check for updates?" interactions get a bit tiring.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline Otis

  • (aka Paul)
  • Forecaster
  • *****
  • Posts: 728
    • Lake Huron Weather
Re: Saratoga wxgraphs.php now displays Highchart graphs with CumulusMX
« Reply #12 on: May 15, 2020, 01:58:19 PM »
Thanks for the reply Ken and no worries at all.  I did try and hack it myself to no avail, made copy first to be sure.
For me it is the first page that loads so I see it all the time, I like it.  I figure I am using the template and trying to provide solid info to folks least I can do is keep things updated  :?

CW3699

Offline zmarfak

  • Contributor
  • ***
  • Posts: 135
    • Matar
Re: Saratoga wxgraphs.php now displays Highchart graphs with CumulusMX
« Reply #13 on: May 16, 2020, 03:10:18 AM »
Well if you like it more fancy, you can always ask Ken to put a border on it (if he feels like it).
It's just a personnel thing, you know "De gustibus..."

as an example see attachment

« Last Edit: May 16, 2020, 03:16:25 AM by zmarfak »
Patrick
Davis Vantage Pro2 with a Meteobridge NANO SD and WL (6.04) on a Intel NUC 
https://www.matar.be

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9288
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Saratoga wxgraphs.php now displays Highchart graphs with CumulusMX
« Reply #14 on: May 16, 2020, 11:36:05 AM »
Ok, heard both suggestions (move display to after custom checks, add a style box to the display).

Now available on the update tool for Base-*, 16-May-2020

You will need to copy any custom checks from your existing wxstatus.php to the new version before you upload.
The include-wxstatus.php can just be replaced.

Thanks for the suggestions!  The styling for the box uses the class="advisoryBox" CSS and works with all template themes.

Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline Otis

  • (aka Paul)
  • Forecaster
  • *****
  • Posts: 728
    • Lake Huron Weather
Re: Saratoga wxgraphs.php now displays Highchart graphs with CumulusMX
« Reply #15 on: May 16, 2020, 12:56:24 PM »
Outstanding Ken  [tup], once again great work and thanks.
Paul

CW3699

Offline zmarfak

  • Contributor
  • ***
  • Posts: 135
    • Matar
Re: Saratoga wxgraphs.php now displays Highchart graphs with CumulusMX
« Reply #16 on: May 16, 2020, 02:43:35 PM »
Ken,
you didn't have to change, but you did

Thank you very much, it is nicer.
Patrick
Davis Vantage Pro2 with a Meteobridge NANO SD and WL (6.04) on a Intel NUC 
https://www.matar.be

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9288
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Saratoga wxgraphs.php now displays Highchart graphs with CumulusMX
« Reply #17 on: May 16, 2020, 03:44:57 PM »
You're welcome!  I'd hesitated to require a change to wxstatus.php as folks likely customized it.. that's why I'd done it for display just in include-wxstatus.php which would generally have no customizations.

But.. you both convinced me that the small pain of copying your customizations to the new wxstatus.php was worth it for the better presentation (at the end of the wxstatus.php page, and highlighted via CSS).
Thanks again for your suggestions!
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline ConligWX

  • Forecaster
  • *****
  • Posts: 843
  • #conligwx
    • conligwx.org
Re: Saratoga wxgraphs.php now displays Highchart graphs with CumulusMX
« Reply #18 on: May 16, 2020, 04:19:35 PM »
Ken one thing on the include-wxstatus.php

there is no entry for MB support as the "if($SITE['WXsoftware'] =="

just thought you'd like to know.
Regards Simon
Davis Vantage Pro2 Plus (6162UK) • Daytime FARS • WeatherLink Live • AirLink • PurpleAir PA-II-SD • CumulusMX •


Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9288
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Saratoga wxgraphs.php now displays Highchart graphs with CumulusMX
« Reply #19 on: May 16, 2020, 05:36:07 PM »
Ken one thing on the include-wxstatus.php

there is no entry for MB support as the "if($SITE['WXsoftware'] =="

just thought you'd like to know.
Dang strait, I'd want to know.  #-o  It was a BIG oops on my part to have removed that.  :oops:
Thanks for letting me know.. I've pushed out V1.11 of include-wxstatus.php to fix that omission.

Thanks for spotting it!   
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline ConligWX

  • Forecaster
  • *****
  • Posts: 843
  • #conligwx
    • conligwx.org
Re: Saratoga wxgraphs.php now displays Highchart graphs with CumulusMX
« Reply #20 on: May 16, 2020, 05:41:03 PM »
Ken I think this was omitted sometime ago as my last few I had replaced "CU" with "MB"  not sure when it was omitted however.

anyway fixed now. [tup]
Regards Simon
Davis Vantage Pro2 Plus (6162UK) • Daytime FARS • WeatherLink Live • AirLink • PurpleAir PA-II-SD • CumulusMX •


Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9288
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Saratoga wxgraphs.php now displays Highchart graphs with CumulusMX
« Reply #21 on: May 16, 2020, 06:06:04 PM »
Looking through my archives, the regression happened in 2018 when WeatherSnoop was added.  Glad it's sorted now.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline zmarfak

  • Contributor
  • ***
  • Posts: 135
    • Matar
Re: Saratoga wxgraphs.php now displays Highchart graphs with CumulusMX
« Reply #22 on: May 17, 2020, 02:11:10 AM »
Installed new versions this morning, all ok

when I clicked on the update link first I got :
https://www.matar.be/%22check-fetch-times.php?show=versions\%22

but I guess that was corrected later because now I have the correct link :
https://www.matar.be/weather/check-fetch-times.php?show=versions

Thanks for the work Ken.
Patrick
Davis Vantage Pro2 with a Meteobridge NANO SD and WL (6.04) on a Intel NUC 
https://www.matar.be

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9288
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Saratoga wxgraphs.php now displays Highchart graphs with CumulusMX
« Reply #23 on: May 17, 2020, 11:18:51 AM »
Yes, I'd noticed that link error too and did a microupdate shortly thereafter to correct it.  Sorry for the inconvenience.  The distribution for 16-May-2020 was corrected yesterday afternoon.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

 

anything