Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.5 (build 3282) - 23 February 2024

Cumulus MX V4 beta test release 4.0.0 (build 4017) - 17 March 2024

Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

Regional network mesonet-map.php updated V3.07

Discussion of Ken True's web site templates

Moderator: saratogaWX

Post Reply
User avatar
saratogaWX
Posts: 1169
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Regional network mesonet-map.php updated V3.07

Post by saratogaWX »

Recent changes in the Google Maps API for JavaScript caused an issue with the maps -- clicking on a cluster would cause all clusters to vanish, and the contained icons not displayed.

Version 3.07 fixes that issue (mainly in an updated mesonet-map.js file). Also, the mesonet-map.php and wxmesonetmap.php pages were changed to use https:// to load the Google Map script from the google site.

The MESO-images file has two new images (--.gif and ---sm.gif) to handle stations that have no wind direction in the reports.

The attached .zip has all the updates needed, or you can download the full package from here

Whew.. took me about 12 hrs of debugging the markerclusterer script to find the ONE line that need to be inserted to fix the issue.

Best regards,
Ken
You do not have the required permissions to view the files attached to this post.
User avatar
ConligWX
Posts: 1565
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis vPro2+ w/DFARS + AirLink
Operating System: Ubuntu 22.04 LTS
Location: Bangor, NI
Contact:

Re: Regional network mesonet-map.php updated V3.07

Post by ConligWX »

Hi Ken, Just updated with the file you uploaded, but lost the stations on my map. none are showing up. did something change?

https://www.conligwx.org/wxmesonetmap.php

also looks like my site has gone from the Current Conditions.

I'll try a full upload.
Regards Simon

https://www.conligwx.org - @conligwx
Davis Vantage Pro2 Plus with Daytime FARS • WeatherLink Live • Davis AirLink • PurpleAir •

Image
User avatar
saratogaWX
Posts: 1169
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: Regional network mesonet-map.php updated V3.07

Post by saratogaWX »

Your mesonet-map-json.php is returning the JSON with the markers and a PHP error message embedded
<br />
<b>Warning</b>: A non-numeric value encountered in <b>/share/CACHEDEV1_DATA/htdocs/weather/mesonet-map-common.php</b> on line <b>606</b><br />
and that is screwing up the JSON decode.

Line 606 in mesonet-map-common.php is

Code: Select all

$GUST = (float)($GUST * 0.44704); // mph -> m/s
so the $GUST value from one station is likely incorrect from the UKWN.

Try changing mesonet-map-common.php

Code: Select all

  if ($GUST <> '-') {
	if (!preg_match('|m/s|',$uomWind)) { // convert wind to meters-per-second
to

Code: Select all

  if ($GUST <> '-' and is_numeric($GUST)) {
	if (!preg_match('|m/s|',$uomWind)) { // convert wind to meters-per-second
to filter out those invalid gust values.. I found 4 stations in the UKWN with that issue.
User avatar
ConligWX
Posts: 1565
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis vPro2+ w/DFARS + AirLink
Operating System: Ubuntu 22.04 LTS
Location: Bangor, NI
Contact:

Re: Regional network mesonet-map.php updated V3.07

Post by ConligWX »

Thanks I have done that but still no stations listed or my Site in the Current Conditions.

Line 757 error.

I changed 753 to:

Code: Select all

  if ($GUST <> '-' and is_numeric($GUST)) {
working now....

is this due to PHP 7.1.3 perhaps?

Also I did have redirect from http to https

but looks like mesonet does not like that. I had asked UKWN admin to see if https would work, but looks like he could not do it.
Regards Simon

https://www.conligwx.org - @conligwx
Davis Vantage Pro2 Plus with Daytime FARS • WeatherLink Live • Davis AirLink • PurpleAir •

Image
User avatar
dazza1223
Posts: 860
Joined: Sun 25 Jan 2015 8:41 pm
Weather Station: Davis Vantage Pro 2 plus
Operating System: Raspberry pi 4 (4gb)
Location: Worthing
Contact:

Re: Regional network mesonet-map.php updated V3.07

Post by dazza1223 »

hi just set up this but i cant see in on the map am i missing something here http://www.davisworthing.co.uk/maps/mesonet-map.php
Have fun and keep learning

dazza :D

https://www.davisworthing.co.uk

Image
User avatar
saratogaWX
Posts: 1169
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: Regional network mesonet-map.php updated V3.07

Post by saratogaWX »

Seems to be working fine on your site now...
User avatar
ConligWX
Posts: 1565
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis vPro2+ w/DFARS + AirLink
Operating System: Ubuntu 22.04 LTS
Location: Bangor, NI
Contact:

Re: Regional network mesonet-map.php updated V3.07

Post by ConligWX »

Its working only because of the changes, but I had to re-enable http for the UKWN to get my realtime.txt can WX networks not support https?
Regards Simon

https://www.conligwx.org - @conligwx
Davis Vantage Pro2 Plus with Daytime FARS • WeatherLink Live • Davis AirLink • PurpleAir •

Image
User avatar
saratogaWX
Posts: 1169
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: Regional network mesonet-map.php updated V3.07

Post by saratogaWX »

Toxic17 wrote:Its working only because of the changes, but I had to re-enable http for the UKWN to get my realtime.txt can WX networks not support https?
The regional networks do support https:// access to the conditions data file, but does not support http://->https:// redirects. Just have Martin at ukwn.net change your station to use https:// to pull the data from your site.
User avatar
dazza1223
Posts: 860
Joined: Sun 25 Jan 2015 8:41 pm
Weather Station: Davis Vantage Pro 2 plus
Operating System: Raspberry pi 4 (4gb)
Location: Worthing
Contact:

Re: Regional network mesonet-map.php updated V3.07

Post by dazza1223 »

ok how do i change the station to use https
Have fun and keep learning

dazza :D

https://www.davisworthing.co.uk

Image
User avatar
saratogaWX
Posts: 1169
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: Regional network mesonet-map.php updated V3.07

Post by saratogaWX »

dazza1223 wrote:ok how do i change the station to use https
If you mean 'change the UKWN to use HTTPS to pull my conditions', then use the contact form on the www.ukwn.net site to let Martin know the particulars and he can change it. It is NOT something you can change yourself.

If you mean 'how can I get my website to use HTTPS', then that's something to work with your website hoster. The mesonet-map scripts work well with either http: or https: hosting.

If it's something else you mean, then please elucidate :)
User avatar
ConligWX
Posts: 1565
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis vPro2+ w/DFARS + AirLink
Operating System: Ubuntu 22.04 LTS
Location: Bangor, NI
Contact:

Re: Regional network mesonet-map.php updated V3.07

Post by ConligWX »

saratogaWX wrote:
dazza1223 wrote:ok how do i change the station to use https
If you mean 'change the UKWN to use HTTPS to pull my conditions', then use the contact form on the http://www.ukwn.net site to let Martin know the particulars and he can change it. It is NOT something you can change yourself.
I have been in touch with Martin and he has managed to update the realtime.txt to my https url,

however he is unable to set my website (when you click on the popup over a site - mine being Conlig, Co. Down) to an https url as it removes the colon in the URL.

it ends up like so: http://https//www.conligwx.org/ then resolves to : https//www.conligwx.org/ which is not a correct formatted web address.
Regards Simon

https://www.conligwx.org - @conligwx
Davis Vantage Pro2 Plus with Daytime FARS • WeatherLink Live • Davis AirLink • PurpleAir •

Image
User avatar
saratogaWX
Posts: 1169
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: Regional network mesonet-map.php updated V3.07

Post by saratogaWX »

Ah... I'll contact Martin.. he needs an updated mesonet collector script (V3.00) to better handle http/https.

Best regards,
Ken
User avatar
ConligWX
Posts: 1565
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis vPro2+ w/DFARS + AirLink
Operating System: Ubuntu 22.04 LTS
Location: Bangor, NI
Contact:

Re: Regional network mesonet-map.php updated V3.07

Post by ConligWX »

saratogaWX wrote:Ah... I'll contact Martin.. he needs an updated mesonet collector script (V3.00) to better handle http/https.

Best regards,
Ken
Thanks Ken, all now working correctly. :clap:
Regards Simon

https://www.conligwx.org - @conligwx
Davis Vantage Pro2 Plus with Daytime FARS • WeatherLink Live • Davis AirLink • PurpleAir •

Image
Post Reply