Author Topic: NANO SD and VP2 HTTP error  (Read 237 times)

0 Members and 1 Guest are viewing this topic.

Offline lobsterman

  • Contributor
  • ***
  • Posts: 124
    • Cape Small Harbor Weather
NANO SD and VP2 HTTP error
« on: September 08, 2019, 10:49:40 PM »
Running only one HTTP service, to upload to a Saratoga Templates site. All appears to work properly but the Live Data tab display this odd message:

Quote
HTTP Upload:   2019-09-08 22:46:31 Error: 2019-09-08 22:46:31 <p>Success.</p> (1 more tries, next in 30 secs)

Is this usual?

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 7418
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: NANO SD and VP2 HTTP error
« Reply #1 on: September 08, 2019, 10:53:20 PM »
If this HTTP upload is for the conds.php with the template, try changing (in Meteobridge) the Success message expected to
Code: [Select]
<p>Success.</p> instead of just
Code: [Select]
Success.
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

Offline lobsterman

  • Contributor
  • ***
  • Posts: 124
    • Cape Small Harbor Weather
Re: NANO SD and VP2 HTTP error
« Reply #2 on: September 09, 2019, 01:11:32 AM »
If this HTTP upload is for the conds.php with the template, try changing (in Meteobridge) the Success message expected to
Code: [Select]
<p>Success.</p> instead of just
Code: [Select]
Success.
That fixed it, though I don't understand why!
:-)

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 7418
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: NANO SD and VP2 HTTP error
« Reply #3 on: September 09, 2019, 10:47:14 AM »
Perhaps the NANO doesn't remove HTML tags (<p> and </p>) from the returned status string before comparing.  The conds.php script hasn't changed, and the old, simple 'Success.' compare works fine on non-NANO Meteobridge, so I think it was a NANO Meteobridge change to NOT do a strip_tags() function on the result, then compare the string.
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

Offline lobsterman

  • Contributor
  • ***
  • Posts: 124
    • Cape Small Harbor Weather
Re: NANO SD and VP2 HTTP error
« Reply #4 on: September 09, 2019, 10:02:53 PM »
Perhaps the NANO doesn't remove HTML tags (<p> and </p>) from the returned status string before comparing.  The conds.php script hasn't changed, and the old, simple 'Success.' compare works fine on non-NANO Meteobridge, so I think it was a NANO Meteobridge change to NOT do a strip_tags() function on the result, then compare the string.
I had wonderd if you could add a qualifier to the "Success" report; for example: "Success uploading to conds.php" but it doesn't seem to be possible.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 7418
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: NANO SD and VP2 HTTP error
« Reply #5 on: September 10, 2019, 12:50:34 PM »
It's easy enough to change the 'success' return string from conds.php .. however, it wasn't meant to be viewed by humans -- it was meant to be read by Meteobridge as a signal that the HTTP request had completed normally.  The word 'Success.' was used as it's simple and short.  The return is embedded in HTML, so the <p>Success.</p> is the actual return string.   Prior versions of Meteobridge had no issue just looking for 'Success.' in the return .. the NANO version seems to want that to be the entire return, so was confused by <p>Success.</p> as the value.  Now that you've switched to looking for '<p>Success.</p>' as the value, Meteobridge NANO is again happy and gives a nice green check mark indicating all completed normally on the Live Data status.

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

Offline lobsterman

  • Contributor
  • ***
  • Posts: 124
    • Cape Small Harbor Weather
Re: NANO SD and VP2 HTTP error
« Reply #6 on: September 10, 2019, 02:03:59 PM »
It's easy enough to change the 'success' return string from conds.php .. however, it wasn't meant to be viewed by humans -- it was meant to be read by Meteobridge as a signal that the HTTP request had completed normally.  The word 'Success.' was used as it's simple and short.  The return is embedded in HTML, so the <p>Success.</p> is the actual return string.   Prior versions of Meteobridge had no issue just looking for 'Success.' in the return .. the NANO version seems to want that to be the entire return, so was confused by <p>Success.</p> as the value.  Now that you've switched to looking for '<p>Success.</p>' as the value, Meteobridge NANO is again happy and gives a nice green check mark indicating all completed normally on the Live Data status.

Thanks Ken, much appreciated and good to know the actual details.