Page 1 of 1

Meteobridge variables return incorrect values

Posted: Wed Jan 03, 2018 11:44 pm
by DavidEno
Hi
Some of the Meteobridge variables seem to be returning incorrect values. I'm using a Meteobridge Pro to update a MySQL database on a remote server. Both thb0press and thb0seapress return 99.99 all the time, whilst TempInCur is showing about double what it should be and HumInCur about half of what it should be. The data is coming from a new Vantage Pro2 station and the Vantage Pro console shows the expected values - ie not what meteobridge is uploading. The Meteobridge historical data shows the expected pressures, but the internal temperature and humidity show the the same incorrect values as uploaded. The Meteobridge has been running for about 4 hours from new and software is Meteobridge 3.5 (Jan 2 2018, build 11747), FW 1.4.

The database has the problem fields defined as decimal for temperatures and pressures, and integer for humidity. As far as I can tell the other values are being uploaded correctly.

The MySQL I'm using is:

INSERT INTO xxxxxx.xxxx (ID, DateTime, TempOutCur, HumOutCur, PressCur, DewCur, HeatIdxCur, WindChillCur, TempInCur, HumInCur, WindSpeedCur, WindAvgSpeedCur, WindDirCur, WindDirCurEng, WindGust10, WindDirAvg10, WindDirAvg10Eng, RainRateCur, RainDay, RainYest, RainMonth, RainYear,uv0index, sol0rad) VALUES (NULL, '[YYYY]-[MM]-[DD] [hh]:[mm]:[ss]', '[th0temp-act]', '[th0hum-act]', '[thb0press-act]', '[th0dew-act]', '[th0heatindex-act]', '[wind0chill-act]', '[thb0temp-act]', '[thb0hum-act]', '[wind0wind-act=mph]', '[wind0avgwind-act=mph]', '[wind0dir-act]', '[wind0dir-act=endir]', '[wind0wind-max10=mph]', '[wind0dir-avg10]', '[wind0dir-avg10=endir]', '[rain0rate-act]', '[rain0total-daysum]', '[rain0total-ydaysum]', '[rain0total-monthsum]', '[rain0total-yearsum]','[uv0index]','[sol0rad]')

(I show xxxx.xxxx for privacy)

Thanks
David

Re: Meteobridge variables return incorrect values

Posted: Thu Jan 04, 2018 12:26 am
by admin
Please make use of default value definitions, otherwise your insert will crash on certain occasions.
You can easily check if the template values are delivering right values, which I am sure they are.

You can test with

Code: Select all

http://ip-of-your-mbpro/cgi-bin/template.cgi?template=thb0seapress:[thb0seapress-act.1:--]
Have you read this article to understand how to do mysql coupling correctly?
https://www.stevejenkins.com/blog/2015/ ... teobridge/

Re: Meteobridge variables return incorrect values

Posted: Thu Jan 04, 2018 2:01 am
by DavidEno
Thanks for your reply. I am very familiar with MySQL, but did follow the blog entry you mention as a shortcut to set up my Insert statement. The inserts are working perfectly, apart from the problems with the data itself.

I used the CGI template to test thb0seapress and it does indeed give the correct value. This led me to the source of the problem, which was that I used the MySQL table setup in the Steve Jenkins blog, but this does not give the correct field length if you intend to use pressure in mm. I've corrected this and all is working well now.

However for the inside temp and inside hum the CGI returns incorrect values and these same incorrect values are shown in the Meteobridge Live Data tab as per my original submission. I'm not really concerned about inside measurements but they might be important to someone...

Thanks for your help.

David

Re: Meteobridge variables return incorrect values

Posted: Thu Jan 04, 2018 2:52 am
by Mattk
DavidEno wrote: Thu Jan 04, 2018 2:01 am ....However for the inside temp and inside hum the CGI returns incorrect values and these same incorrect values are shown in the Meteobridge Live Data tab as per my original submission...
What is it that makes the inside temp and hum incorrect?

Re: Meteobridge variables return incorrect values

Posted: Thu Jan 04, 2018 4:06 pm
by DavidEno
Please see the attached photo of Davis console and screenshot of Meteobridge live data, taken at the same time. (The Meteobridge is situated just below the Davis console.)

Re: Meteobridge variables return incorrect values

Posted: Thu Jan 04, 2018 6:17 pm
by wvdkuil
Maybe there is an offset at the WeatherStation tab?

Wim

Re: Meteobridge variables return incorrect values

Posted: Thu Jan 04, 2018 7:59 pm
by admin
MB PRO has an internal temp sensor which is affected by heating up of the unnit. Davis indoor temp/hum/pressure data is not transmitted via RF from the sensors but measured inside the Davis console. Therefore, we don't have a chance to read out this data. With the calibration proposed by wvdkull you should be able to get somehow reasonable data, but not totally accurate indeed. But come on, indoor data is not interesting for a weather enthusiast! ;-)