Author Topic: 1 minute intervals  (Read 2163 times)

0 Members and 1 Guest are viewing this topic.

Offline Skyview

  • Forecaster
  • *****
  • Posts: 404
  • Former Aviation Weather Observer
    • Fuquay Varina Weather
1 minute intervals
« on: July 26, 2015, 02:49:07 PM »
So I have a website setup using Jachym's template. I modified the Meteobridge processing code (just one line) to process every 1 minute and record to the database at that interval instead of the default 5 minutes. For the original 5 minute updates, we were using this in the push services tab (with corresponding 5 min. interval set in MB):

meteobridge.php?t=[th0temp-avg5]&h=[th0hum-avg5]&p=[thb0seapress-avg5]&d=[th0dew-avg5]&w=[wind0wind-avg5]&g=[wind0wind-max5]&b=[wind0dir-avg5]&rr=[rain0rate-act]&r=[rain0total-sumday]&tmax=[th0temp-max5]&tmin=[th0temp-min5]&year=[YYYY]&month=[MM]&day=[DD]&hour=[hh]&minute=[mm]&seconds=[ss]

After changing the interval to 1 minute updates in the meteobridge.php processing code, I then went into Meteobridge and changed the push services entry to this:

meteobridge.php?t=[th0temp-avg1]&h=[th0hum-avg1]&p=[thb0seapress-avg1]&d=[th0dew-avg1]&w=[wind0wind-avg1]&g=[wind0wind-max1]&b=[wind0dir-avg1]&rr=[rain0rate-act]&r=[rain0total-sumday]&tmax=[th0temp-max1]&tmin=[th0temp-min1]&year=[YYYY]&month=[MM]&day=[DD]&hour=[hh]&minute=[mm]&seconds=[ss]

The issue I have been having since going to 1 minute updates is that at random times, the pressure value would be 0. Sometimes it does this every 30 min. or so, sometimes 1hr, 2hr, most has been 3hr without any issue. The data update does take place, and only the pressure value is an issue. Other values are recorded correctly. Anyone have ideas on what this might be or how to address it? Thanks.

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: 1 minute intervals
« Reply #1 on: July 26, 2015, 03:43:46 PM »
David, what I thought was that what we could do is set up a script that would log everything meteobridge is sending and we could see if it is a problem with MB or the script, I will make that script tomorrow and send you instructions how to use it.

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: 1 minute intervals
« Reply #2 on: July 26, 2015, 03:57:03 PM »
If you select the 1 minute period and there is no valid value received in that period from the weather station, MB will substitute a zero as there is no average to calculate.

Wiki:avg1, avg2, avg3, ..., avg60: selects average value from the last one to 60 minutes

As pressure does not change rapidly, you could set pressure to a 2-5 minute avg value, or better yet, to the actual value. That is the last received valid value.

Humidity is also updated once / minute, so better set to the actual value also.

http://www.davisnet.com/product_documents/weather/spec_sheets/6250_6351_57_SS.pdf

Wim
« Last Edit: July 26, 2015, 04:16:16 PM by wvdkuil »

Offline Skyview

  • Forecaster
  • *****
  • Posts: 404
  • Former Aviation Weather Observer
    • Fuquay Varina Weather
Re: 1 minute intervals
« Reply #3 on: July 26, 2015, 06:01:23 PM »
David, what I thought was that what we could do is set up a script that would log everything meteobridge is sending and we could see if it is a problem with MB or the script, I will make that script tomorrow and send you instructions how to use it.

That sounds good Jachym. No rush.

If you select the 1 minute period and there is no valid value received in that period from the weather station, MB will substitute a zero as there is no average to calculate.

Wiki:avg1, avg2, avg3, ..., avg60: selects average value from the last one to 60 minutes

As pressure does not change rapidly, you could set pressure to a 2-5 minute avg value, or better yet, to the actual value. That is the last received valid value.

Humidity is also updated once / minute, so better set to the actual value also.

http://www.davisnet.com/product_documents/weather/spec_sheets/6250_6351_57_SS.pdf

Wim

Thanks. I really need to research proper functionality of MB more. I too would prefer actual if I were doing 1 minute updates, but I am not sure the code Jachym wrote to process the data would support that as it is currently written.

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: 1 minute intervals
« Reply #4 on: July 26, 2015, 06:04:16 PM »
Well actually Wim is absolutely right, you need to check how often your station is able to (or does so) record pressure.

Offline Skyview

  • Forecaster
  • *****
  • Posts: 404
  • Former Aviation Weather Observer
    • Fuquay Varina Weather
Re: 1 minute intervals
« Reply #5 on: July 26, 2015, 06:24:31 PM »
Well, it appears the update interval on the VUE is 1 min. for pressure, so perhaps the timing is overlapping on these occasions so maybe if I went to a 2 min. update interval the problem would be solved. Something to try anyway.

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: 1 minute intervals
« Reply #6 on: July 26, 2015, 07:55:13 PM »
OK, in that case I think it is basically certain that this is what is causing this - MB tries to calculate average from last minute, however now and then there is not a single update in that minute (it can delay for example by 1-2s, so there is 60s with no update)¨and then it throws a NULL value. Set your pressure to just report current value by deleting the "-avg1"

like this:

thb0seapress-avg1

change to

thb0seapress-act

Offline Skyview

  • Forecaster
  • *****
  • Posts: 404
  • Former Aviation Weather Observer
    • Fuquay Varina Weather
Re: 1 minute intervals
« Reply #7 on: July 27, 2015, 02:41:00 AM »
Thanks! I had it running for a few hours using avg2 for the pressure and didn't get any missed readings. However, I went and changed this a few minutes ago to the following:

1. Meteobridge push service entry to use -act for the pressure
2. Meteobridge interval set to 1 minute
3. Changed meteobridge.php code to 1 minute database updates again (had been overwritten with the v1.1 update)

Hope this solves it. I'll report back in a day or two after I have enough data points to be reasonably certain.

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: 1 minute intervals
« Reply #8 on: July 27, 2015, 05:11:49 AM »
Yes, great!

Im assuming you did not change your config.php so based on how I set it up on your server, you should definitely not get those spikes, but you would still see if the pressure was reported incorrectly by having occasional gaps in pressure data.

Offline Skyview

  • Forecaster
  • *****
  • Posts: 404
  • Former Aviation Weather Observer
    • Fuquay Varina Weather
Re: 1 minute intervals
« Reply #9 on: July 27, 2015, 03:54:21 PM »
Hasn't been a day yet, but over 12 hours without a single missed pressure reading! Hope I'm not jinxing it but looks like that did the trick.

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: 1 minute intervals
« Reply #10 on: July 27, 2015, 05:04:16 PM »
 \:D/

Today is a productive day :D

I got lot of work done in my normal job, finished what I needed to do for my part-time job and since Im not sleepy I worked on some issues and fixed websites of two other people, so lets hope you will be third for today (and since Im not going to bed for about 4 more hours, there is still plenty I can get done :-)
« Last Edit: July 27, 2015, 05:05:48 PM by Jachym »