weewx report generation delayed ?

59 views
Skip to first unread message

wysiwyg

unread,
May 21, 2019, 4:04:19 PM5/21/19
to weewx-user
Hello !

I have my weewx reports set with (I think) default options:     report_timing = */5 * * * *
but
Maybe I'm wrong, but I had in mind that in the past, the reports was generated right each 5minutes
I mean one or 2 seconds after each xxh05m00s,  xxh10m00s,  xxh15m00s ...


But when looking my logs, I seems a bit irregular...(I considered "manager: Added record 2019-05-18 21:20:00 CEST (1558207200) to database 'weewx.sdb'" as starting point of 5 minute tasks).

Is it expected? if not, what could cause this ?



May 18 21:20:38 localhost weewx[839]: manager: Added record 2019-05-18 21:20:00 CEST (1558207200) to database 'weewx.sdb'
May 18 21:20:38 localhost weewx[839]: manager: Added record 2019-05-18 21:20:00 CEST (1558207200) to daily summary in 'weewx.sdb'
May 18 21:26:13 localhost weewx[839]: manager: Added record 2019-05-18 21:25:00 CEST (1558207500) to database 'weewx.sdb'
May 18 21:26:13 localhost weewx[839]: manager: Added record 2019-05-18 21:25:00 CEST (1558207500) to daily summary in 'weewx.sdb'
May 18 21:31:11 localhost weewx[839]: manager: Added record 2019-05-18 21:30:00 CEST (1558207800) to database 'weewx.sdb'
May 18 21:31:11 localhost weewx[839]: manager: Added record 2019-05-18 21:30:00 CEST (1558207800) to daily summary in 'weewx.sdb'
May 18 21:36:04 localhost weewx[839]: manager: Added record 2019-05-18 21:35:00 CEST (1558208100) to database 'weewx.sdb'
May 18 21:36:04 localhost weewx[839]: manager: Added record 2019-05-18 21:35:00 CEST (1558208100) to daily summary in 'weewx.sdb'
May 18 21:41:12 localhost weewx[839]: manager: Added record 2019-05-18 21:40:00 CEST (1558208400) to database 'weewx.sdb'
May 18 21:41:12 localhost weewx[839]: manager: Added record 2019-05-18 21:40:00 CEST (1558208400) to daily summary in 'weewx.sdb'
May 18 21:45:33 localhost weewx[839]: manager: Added record 2019-05-18 21:45:00 CEST (1558208700) to database 'weewx.sdb'
May 18 21:45:33 localhost weewx[839]: manager: Added record 2019-05-18 21:45:00 CEST (1558208700) to daily summary in 'weewx.sdb'
May 18 21:51:04 localhost weewx[839]: manager: Added record 2019-05-18 21:50:00 CEST (1558209000) to database 'weewx.sdb'
May 18 21:51:04 localhost weewx[839]: manager: Added record 2019-05-18 21:50:00 CEST (1558209000) to daily summary in 'weewx.sdb'
May 18 21:56:10 localhost weewx[839]: manager: Added record 2019-05-18 21:55:00 CEST (1558209300) to database 'weewx.sdb'
May 18 21:56:10 localhost weewx[839]: manager: Added record 2019-05-18 21:55:00 CEST (1558209300) to daily summary in 'weewx.sdb'
May 18 22:01:11 localhost weewx[839]: manager: Added record 2019-05-18 22:00:00 CEST (1558209600) to database 'weewx.sdb'
May 18 22:01:11 localhost weewx[839]: manager: Added record 2019-05-18 22:00:00 CEST (1558209600) to daily summary in 'weewx.sdb'
May 18 22:06:03 localhost weewx[839]: manager: Added record 2019-05-18 22:05:00 CEST (1558209900) to database 'weewx.sdb'
May 18 22:06:03 localhost weewx[839]: manager: Added record 2019-05-18 22:05:00 CEST (1558209900) to daily summary in 'weewx.sdb'
May 18 22:11:10 localhost weewx[839]: manager: Added record 2019-05-18 22:10:00 CEST (1558210200) to database 'weewx.sdb'
May 18 22:11:10 localhost weewx[839]: manager: Added record 2019-05-18 22:10:00 CEST (1558210200) to daily summary in 'weewx.sdb'
May 18 22:16:08 localhost weewx[839]: manager: Added record 2019-05-18 22:15:00 CEST (1558210500) to database 'weewx.sdb'
May 18 22:16:08 localhost weewx[839]: manager: Added record 2019-05-18 22:15:00 CEST (1558210500) to daily summary in 'weewx.sdb'
May 18 22:20:17 localhost weewx[839]: manager: Added record 2019-05-18 22:20:00 CEST (1558210800) to database 'weewx.sdb'
May 18 22:20:17 localhost weewx[839]: manager: Added record 2019-05-18 22:20:00 CEST (1558210800) to daily summary in 'weewx.sdb'
May 18 22:25:23 localhost weewx[839]: manager: Added record 2019-05-18 22:25:00 CEST (1558211100) to database 'weewx.sdb'
May 18 22:25:23 localhost weewx[839]: manager: Added record 2019-05-18 22:25:00 CEST (1558211100) to daily summary in 'weewx.sdb'
May 18 22:31:08 localhost weewx[839]: manager: Added record 2019-05-18 22:30:00 CEST (1558211400) to database 'weewx.sdb'
May 18 22:31:08 localhost weewx[839]: manager: Added record 2019-05-18 22:30:00 CEST (1558211400) to daily summary in 'weewx.sdb'
May 18 22:35:16 localhost weewx[839]: manager: Added record 2019-05-18 22:35:00 CEST (1558211700) to database 'weewx.sdb'



vince

unread,
May 21, 2019, 7:25:18 PM5/21/19
to weewx-user
On Tuesday, May 21, 2019 at 1:04:19 PM UTC-7, wysiwyg wrote:

But when looking my logs, I seems a bit irregular...(I considered "manager: Added record 2019-05-18 21:20:00 CEST (1558207200) to database 'weewx.sdb'" as starting point of 5 minute tasks).

Is it expected? if not, what could cause this ?


What in particular do you think is wrong ?
The fact that it it's not literally a second or two after you expect things ?

Without your crontab entries and 'much' more info about your configs, we're not going to be able to help much.
Looks like it's working to me.
 

gjr80

unread,
May 21, 2019, 11:14:55 PM5/21/19
to weewx-user
Actually, the log extract provided shows no information whatsoever regarding reports, just database updates. Though a report thread should be kicked off almost immediately after the database is updated.

Depending on the weather station capabilities and WeeWX configuration, you may well not see archive records being saved at the same time. It takes the arrival of a loop packet to cause WeeWX to check whether it is time to synthesise or request an archive record. So if you have loop packets coming in at irregular intervals, or there are long intervals between loop packets, it is quite conceivable you will see archive records being saved to database at different times each archive period and that the variation in seconds could be as much as the maximum loop packet interval. If your station has a very short loop packet interval you will find the archive record is synthesised/obtained from the hardware much closer to the same time each archive period. The key measure is the archive record time stamp which in your case is remaining hard and fast on the 5 minute boundary

Gary

wysiwyg

unread,
May 22, 2019, 3:28:21 AM5/22/19
to weewx-user
Hi !

Thank you Gary for your explanation!
I think you hit the bullseye (is it ok to say that ? English is not my mother-language).

Let me explain:
1/ Yes, I showed archive records logs, but report engine start right after record, so I assumed the record task as the reference for timings to trig "5 minutes tasks".

2/ I think you have guess right with loop records:  The station is my own development, Today I have 2 hardware:
- one outdoor sensor (Temp, humi, rain, UV) emits every 150sec
- one indoor sensor (barometer, intemp) emits every 3 minutes.
Wind sensor will come soon, with higher emission rate, but only when there are some wind.

That could explain the +/- 1 min delay I seen for report generation.

So If I understand correctly, the only way to improve this is to increase emission rate of at least one sensor ? 
...or to live with current situation  (It's not critical, just a bit annoying while working in skins)

gjr80

unread,
May 22, 2019, 3:58:17 AM5/22/19
to weewx-user
On Wednesday, 22 May 2019 17:28:21 UTC+10, wysiwyg wrote:

2/ I think you have guess right with loop records:  The station is my own development, Today I have 2 hardware:
- one outdoor sensor (Temp, humi, rain, UV) emits every 150sec
- one indoor sensor (barometer, intemp) emits every 3 minutes.
Wind sensor will come soon, with higher emission rate, but only when there are some wind.

That could explain the +/- 1 min delay I seen for report generation.

So If I understand correctly, the only way to improve this is to increase emission rate of at least one sensor ? 
...or to live with current situation  (It's not critical, just a bit annoying while working in skins)

I guess it depends on what you mean by improve, the only downside to having that delay is that you are waiting a few extra seconds for your reports to be generated. Your data is just as valid as the only data included in a given archive record by WeeWX is loop data that was received between the start and end of that given archive period. Perhaps when you implement your wind sensor you could have your driver emit 'wind' loop packets much more often. That is how the Davis stations operate (albeit they use a complete not a partial loop packet), the wind sensor updates at a much higher rate than the temperature, humidity and other sensors. The Davis stations emit a loop packet every 2 odd seconds.

Gary

wysiwyg

unread,
May 22, 2019, 4:54:38 AM5/22/19
to weewx-user
Hi!

You are right, the delay is not critical, just a bit annoying:
I used to rely on page update ~20sec after each round 5min, now it's a bit more random (sometime one more minute as you can see in logs).
It's just disturbing when working a skin template ( sometime I just wait for next generation to see the results)
Or when an heavy rain/storm occurs suddenly and I'm curious to see measurements :-)

But it's nothing more than minor discomfort.

I don't want to increase  too much wind packet rate. It will be fast in case of wingust, but if no wind, I plan to emit only every 2 minutes to save battery.
It's because the sensor will be solar+battery and on the roof....I dont want to climb there too much :-D, so I prefer keep a -very big- margin on battery to handle longer winter nights & cloudy weather.

But I can increase the barometer rate, It's not battery supplied.
Reply all
Reply to author
Forward
0 new messages