Api max values (changing 5 min db update)

mchd17
Forecaster
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)

Post by mchd17 » Sun Dec 30, 2018 1:59 am

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.
Image

mchd17
Forecaster
Forecaster
Posts: 196
Joined: Sat Mar 17, 2018 2:01 am
Location: Illinois
Station model: Davis Pro2 Plus
Software: Meteobridge

Re: Api max values

Post by mchd17 » Fri Jan 18, 2019 11:08 pm

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.
Image

mchd17
Forecaster
Forecaster
Posts: 196
Joined: Sat Mar 17, 2018 2:01 am
Location: Illinois
Station model: Davis Pro2 Plus
Software: Meteobridge

Re: Api max values

Post by mchd17 » Sat Jan 19, 2019 12:01 am

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
Image

mchd17
Forecaster
Forecaster
Posts: 196
Joined: Sat Mar 17, 2018 2:01 am
Location: Illinois
Station model: Davis Pro2 Plus
Software: Meteobridge

Re: Api max values

Post by mchd17 » Sat Jan 19, 2019 12:30 am

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
Image

mchd17
Forecaster
Forecaster
Posts: 196
Joined: Sat Mar 17, 2018 2:01 am
Location: Illinois
Station model: Davis Pro2 Plus
Software: Meteobridge

Re: Api max values

Post by mchd17 » Sat Jan 19, 2019 10:31 am

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.
Image

mchd17
Forecaster
Forecaster
Posts: 196
Joined: Sat Mar 17, 2018 2:01 am
Location: Illinois
Station model: Davis Pro2 Plus
Software: Meteobridge

Re: Api max values

Post by mchd17 » Sun Jan 20, 2019 10:26 am

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
Image

mchd17
Forecaster
Forecaster
Posts: 196
Joined: Sat Mar 17, 2018 2:01 am
Location: Illinois
Station model: Davis Pro2 Plus
Software: Meteobridge

Re: Api max values

Post by mchd17 » Mon Jan 21, 2019 12:55 pm

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.
Image

mchd17
Forecaster
Forecaster
Posts: 196
Joined: Sat Mar 17, 2018 2:01 am
Location: Illinois
Station model: Davis Pro2 Plus
Software: Meteobridge

Re: Api max values

Post by mchd17 » Mon Jan 21, 2019 2:37 pm

Any known issues by changing this code in api.php on line 1147 (change db update from 5 minutes to 3 minutes)

Code: Select all

    ############################################################################
    // Check db update / update db
    ############################################################################

    $dbInterval = 300;
    
    // check if cache file contain a record
to this code

Code: Select all

    ############################################################################
    // Check db update / update db
    ############################################################################

    $dbInterval = 180;
    
    // check if cache file contain a record
Image

mchd17
Forecaster
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)

Post by mchd17 » Mon Jan 21, 2019 11:48 pm

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
Image

mchd17
Forecaster
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)

Post by mchd17 » Tue Jan 22, 2019 9:43 am

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
Image

User avatar
Jachym
Site Admin
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)

Post by Jachym » Tue Jan 22, 2019 7:34 pm

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

mchd17
Forecaster
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)

Post by mchd17 » Tue Jan 22, 2019 11:27 pm

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?
Image

mchd17
Forecaster
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)

Post by mchd17 » Thu Jan 24, 2019 2:10 am

Today is accurate, 30 mph max wind. MT is showing same as meteobridge.

Would love to know why some days are off.....ideas?
Image

mchd17
Forecaster
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)

Post by mchd17 » Thu Jan 24, 2019 2:31 am

Here's an example from Jan 18, a few days ago

Meteobridge ss which shows max wind at 2:16 am, notice the value
Image

MT ss, notice the time and value
Image

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..............
Image

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

User avatar
Jachym
Site Admin
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)

Post by Jachym » Sat Jan 26, 2019 7:35 am

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

mchd17
Forecaster
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)

Post by mchd17 » Mon Jan 28, 2019 11:38 pm

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.
Image

mchd17
Forecaster
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)

Post by mchd17 » Wed Jan 30, 2019 7:48 pm

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.
Image

User avatar
MonyMony
Forecaster
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)

Post by MonyMony » Wed Jan 30, 2019 8:46 pm

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.
Image

mchd17
Forecaster
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)

Post by mchd17 » Thu Jan 31, 2019 11:47 am

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.
Image

mchd17
Forecaster
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)

Post by mchd17 » Tue Feb 05, 2019 10:56 pm

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.
Image

mchd17
Forecaster
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)

Post by mchd17 » Thu Feb 07, 2019 6:29 pm

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?
Image

mchd17
Forecaster
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)

Post by mchd17 » Thu Feb 07, 2019 10:52 pm

Higher G value happened later.....which recorded correctly....lol
Image

User avatar
Jachym
Site Admin
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)

Post by Jachym » Sat Feb 09, 2019 7:56 am

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

stephane01
Newbie
Newbie
Posts: 2
Joined: Thu Aug 24, 2017 4:02 pm

Re: Api max values (changing 5 min db update)

Post by stephane01 » Sat Feb 09, 2019 9:21 am

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,...)
Image

mchd17
Forecaster
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)

Post by mchd17 » Sat Feb 09, 2019 1:10 pm

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.
Image

Post Reply