Author Topic: xml problem in Weatherlink.com  (Read 1984 times)

0 Members and 1 Guest are viewing this topic.

Offline sheldon

  • Senior Member
  • **
  • Posts: 93
    • Roma EUR Meteo
xml problem in Weatherlink.com
« on: April 12, 2017, 11:02:03 AM »
Hi guys,
My Davis weather station sends data to weatherlink.com by Weatherlink IP. I put them on my personal website through a php code which includes the following xml file, generated by Weatherlink.com:
http://www.weatherlink.com/xml.php?user=xxxx&pass=xxxx
But now it seems that this file is not working anymore:
if I try to open that file, I get this message:
 [ You are not allowed to view attachments ]
And my site is consequently reporting error messages
 [ You are not allowed to view attachments ]

Is anyone having the same issue? Can it be a temporary problem of Weatherlink.com?
Thank you,
Andrea
My weather Station in Rome:
http://www.romaeurmeteo.it/

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: xml problem in Weatherlink.com
« Reply #1 on: April 12, 2017, 11:11:26 AM »
They must have changed it because now all scripts (including the one I use in my template) and even some apps are broken.

I recommend you email them about it because this is affecting anyone using those XML feeds

Offline johnd

  • Forecaster
  • *****
  • Posts: 4827
    • www.weatherstations.co.uk
Re: xml problem in Weatherlink.com
« Reply #2 on: April 12, 2017, 11:35:05 AM »
Davis are aware of the issue. As I've commented elsewhere, I suspect that there are some ongoing updates and maintenance that have triggered the issue. If I hear anything more definitive, I'll add a comment here.
Prodata Weather Systems
Prodata's FAQ/support site for Davis stations
Includes many details on 6313 Weatherlink console.
UK Davis Premier Dealer - All Davis stations, accessories and spares
Cambridge UK

Sorry, but I don't usually have time to help with individual issues by email unless you are a Prodata customer. Please post your issue in the relevant forum section here & I will comment there if I have anything useful to add.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: xml problem in Weatherlink.com
« Reply #3 on: April 12, 2017, 11:36:50 AM »
They seem to have a blank line before the <?xml ... line.  that causes the issue, I think.

A quick workaround might be to do a trim() on the raw XML before parsing.
So instead of using simplexml_load_file("http://weatherlink.com/...")  maybe using:
simplexml_load_string(trim(file_get_contents("http://weatherlink.com/...")))
will get around the problem ?
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 Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: xml problem in Weatherlink.com
« Reply #4 on: April 12, 2017, 11:44:07 AM »
Probably, but Im hoping they will fix this, many users dont watch this and if I release an update they wont notice for several days and this obviously means there is no data going to the db. The other issue is that I obviously cannot test this myself having no Davis station..

But what you suggested Ken is exactly what I would do, not load the file, but load it as string and trim it

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: xml problem in Weatherlink.com
« Reply #5 on: April 12, 2017, 01:06:41 PM »
Obviously they must have been doing some changes to the scripts that generate this and it is disappointing to see they didnt do a single test before releasing it, otherwise they would immediately notice these feeds are not properly formatted and will cause major issues to all apps/pages that use them (and as far as I understand it, thats what they are for - to be used by others). Sort of "WU-approach"...

Offline sheldon

  • Senior Member
  • **
  • Posts: 93
    • Roma EUR Meteo
Re: xml problem in Weatherlink.com
« Reply #6 on: April 12, 2017, 01:21:17 PM »
They seem to have a blank line before the <?xml ... line.  that causes the issue, I think.

A quick workaround might be to do a trim() on the raw XML before parsing.
So instead of using simplexml_load_file("http://weatherlink.com/...")  maybe using:
simplexml_load_string(trim(file_get_contents("http://weatherlink.com/...")))
will get around the problem ?

This solved the issue! Thank you!
Meanwhile I wrote an e-mail to support@davisnet.com, but I didn't get any answer yet.
My weather Station in Rome:
http://www.romaeurmeteo.it/

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: xml problem in Weatherlink.com
« Reply #7 on: April 12, 2017, 01:25:01 PM »
They seem to have a blank line before the <?xml ... line.  that causes the issue, I think.

A quick workaround might be to do a trim() on the raw XML before parsing.
So instead of using simplexml_load_file("http://weatherlink.com/...")  maybe using:
simplexml_load_string(trim(file_get_contents("http://weatherlink.com/...")))
will get around the problem ?

This solved the issue! Thank you!
Meanwhile I wrote an e-mail to support@davisnet.com, but I didn't get any answer yet.
Other topics about this same issue:
http://www.wxforum.net/index.php?topic=31913.msg320703#msg320703
http://www.wxforum.net/index.php?topic=31914.msg320719#msg320719
Wim

Offline johnd

  • Forecaster
  • *****
  • Posts: 4827
    • www.weatherstations.co.uk
Re: xml problem in Weatherlink.com
« Reply #8 on: April 12, 2017, 03:48:21 PM »
Should be fixed now at wl.com.
Prodata Weather Systems
Prodata's FAQ/support site for Davis stations
Includes many details on 6313 Weatherlink console.
UK Davis Premier Dealer - All Davis stations, accessories and spares
Cambridge UK

Sorry, but I don't usually have time to help with individual issues by email unless you are a Prodata customer. Please post your issue in the relevant forum section here & I will comment there if I have anything useful to add.

 

anything