Hi,

I just tried the new driver you attached, and it is working much better, as 
the archive records are now stored in the database :-)

However, there is still an issue, as you can see in this log extract:

Apr 27 07:23:31 raspiMeteo weewx[4406]: wmr200: MainThread: I Time drift 
between host and console in seconds:32

Apr 27 07:24:03 raspiMeteo weewx[4406]: wmr200: MainThread: I genStartup() 
Still receiving archive packets cnt:0 len:1

Apr 27 07:24:03 raspiMeteo weewx[4406]: wmr200: MainThread: I Using pc time 
adjusting archive record time by 32 sec 2017-04-27 09:18:00 CEST 
(1493277480) => 2017-04-27 09:18:32 CEST (1493277512)

Apr 27 07:24:03 raspiMeteo weewx[4406]: manager: Added record 2017-04-27 
09:18:32 CEST (1493277512) to database 'weewx.sdb'

Apr 27 07:24:04 raspiMeteo weewx[4406]: manager: Added record 2017-04-27 
09:18:32 CEST (1493277512) to daily summary in 'weewx.sdb'

Apr 27 07:24:06 raspiMeteo weewx[4406]: wmr200: MainThread: I genStartup() 
Still receiving archive packets cnt:1 len:1

Apr 27 07:24:06 raspiMeteo weewx[4406]: wmr200: MainThread: I Using pc time 
adjusting archive record time by 32 sec 2017-04-27 09:19:00 CEST 
(1493277540) => 2017-04-27 09:19:32 CEST (1493277572)

Apr 27 07:24:06 raspiMeteo weewx[4406]: manager: Added record 2017-04-27 
09:19:32 CEST (1493277572) to database 'weewx.sdb'

Apr 27 07:24:06 raspiMeteo weewx[4406]: manager: Added record 2017-04-27 
09:19:32 CEST (1493277572) to daily summary in 'weewx.sdb'

Apr 27 07:24:08 raspiMeteo weewx[4406]: wmr200: MainThread: I genStartup() 
Still receiving archive packets cnt:2 len:1

Apr 27 07:24:08 raspiMeteo weewx[4406]: wmr200: MainThread: I Using pc time 
adjusting archive record time by 32 sec 2017-04-27 09:20:00 CEST 
(1493277600) => 2017-04-27 09:20:32 CEST (1493277632)

Apr 27 07:24:08 raspiMeteo weewx[4406]: manager: Added record 2017-04-27 
09:20:32 CEST (1493277632) to database 'weewx.sdb'

Apr 27 07:24:08 raspiMeteo weewx[4406]: manager: Added record 2017-04-27 
09:20:32 CEST (1493277632) to daily summary in 'weewx.sdb'

Apr 27 07:24:11 raspiMeteo weewx[4406]: wmr200: MainThread: I genStartup() 
Still receiving archive packets cnt:3 len:1

Apr 27 07:24:11 raspiMeteo weewx[4406]: wmr200: MainThread: I Using pc time 
adjusting archive record time by 32 sec 2017-04-27 09:21:00 CEST 
(1493277660) => 2017-04-27 09:21:32 CEST (1493277692)

Apr 27 07:24:11 raspiMeteo weewx[4406]: manager: Added record 2017-04-27 
09:21:32 CEST (1493277692) to database 'weewx.sdb'

Apr 27 07:24:12 raspiMeteo weewx[4406]: manager: Added record 2017-04-27 
09:21:32 CEST (1493277692) to daily summary in 'weewx.sdb'

Apr 27 07:24:13 raspiMeteo weewx[4406]: wmr200: MainThread: I genStartup() 
Still receiving archive packets cnt:4 len:1

Apr 27 07:24:13 raspiMeteo weewx[4406]: wmr200: MainThread: I Using pc time 
adjusting archive record time by 32 sec 2017-04-27 09:22:00 CEST 
(1493277720) => 2017-04-27 09:22:32 CEST (1493277752)

Apr 27 07:24:13 raspiMeteo weewx[4406]: manager: Added record 2017-04-27 
09:22:32 CEST (1493277752) to database 'weewx.sdb'

Apr 27 07:24:13 raspiMeteo weewx[4406]: manager: Added record 2017-04-27 
09:22:32 CEST (1493277752) to daily summary in 'weewx.sdb'

Apr 27 07:24:15 raspiMeteo weewx[4406]: wmr200: MainThread: I genStartup() 
Still receiving archive packets cnt:5 len:1

Apr 27 07:24:15 raspiMeteo weewx[4406]: wmr200: MainThread: I Using pc time 
adjusting archive record time by 32 sec 2017-04-27 09:23:00 CEST 
(1493277780) => 2017-04-27 09:23:32 CEST (1493277812)

Apr 27 07:24:15 raspiMeteo weewx[4406]: manager: Added record 2017-04-27 
09:23:32 CEST (1493277812) to database 'weewx.sdb'

Apr 27 07:24:15 raspiMeteo weewx[4406]: manager: Added record 2017-04-27 
09:23:32 CEST (1493277812) to daily summary in 'weewx.sdb'

Apr 27 07:26:16 raspiMeteo weewx[4406]: wmr200: MainThread: I genStartup() 
phase exiting since looks like all archive packets have been retrieved 
after 120 sec cnt:6

Apr 27 07:26:16 raspiMeteo rsyslogd-2007: action 'action 17' suspended, 
next retry is Thu Apr 27 07:27:46 2017 [try http://www.rsyslog.com/e/2007 ]

Apr 27 07:26:16 raspiMeteo weewx[4406]: wmr200: MainThread: I genStartup() 
Yielded 6 packets in 300 sec  between these dates 2017-04-27 09:18:32 CEST 
(1493277512) ==> 2017-04-27 09:23:32 CEST (1493277812)

Apr 27 07:26:16 raspiMeteo weewx[4406]: wmr200: MainThread: I genStartup() 
Average packets per minute:1.200000

Apr 27 07:26:16 raspiMeteo weewx[4406]: engine: Starting main packet loop.

Apr 27 07:27:16 raspiMeteo weewx[4406]: manager: Added record 2017-04-27 
09:27:00 CEST (1493278020) to database 'weewx.sdb'

Apr 27 07:27:16 raspiMeteo weewx[4406]: manager: Added record 2017-04-27 
09:27:00 CEST (1493278020) to daily summary in 'weewx.sdb'

Apr 27 07:27:46 raspiMeteo weewx[4406]: cheetahgenerator: Generated 14 
files for report StandardReport in 28.25 seconds

Apr 27 07:27:46 raspiMeteo rsyslogd-2007: action 'action 17' suspended, 
next retry is Thu Apr 27 07:29:16 2017 [try http://www.rsyslog.com/e/2007 ]

I stopped WeeWX around 09:18 CEST, and restarted it (with the new driver) 
around 09:23 CEST. The archive interval is 60 seconds.
It started to process the archive records correctly, the last one having a 
timestamp of 09:23:32 CEST (highlighted in green above). Then it waited 2 
minutes to ensure that no more archive records are present, before entering 
the main packet loop.
Then the first live record to be processed has a timestamp of 09:27:00 CEST 
(highlighted in yellow above). This means that all the live packets 
generated by the weather station during the archive processing and the 2 
minutes delay were simply discarded.

I did a query on the archive table, and I have indeed a gap in the 
timestamps:

2017-04-27 09:15:00

2017-04-27 09:16:00

2017-04-27 09:17:00

2017-04-27 09:18:32

2017-04-27 09:19:32

2017-04-27 09:20:32

2017-04-27 09:21:32

2017-04-27 09:22:32

2017-04-27 09:23:32

2017-04-27 09:27:00

2017-04-27 09:28:00

2017-04-27 09:29:00

This seems strange to me, especially as I remember having seen, during my 
first tests where I had a lot of archive records, messages in the output 
indicating that the live packets were put in a queue to be processed later. 
And when I stopped WeeWX, I had this in the log:

Apr 25 12:45:40 raspiMeteo weewx[597]: wmr200: Thread-1: I Watchdog thread 
exiting

Apr 25 12:45:40 raspiMeteo weewx[597]: wmr200: MainThread: I Watchdog 
thread expired

Apr 25 12:45:40 raspiMeteo weewx[597]: wmr200: MainThread: I Received 
packet count live:281 archive:218 control:30

Apr 25 12:45:40 raspiMeteo weewx[597]: wmr200: MainThread: I Received 
bytes:119760 sent bytes:2320

Apr 25 12:45:40 raspiMeteo weewx[597]: wmr200: MainThread: I Packet archive 
queue len:0 live queue len:281

Apr 25 12:45:40 raspiMeteo weewx[597]: wmr200: MainThread: W Exiting with 
packets still in live queue cnt:281

Apr 25 12:45:40 raspiMeteo weewx[597]: wmr200: MainThread: I Driver 
gracefully exiting

Apr 25 12:45:40 raspiMeteo weewx[597]: engine: Keyboard interrupt.

This seems to indicate that it is possible for WeeWX to temporarily store 
the live packets while processing the archive records, but for some reasons 
it is no more the case...

In any case, the situation is now much better, so a *big thank you* for 
your help!

Patrick


On Thursday, April 27, 2017 at 7:40:30 AM UTC+2, mwall wrote:
>
> patrick,
>
> please try the attached wmr200-3.3.2.py
>
> stop weewx
>
> move aside your existing wmr200.py
>
> copy the new driver into its place
>
> wait a few minutes so that some records can be added to the station's 
> logger
>
> start weewx
>
> m
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to