Api max values (changing 5 min db update)
-
mchd17
- Forecaster

- Posts: 196
- Joined: Sat Mar 17, 2018 2:01 am
- Location: Illinois
- Station model: Davis Pro2 Plus
- Software: Meteobridge
Api max values (changing 5 min db update)
MT uses max values from api, for the day, from MB, correct?
Last edited by mchd17 on Mon Jan 21, 2019 2:38 pm, edited 1 time in total.
-
mchd17
- Forecaster

- Posts: 196
- Joined: Sat Mar 17, 2018 2:01 am
- Location: Illinois
- Station model: Davis Pro2 Plus
- Software: Meteobridge
Re: Api max values
I am asking because I am seeing differences in MT from other sites that I upload data to. I can attatch ss's if needed.
-
mchd17
- Forecaster

- Posts: 196
- Joined: Sat Mar 17, 2018 2:01 am
- Location: Illinois
- Station model: Davis Pro2 Plus
- Software: Meteobridge
Re: Api max values
Today
Meteobridge shows max wind of 15.0mph at 2:16am
MT shows wind gust of 13.0mph at 2:20am, (database updates at 5 minutes)
MT shows wind gust of 12.1mph at 2:15am
MT shows max wind gust of the day at 14.1mph at 3:00pm
WeatherLink shows max wind gust of 15.0mph at 2:20am(updates at 5 minutes)
PWSWeather shows max wind gust of 15 mph at 2:22 am (updates at 10 minutes)
WeatherCloud shows max wind gust of 15 mph at 2:22 am (updates at 10 minutes)
So there has to be a reason why MT doesn't use the max values of Meteobridge, ideas?
I have the api updating every 10 seconds
Meteobridge shows max wind of 15.0mph at 2:16am
MT shows wind gust of 13.0mph at 2:20am, (database updates at 5 minutes)
MT shows wind gust of 12.1mph at 2:15am
MT shows max wind gust of the day at 14.1mph at 3:00pm
WeatherLink shows max wind gust of 15.0mph at 2:20am(updates at 5 minutes)
PWSWeather shows max wind gust of 15 mph at 2:22 am (updates at 10 minutes)
WeatherCloud shows max wind gust of 15 mph at 2:22 am (updates at 10 minutes)
So there has to be a reason why MT doesn't use the max values of Meteobridge, ideas?
I have the api updating every 10 seconds
-
mchd17
- Forecaster

- Posts: 196
- Joined: Sat Mar 17, 2018 2:01 am
- Location: Illinois
- Station model: Davis Pro2 Plus
- Software: Meteobridge
Re: Api max values
Does MT cache the api values, even max values, and averages them for the 5 minute database entries? If so, I really won't know what the max wind gust really is
-
mchd17
- Forecaster

- Posts: 196
- Joined: Sat Mar 17, 2018 2:01 am
- Location: Illinois
- Station model: Davis Pro2 Plus
- Software: Meteobridge
Re: Api max values
Good for this morning
MT shows 30.0 mph at 4:20am
Other sites I upload data to showing 30 mph within minutes to 4:20 am.
So that's good.
MT shows 30.0 mph at 4:20am
Other sites I upload data to showing 30 mph within minutes to 4:20 am.
So that's good.
-
mchd17
- Forecaster

- Posts: 196
- Joined: Sat Mar 17, 2018 2:01 am
- Location: Illinois
- Station model: Davis Pro2 Plus
- Software: Meteobridge
Re: Api max values
This morning
MT max wind gust 21.0 mph at 1:40 am
Meteobridge 23.9 mph at 1:36 am
All other sites I upload to show 23.9 at 1:36 am (or close to that time)
MT uses all averages, even for daily max values? Hmmmm
MT max wind gust 21.0 mph at 1:40 am
Meteobridge 23.9 mph at 1:36 am
All other sites I upload to show 23.9 at 1:36 am (or close to that time)
MT uses all averages, even for daily max values? Hmmmm
-
mchd17
- Forecaster

- Posts: 196
- Joined: Sat Mar 17, 2018 2:01 am
- Location: Illinois
- Station model: Davis Pro2 Plus
- Software: Meteobridge
Re: Api max values
Is there an easy way to setup MT to update database at shorter intervals? Say 3 minutes instead of 5 minutes. Maybe that would help me to get more accurate entries. Could setup cron job I guess. Database will be larger.
-
mchd17
- Forecaster

- Posts: 196
- Joined: Sat Mar 17, 2018 2:01 am
- Location: Illinois
- Station model: Davis Pro2 Plus
- Software: Meteobridge
Re: Api max values
Any known issues by changing this code in api.php on line 1147 (change db update from 5 minutes to 3 minutes)
to this code
Code: Select all
############################################################################
// Check db update / update db
############################################################################
$dbInterval = 300;
// check if cache file contain a recordCode: Select all
############################################################################
// Check db update / update db
############################################################################
$dbInterval = 180;
// check if cache file contain a record-
mchd17
- Forecaster

- Posts: 196
- Joined: Sat Mar 17, 2018 2:01 am
- Location: Illinois
- Station model: Davis Pro2 Plus
- Software: Meteobridge
Re: Api max values (changing 5 min db update)
Been running well all day. I have seen no issues, besides a faster growing db. Max wind gusts have been better recorded.
This forum is sure quiet
This forum is sure quiet
-
mchd17
- Forecaster

- Posts: 196
- Joined: Sat Mar 17, 2018 2:01 am
- Location: Illinois
- Station model: Davis Pro2 Plus
- Software: Meteobridge
Re: Api max values (changing 5 min db update)
Meteobridge showing max wind of 33.1 mph at 3:20am
MT showing 30 mph at 3:21am
MT max gust for the day 32 at 2:48am
MT showing 30 mph at 3:21am
MT max gust for the day 32 at 2:48am
- Jachym
- Site Admin

- Posts: 1686
- Joined: Fri Aug 18, 2017 10:12 pm
- Location: Brno, Czech Republic
- Station model: WH1080
- Software: Meteobridge
- Contact:
Re: Api max values (changing 5 min db update)
Hi,
MT uses max value of gust, so if for example you send data to MT every minute, it would use the max value of G from the 5 minutes as wind gust and avg value of W for wind speed
MT uses max value of gust, so if for example you send data to MT every minute, it would use the max value of G from the 5 minutes as wind gust and avg value of W for wind speed
-
mchd17
- Forecaster

- Posts: 196
- Joined: Sat Mar 17, 2018 2:01 am
- Location: Illinois
- Station model: Davis Pro2 Plus
- Software: Meteobridge
Re: Api max values (changing 5 min db update)
Hi Jachym,
Some days MT is off max gust, lower than meteobridge. It isn't the same as what meteobridge shows as max. Today, right now is dead on. This morning it was off. Any way to diagnose this problem?
Some days MT is off max gust, lower than meteobridge. It isn't the same as what meteobridge shows as max. Today, right now is dead on. This morning it was off. Any way to diagnose this problem?
-
mchd17
- Forecaster

- Posts: 196
- Joined: Sat Mar 17, 2018 2:01 am
- Location: Illinois
- Station model: Davis Pro2 Plus
- Software: Meteobridge
Re: Api max values (changing 5 min db update)
Today is accurate, 30 mph max wind. MT is showing same as meteobridge.
Would love to know why some days are off.....ideas?
Would love to know why some days are off.....ideas?
-
mchd17
- Forecaster

- Posts: 196
- Joined: Sat Mar 17, 2018 2:01 am
- Location: Illinois
- Station model: Davis Pro2 Plus
- Software: Meteobridge
Re: Api max values (changing 5 min db update)
Here's an example from Jan 18, a few days ago
Meteobridge ss which shows max wind at 2:16 am, notice the value

MT ss, notice the time and value

Here's the MT graph for 2:20 am, which Meteobridge shows the max wind of that day at 15 mph at 2:16 am. Remember, MT uses max values of G for the 5 minutes between 2:15 am and 2:20 am..............

For the above date, MT records max wind, that's even lower than meteobridge max, almost 13 hours after true max wind?
Meteobridge ss which shows max wind at 2:16 am, notice the value

MT ss, notice the time and value

Here's the MT graph for 2:20 am, which Meteobridge shows the max wind of that day at 15 mph at 2:16 am. Remember, MT uses max values of G for the 5 minutes between 2:15 am and 2:20 am..............

For the above date, MT records max wind, that's even lower than meteobridge max, almost 13 hours after true max wind?
- Jachym
- Site Admin

- Posts: 1686
- Joined: Fri Aug 18, 2017 10:12 pm
- Location: Brno, Czech Republic
- Station model: WH1080
- Software: Meteobridge
- Contact:
Re: Api max values (changing 5 min db update)
Hi,
MT simply uses "what it gets". It cannot make up numbers so if it shows "some numbers" it must have been sent to it by Meteobridge. Also, given you said it "sometimes" works, it means the script is fine. Scripts either work or they dont, If I simplify the update script it takes values sent to it, verifies them and sends them to the database. It does this over and over again so if you say it sometimes works fine, it did the same thing when it didnt work as expected. I therefore suspect the problem must be in what MB sends to MT. You can check this directly if you open
..templateRoot/meteotemplateLive.txt - this is raw data sent by whatever SW you use to the Meteotemplate api, W = wind, G = gust, both should be in km/h, the conversion happens later on the frontend, the API uses fixed units
MT simply uses "what it gets". It cannot make up numbers so if it shows "some numbers" it must have been sent to it by Meteobridge. Also, given you said it "sometimes" works, it means the script is fine. Scripts either work or they dont, If I simplify the update script it takes values sent to it, verifies them and sends them to the database. It does this over and over again so if you say it sometimes works fine, it did the same thing when it didnt work as expected. I therefore suspect the problem must be in what MB sends to MT. You can check this directly if you open
..templateRoot/meteotemplateLive.txt - this is raw data sent by whatever SW you use to the Meteotemplate api, W = wind, G = gust, both should be in km/h, the conversion happens later on the frontend, the API uses fixed units
-
mchd17
- Forecaster

- Posts: 196
- Joined: Sat Mar 17, 2018 2:01 am
- Location: Illinois
- Station model: Davis Pro2 Plus
- Software: Meteobridge
Re: Api max values (changing 5 min db update)
Changed the api back to 5 minute updates due to the fact that i was still getting false max values at 3 minute database updates. Bothers me MT is not showing correct max values, grrrrrrrrrrr
I will try and keep an eye on ..templateRoot/meteotemplateLive.txt but I have to be home.
I will try and keep an eye on ..templateRoot/meteotemplateLive.txt but I have to be home.
-
mchd17
- Forecaster

- Posts: 196
- Joined: Sat Mar 17, 2018 2:01 am
- Location: Illinois
- Station model: Davis Pro2 Plus
- Software: Meteobridge
Re: Api max values (changing 5 min db update)
Trying 1 minute uploads from MB to MT, and current block interval at 65 seconds. Curious to see if G is then shown correctly. Will report back.
- MonyMony
- Forecaster

- Posts: 192
- Joined: Sun Aug 20, 2017 12:54 pm
- Location: Elkton, Maryland, US
- Station model: Davis Pro 2
- Software: WeatherCat/Meteobridge
- Contact:
Re: Api max values (changing 5 min db update)
Curious on this too although in my case I am fighting an upload issue with my provider where not every update from Meteobridge gets through to Meteotemplate (I think they are blocking my frequent connections but won't tell me). As Jachym stated, MT just uses 'what it gets'. I can understand how this might drive you crazy as it is for me too, but at least in my case I have an explination as to why this is happening.
-
mchd17
- Forecaster

- Posts: 196
- Joined: Sat Mar 17, 2018 2:01 am
- Location: Illinois
- Station model: Davis Pro2 Plus
- Software: Meteobridge
Re: Api max values (changing 5 min db update)
G is recording right this morning. Give it a few days and there will be a lower G value in MT than MB. One good thing I have noticed, now on the CC block, is that G is higher than wind more consistently. Still using MB upload at 1 minute, changed CC block to 30 seconds. Within the CC block, I noticed there might be a longer gap than 1 minute update. Might that be the problem......I will keep watching and report back.
-
mchd17
- Forecaster

- Posts: 196
- Joined: Sat Mar 17, 2018 2:01 am
- Location: Illinois
- Station model: Davis Pro2 Plus
- Software: Meteobridge
Re: Api max values (changing 5 min db update)
So far so good with Meteobridge API updating once a minute. G has been correct every day. I said this in an earlier post, but usually now G is higher than Wind in the CC block. When I was updating at shorter intervals, G was lower than Wind most of the time.. I will report back if I see a difference in MT G to MB wind max.
-
mchd17
- Forecaster

- Posts: 196
- Joined: Sat Mar 17, 2018 2:01 am
- Location: Illinois
- Station model: Davis Pro2 Plus
- Software: Meteobridge
Re: Api max values (changing 5 min db update)
That's sad.......spoke too soon
MB max G 28 mph at 1217
MT at 1220 db update is 25 mph
Am I the only one using MB that sees these types of G errors?
MB max G 28 mph at 1217
MT at 1220 db update is 25 mph
Am I the only one using MB that sees these types of G errors?
-
mchd17
- Forecaster

- Posts: 196
- Joined: Sat Mar 17, 2018 2:01 am
- Location: Illinois
- Station model: Davis Pro2 Plus
- Software: Meteobridge
Re: Api max values (changing 5 min db update)
Higher G value happened later.....which recorded correctly....lol
- Jachym
- Site Admin

- Posts: 1686
- Joined: Fri Aug 18, 2017 10:12 pm
- Location: Brno, Czech Republic
- Station model: WH1080
- Software: Meteobridge
- Contact:
Re: Api max values (changing 5 min db update)
Hi,
update interval is irrelevant. The info I gave to Boris and the response I got back was that the value for G sent to MT should be the max since the last update. I.e. it should be irrelevant if you chose 1min or 5min updates. MB should in that case send 1min or 5min maximum. MT aggregates this and saves to db every min, for G it uses aggregating via maximum.
Eg:
5min updates from MB -> MB should send 5min max and MT saves it
1min updates from MB -> MB should send 1min max and MT caches it 5 times then saves max from the cache every 5mins
update interval is irrelevant. The info I gave to Boris and the response I got back was that the value for G sent to MT should be the max since the last update. I.e. it should be irrelevant if you chose 1min or 5min updates. MB should in that case send 1min or 5min maximum. MT aggregates this and saves to db every min, for G it uses aggregating via maximum.
Eg:
5min updates from MB -> MB should send 5min max and MT saves it
1min updates from MB -> MB should send 1min max and MT caches it 5 times then saves max from the cache every 5mins
-
stephane01
- Newbie

- Posts: 2
- Joined: Thu Aug 24, 2017 4:02 pm
Re: Api max values (changing 5 min db update)
Same problem here, for example, for today max gust on MB 46.8 km/h at 7:57, on MT 43,7 km/h at 8:00.
All other network I upload show the correct gust (weather34, WD software, WU,...)
All other network I upload show the correct gust (weather34, WD software, WU,...)
-
mchd17
- Forecaster

- Posts: 196
- Joined: Sat Mar 17, 2018 2:01 am
- Location: Illinois
- Station model: Davis Pro2 Plus
- Software: Meteobridge
Re: Api max values (changing 5 min db update)
Jachym-thanks for the response. I understand how it works. It just doesnt
stephane01-finally another user with same issue. Maybe most people don't see G values of 40, 50, 60 mph due to anemometer height and restrictions close by and don't realize inaccurate data.
I was thinking.......just maybe........its the pause MB does to allow my WeatherLink to contact my Davis logger. stephane01, I see you are running WD. Are you running WD through MB passthrough? Look at your MB system messages, does MB pause briefly for WD to make contact? I wonder if MB sends real time max G values to MT and not recorded max G values for say 5 minute duration.....hmmmmmm......and the pause MB does for WL I don't receive that max G value.
stephane01-finally another user with same issue. Maybe most people don't see G values of 40, 50, 60 mph due to anemometer height and restrictions close by and don't realize inaccurate data.
I was thinking.......just maybe........its the pause MB does to allow my WeatherLink to contact my Davis logger. stephane01, I see you are running WD. Are you running WD through MB passthrough? Look at your MB system messages, does MB pause briefly for WD to make contact? I wonder if MB sends real time max G values to MT and not recorded max G values for say 5 minute duration.....hmmmmmm......and the pause MB does for WL I don't receive that max G value.