Weather Software > Meteohub/Meteobridge

Meteobridge/Saratoga Template "Failure - incomplete data". **solved**

(1/1)

drrehak:
I'm trying to configure a Meteobridge Pro to do automatic HTTP upload
to the Saratoga template and am getting an error from the template via Meteobridge:
"Failure - incomplete data posted by Meteobridge" 

Config:
Meteobridge (5.2 build 14656 CARAMBOLA2)
Saratoga Template Version 3.351
Server: Pi 4B (Buster)
PHP: 7.3.31-1~deb10u1

The FTP upload works.

The Saratoga Status Page reports:
  Meteobridge realtime   NOT Current   12:49:50   > 0:00:40
  2022-02-03 20:38
  Meteobridge FTP   Current   0:01:12   2022-02-04 09:26
  Meteobridge weather data   Current   0:01:16   2022-02-04 09:26

The Meteobridge log doesn't show anything suspicious.
The HTTP upload process is running every 10 seconds as configured,
with a typical returned "upload status" report from the Meteobridge:    
  2022-02-04 09:37:04 Error: 2022-02-04 09:37:04 <p>Failure - incomplete data posted by Meteobridge</p> (no more tries)

The URL for the http event in the Meteobridge is
  http://192.168.132.114/weather/st/conds.php?d=[DD]/[MM]/[YYYY],[hh]:[mm]:[ss],[th0temp-act],[th0hum-act.0],[th0dew-act],[wind0avgwind-act],[wind0wind-act],[wind0dir-act],[rain0rate-act],[rain0total-daysum],[thb0seapress-act],[wind0dir-act],[wind0wind-act=bft.0],m/s,C,hPa,mm,--,[thb0seapress-val60:--],[rain0total-monthsum],[rain0total-yearsum],[rain0total-ydaysum],[thb0temp-act],[thb0hum-act],[wind0chill-act],[th0temp-val60:--],[th0temp-dmax],[th0temp-dmaxtime],[th0temp-dmin],[th0temp-dmintime],[wind0avgwind-dmax],[wind0avgwind-dmaxtime],[wind0wind-dmax],[wind0wind-dmaxtime],[thb0seapress-dmax],[thb0seapress-dmaxtime],[thb0seapress-dmin],[thb0seapress-dmintime],[mbsystem-swversion:--],[mbsystem-buildnum:--],[wind0wind-max10],--,--,[uv0index-act:--],--,[sol0rad-act:--],[wind0dir-avg10:--],[rain0total-sum60],--,[mbsystem-daynightflag:--],--,[wind0dir-avg10:--],--,m,--,[mbsystem-daylength:--],--,--,[uv0index-dmax:--]

The MBrealtime-template.txt is (all I did was set the IP and path)
  http://192.168.132.114/weather/st/conds.php?d=[DD]/[MM]/[YYYY],[hh]:[mm]:[ss],[th0temp-act],[th0hum-act.0],[th0dew-act],[wind0avgwind-act],[wind0wind-act],[wind0dir-act],[rain0rate-act],[rain0total-daysum],[thb0seapress-act],[wind0dir-act],[wind0wind-act=bft.0],m/s,C,hPa,mm,--,[thb0seapress-val60:--],[rain0total-monthsum],[rain0total-yearsum],[rain0total-ydaysum],[thb0temp-act],[thb0hum-act],[wind0chill-act],[th0temp-val60:--],[th0temp-dmax],[th0temp-dmaxtime],[th0temp-dmin],[th0temp-dmintime],[wind0avgwind-dmax],[wind0avgwind-dmaxtime],[wind0wind-dmax],[wind0wind-dmaxtime],[thb0seapress-dmax],[thb0seapress-dmaxtime],[thb0seapress-dmin],[thb0seapress-dmintime],[mbsystem-swversion:--],[mbsystem-buildnum:--],[wind0wind-max10],--,--,[uv0index-act:--],--,[sol0rad-act:--],[wind0dir-avg10:--],[rain0total-sum60],--,[mbsystem-daynightflag:--],--,[wind0dir-avg10:--],--,m,--,[mbsystem-daylength:--],--,--,[uv0index-dmax:--]

The Apache access log for the server shows
192.168.132.116 - - [04/Feb/2022:08:33:39 -0500] "GET /weather/st/conds.php?d=04
> /02/2022,08:33:39,[th0temp-act],[th0hum-act.0],[th0dew-act],[wind0avgwind-act],[
> wind0wind-act],[wind0dir-act],[rain0rate-act],[rain0total-daysum],1017.7,[wind0d
> ir-act],[wind0wind-act=bft.0],m/s,C,hPa,mm,--,1017.5,[rain0total-monthsum],[rain
> 0total-yearsum],[rain0total-ydaysum],39.7,12.0,[wind0chill-act],--,[th0temp-dmax
> ],[th0temp-dmaxtime],[th0temp-dmin],[th0temp-dmintime],[wind0avgwind-dmax],[wind
> 0avgwind-dmaxtime],[wind0wind-dmax],[wind0wind-dmaxtime],1018.1,20220204072204,1
> 014.2,20220204013825,5.2,14656,[wind0wind-max10],--,--,--,--,--,--,[rain0total-s
> um60],--,D,--,--,--,m,--,10:16,--,--,-- HTTP/1.1" 200 433 "-" "meteobridge"

If I convert the log entry back to a direct http request and send it to the server
via a web browser, I get the same message from the browser.
"Failure - incomplete data posted by Meteobridge"

If I turn on dodebug in conds.php I get a MBreatlime-args.txt file that's
the same as the server response.

Not sure what is wrong.  Looks like all the requests are happening, but there's
something wrong with the request -- either the template is bad or the data from
the Meteobridge isn't what's expected by conds.php

Suggestions on what to try.
Thanks!!

docbee:
The error message is coming from the server, Meteobridge just shows it.
So you should look at what is uploaded to the server and why it is throwing an error.

Your template definitions are mainly missing the default option to be reported when no data there. I would first fix this.
If no default is given the template definition is reported in case no sensor data available.

wvdkuil:
Your station seems to have no outside temp/hum sensor nor other essential sensors such as wind or rain.

The cond.php script checks the uploaded data and find data items which still are the Meteobridge sensor name such as [th0temp-act]

That should have been the actual outside temperature.

@docbee proposed to add default values, f.i. [th0temp-act,--] . It would solve "Failure - incomplete data posted by Meteobridge"
But sadly you would get another set of problems and errors.
Most scripts really need the basic sensor values to be correct.
Therefor this "incomplete data" check was added in 2020
// Version 1.07 - 09-Apr-2020 - added fail message if input data incomplete

The upload file contains default values for extra optional sensors, such as uv and solar.
All other sensors should provide data before the template scripts can function.

Wim

P.S. this is the code which checks the data
--- Code: ---  if(strpos($_GET['d'],'[') > 0) {
// oops.. some unformatted data..
print "<p>Failure - incomplete data posted by Meteobridge</p>";
return;
}
--- End code ---

drrehak:
Thanks all.
Yes, there is no external sensor data -- been waiting a month for Davis to ship my station hardware.
Was hoping to get everything else working while waiting for it to arrive, and that it would be OK with no readings and just the internal Meteobridge readings.

Will have to wait to get the hardware.

Navigation

[0] Message Index

Go to full version