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

0 Members and 1 Guest are viewing this topic.

Offline sheldon

  • Member
  • *
  • Posts: 47
    • 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/

Online Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8499
    • 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

Online johnd

  • Forecaster
  • *****
  • Posts: 2294
    • 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 dedicated Davis EnviroMonitor website
UK Davis Premier Dealer - All Davis stations, accessories and spares
Littleport, Ely, Cambs UK

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 6187
  • 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, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Online Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8499
    • 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

Online Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8499
    • 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

  • Member
  • *
  • Posts: 47
    • 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/

Online wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1113
    • Support site Leuven Template and scripts
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
Vantage VUE with a WLIP used for https://weer.sluispark.be/
Vantage VP2 with a USB logger/Meteobridge for https://www.weerstation-herent.be/

Online johnd

  • Forecaster
  • *****
  • Posts: 2294
    • 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 dedicated Davis EnviroMonitor website
UK Davis Premier Dealer - All Davis stations, accessories and spares
Littleport, Ely, Cambs UK

 

anything