Loops errors and no HTML updates, but weewx appears to be reading data correctly

1,935 views
Skip to first unread message

K1DRT

unread,
Mar 21, 2013, 3:18:42 PM3/21/13
to weewx...@googlegroups.com
I installed weewx yesterday on Ubuntu, connected to a Davis Weather Envoy via Serial.  Every time I start weewx, it appears to import any archive records waiting on the data logger, but then begins logging loop errors (see log below).  While it continues to log these errors, and stops writing additional records to the DB, the output onscreen appears to still be correct, so it appears that weewx is still getting data.

Syslog:

Mar 21 11:59:25 wxserver weewx[10345]: wxengine: Using configuration file /etc/weewx/weewx.conf.
Mar 21 11:59:25 wxserver weewx[10345]: VantagePro: Opened up serial port /dev/ttyS0, baudrate 19200
Mar 21 11:59:26 wxserver weewx[10345]: VantagePro: successfully woke up console
Mar 21 11:59:26 wxserver weewx[10345]: wxengine: Loading service weewx.wxengine.StdConvert
Mar 21 11:59:26 wxserver weewx[10345]: wxengine: StdConvert target unit is 0x1
Mar 21 11:59:26 wxserver weewx[10345]: wxengine: Finished loading service weewx.wxengine.StdConvert
Mar 21 11:59:26 wxserver weewx[10345]: wxengine: Loading service weewx.wxengine.StdCalibrate
Mar 21 11:59:26 wxserver weewx[10345]: wxengine: Finished loading service weewx.wxengine.StdCalibrate
Mar 21 11:59:26 wxserver weewx[10345]: wxengine: Loading service weewx.wxengine.StdQC
Mar 21 11:59:26 wxserver weewx[10345]: wxengine: Finished loading service weewx.wxengine.StdQC
Mar 21 11:59:26 wxserver weewx[10345]: wxengine: Loading service weewx.wxengine.StdArchive
Mar 21 11:59:26 wxserver weewx[10345]: wxengine: The archive interval in the configuration file (300) does not match the station hardware interval (60).
Mar 21 11:59:26 wxserver weewx[10345]: wxengine: Using station hardware archive interval of 60
Mar 21 11:59:26 wxserver weewx[10345]: wxengine: Record generation will be attempted in 'hardware'
Mar 21 11:59:26 wxserver weewx[10345]: wxengine: Using archive database: archive_mysql
Mar 21 11:59:26 wxserver weewx[10345]: stats: Schema exists with 16 elements
Mar 21 11:59:26 wxserver weewx[10345]: stats: Backfilling stats database.
Mar 21 11:59:26 wxserver weewx[10345]: stats: stats database up to date.
Mar 21 11:59:26 wxserver weewx[10345]: wxengine: Using stats database: stats_mysql
Mar 21 11:59:26 wxserver weewx[10345]: wxengine: Finished loading service weewx.wxengine.StdArchive
Mar 21 11:59:26 wxserver weewx[10345]: wxengine: Loading service weewx.wxengine.StdTimeSynch
Mar 21 11:59:26 wxserver weewx[10345]: wxengine: Finished loading service weewx.wxengine.StdTimeSynch
Mar 21 11:59:26 wxserver weewx[10345]: wxengine: Loading service weewx.wxengine.StdPrint
Mar 21 11:59:26 wxserver weewx[10345]: wxengine: Finished loading service weewx.wxengine.StdPrint
Mar 21 11:59:26 wxserver weewx[10345]: wxengine: Loading service weewx.wxengine.StdRESTful
Mar 21 11:59:26 wxserver weewx[10345]: wxengine: Data will not be posted to Wunderground
Mar 21 11:59:26 wxserver weewx[10345]: **** 'station'
Mar 21 11:59:26 wxserver weewx[10345]: wxengine: Data will not be posted to PWSweather
Mar 21 11:59:26 wxserver weewx[10345]: **** 'station'
Mar 21 11:59:26 wxserver weewx[10345]: wxengine: Data will not be posted to CWOP
Mar 21 11:59:26 wxserver weewx[10345]: **** 'station'
Mar 21 11:59:26 wxserver weewx[10345]: wxengine: No RESTful upload sites. No need to start thread.
Mar 21 11:59:26 wxserver weewx[10345]: wxengine: Finished loading service weewx.wxengine.StdRESTful
Mar 21 11:59:26 wxserver weewx[10345]: wxengine: Loading service weewx.wxengine.StdReport
Mar 21 11:59:26 wxserver weewx[10345]: wxengine: Finished loading service weewx.wxengine.StdReport
Mar 21 11:59:26 wxserver weewx[10345]: wxengine: Starting up weewx version 2.2.1.
Mar 21 11:59:26 wxserver weewx[10345]: VantagePro: Getting archive packets since 2013-03-21 11:56:00 PDT (1363892160)
Mar 21 11:59:26 wxserver weewx[10345]: VantagePro: successfully woke up console
Mar 21 11:59:26 wxserver weewx[10345]: VantagePro: Retrieving 2 page(s); starting index= 4
Mar 21 11:59:26 wxserver weewx[10345]: Archive: added archive record 2013-03-21 11:57:00 PDT (1363892220)
Mar 21 11:59:27 wxserver weewx[10345]: Archive: added archive record 2013-03-21 11:58:00 PDT (1363892280)
Mar 21 11:59:27 wxserver weewx[10345]: Archive: added archive record 2013-03-21 11:59:00 PDT (1363892340)
Mar 21 11:59:27 wxserver weewx[10345]: VantagePro: empty record page 1; index 2
Mar 21 11:59:27 wxserver weewx[10345]: wxengine: Starting main packet loop.
Mar 21 11:59:27 wxserver weewx[10345]: VantagePro: successfully woke up console
Mar 21 11:59:28 wxserver weewx[10345]: VantagePro: successfully woke up console
Mar 21 11:59:28 wxserver weewx[10345]: wxengine: Clock error is 0.02 seconds (positive is fast)
Mar 21 11:59:28 wxserver weewx[10345]: VantagePro: Requesting 200 LOOP packets.
Mar 21 11:59:29 wxserver weewx[10345]: VantagePro: successfully woke up console
Mar 21 11:59:43 wxserver weewx[10345]: VantagePro: LOOP #4; read error. Try #1
Mar 21 11:59:43 wxserver weewx[10345]: **** Expected to read 99 chars; got 0 instead
Mar 21 11:59:53 wxserver weewx[10345]: VantagePro: LOOP #5; read error. Try #2
Mar 21 11:59:53 wxserver weewx[10345]: **** Expected to read 99 chars; got 0 instead
Mar 21 12:00:03 wxserver weewx[10345]: VantagePro: LOOP #6; read error. Try #3

Sample of console output while the errors are being logged:

LOOP:   2013-03-21 12:10:45 PDT (1363893045) {'monthET': 0.0, 'dewpoint': 28.577922490686646, 'outHumidity': 25.0, 'rainRate': 0.0, 'consBatteryVoltage': 4.82, 'extraTemp2': None, 'monthRain': 0.05, 'insideAlarm': 0, 'barometer': 29.912, 'dateTime': 1363893045, 'stormRain': 0.0, 'extraTemp4': None, 'sunrise': 1363873860, 'windchill': 65.3, 'windDir': 296.0, 'extraTemp5': None, 'extraTemp3': None, 'outTemp': 65.3, 'outsideAlarm1': 0, 'leafTemp3': None, 'outsideAlarm2': 0, 'radiation': None, 'forecastRule': 187, 'leafTemp2': None, 'rainAlarm': 0, 'stormStart': None, 'inTemp': 66.9, 'inHumidity': 32.0, 'windSpeed10': 2.0, 'yearRain': 0.05, 'extraAlarm1': 0, 'extraAlarm2': 0, 'extraAlarm3': 0, 'extraAlarm4': 0, 'extraAlarm5': 0, 'extraAlarm6': 0, 'extraAlarm7': 0, 'extraAlarm8': 0, 'soilTemp1': None, 'soilTemp2': None, 'soilTemp3': None, 'soilTemp4': None, 'soilLeafAlarm2': 0, 'extraHumid6': None, 'extraHumid7': None, 'extraHumid4': None, 'extraHumid5': None, 'extraHumid2': None, 'extraHumid3': None, 'extraHumid1': None, 'extraTemp6': None, 'extraTemp7': None, 'soilLeafAlarm4': 0, 'leafTemp4': None, 'forecastIcon': 3, 'soilLeafAlarm3': 0, 'leafTemp1': None, 'extraTemp1': None, 'leafWet4': 0.0, 'yearET': 0.0, 'soilLeafAlarm1': 0, 'leafWet1': None, 'leafWet2': None, 'txBatteryStatus': 0, 'leafWet3': None, 'heatindex': 65.3, 'UV': None, 'dayET': 0.0, 'dayRain': 0.0, 'soilMoist3': None, 'soilMoist2': None, 'soilMoist1': None, 'sunset': 1363917720, 'windSpeed': 2.0, 'soilMoist4': None, 'usUnits': 1, 'rain': 0.0}

Am I missing something here?  This Envoy was previously connected to a Windows server and has been functioning properly for 3+ years without a single issue.  I confirmed that there are no other processes accessing the serial port (ttyS0) used by the Envoy. 


Thomas Keffer

unread,
Mar 21, 2013, 5:11:35 PM3/21/13
to weewx...@googlegroups.com
No, I don't have any brilliant ideas what is going on. 

Are you using the default timeout (5 seconds). You could try increasing it, say to 10 seconds, but I'm dubious that will make a difference.

It's possible that your previous Windows-based software was not taking advantage of LOOP data and was merely downloading the archive data, so it never saw this kind of error. I recognize that I'm theorizing here.

In any case, weewx should recover. It will wait 60 seconds and then retry from the top. Is this not happening? I can't tell because the syslog stops there. Or, is it happening too often to get a meaningful output?

I guess another, still theorizing, explanation is that your previous software did something similar, but just never bothered to report it...

-tk



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



--
Tom Keffer
kef...@threefools.org
+1 541-386-8891 (h)
+1 541-490-9507 (c)
Skype: tkeffer

K1DRT

unread,
Mar 21, 2013, 6:31:16 PM3/21/13
to weewx...@googlegroups.com
I tried increasing timeout to 10 seconds, then tried again at 20.  No change.  Weewx doesn't seem to recover - after a number of failed loops, it repeats and grabs archive data again, but never gets to building the HTML.  My Weatherlink module is the 6540 (APRS Streaming) model.  Does it behave differently perhaps because of the streaming data? 

Thomas Keffer

unread,
Mar 21, 2013, 6:41:21 PM3/21/13
to weewx...@googlegroups.com
I have no idea. I had never heard of the 6540 logger until now and had to look it up. 

Could you please send the part of your log that follows the "LOOP read error"?

What should happen is that after 4 retries it restarts the program from the top. This should appear in the log.

-tk

K1DRT

unread,
Mar 21, 2013, 7:49:25 PM3/21/13
to weewx...@googlegroups.com
I had also turned the retries up to 10 in troubleshooting.  Log is included below - it does start over, and gets more archive data, but it seems to never get to building the HTML because the LOOP is failing to read data.  Oddly, the data stream I am seeing in the console seems to continue for two or three records after each of the archive imports - i.e., in the time frame reflected in the log below, weewx picked up archives for 16:31, 16:32, and 16:33, and the console output reflected additional data for 16:33:02, 16:33:04 and 16:33:06 after those were displayed.  The console then stops streaming new data until the next time weewx picks up more archive records.  It really does seem like this may be due to the APRS module, since it streams the data "live" - I'm assuming the non-APRS does not do that. 

Mar 21 16:32:30 wxserver weewx[10631]: VantagePro: LOOP #13; read error. Try #10
Mar 21 16:32:30 wxserver weewx[10631]:       ****  Expected to read 99 chars; got 0 instead
Mar 21 16:32:30 wxserver weewx[10631]: VantagePro: Max retries (10) exceeded.
Mar 21 16:32:30 wxserver weewx[10631]: VantagePro: successfully woke up console
Mar 21 16:32:30 wxserver weewx[10631]: wxengine: Caught WeeWxIOError: Max retries exceeded while getting LOOP data.
Mar 21 16:32:30 wxserver weewx[10631]:     ****  Waiting 60 seconds then retrying...
Mar 21 16:33:30 wxserver weewx[10631]: wxengine: retrying...
Mar 21 16:33:30 wxserver weewx[10631]: wxengine: Using configuration file /etc/weewx/weewx.conf.
Mar 21 16:33:30 wxserver weewx[10631]: VantagePro: Opened up serial port /dev/ttyS0, baudrate 19200
Mar 21 16:33:31 wxserver weewx[10631]: VantagePro: successfully woke up console
Mar 21 16:33:31 wxserver weewx[10631]: wxengine: Loading service weewx.wxengine.StdConvert
Mar 21 16:33:31 wxserver weewx[10631]: wxengine: StdConvert target unit is 0x1
Mar 21 16:33:31 wxserver weewx[10631]: wxengine: Finished loading service weewx.wxengine.StdConvert
Mar 21 16:33:31 wxserver weewx[10631]: wxengine: Loading service weewx.wxengine.StdCalibrate
Mar 21 16:33:31 wxserver weewx[10631]: wxengine: Finished loading service weewx.wxengine.StdCalibrate
Mar 21 16:33:31 wxserver weewx[10631]: wxengine: Loading service weewx.wxengine.StdQC
Mar 21 16:33:31 wxserver weewx[10631]: wxengine: Finished loading service weewx.wxengine.StdQC
Mar 21 16:33:31 wxserver weewx[10631]: wxengine: Loading service weewx.wxengine.StdArchive
Mar 21 16:33:31 wxserver weewx[10631]: wxengine: The archive interval in the configuration file (300) does not match the station hardware interval (60).
Mar 21 16:33:31 wxserver weewx[10631]: wxengine: Using station hardware archive interval of 60
Mar 21 16:33:31 wxserver weewx[10631]: wxengine: Record generation will be attempted in 'hardware'
Mar 21 16:33:31 wxserver weewx[10631]: wxengine: Using archive database: archive_mysql
Mar 21 16:33:31 wxserver weewx[10631]: stats: Schema exists with 16 elements
Mar 21 16:33:31 wxserver weewx[10631]: stats: Backfilling stats database.
Mar 21 16:33:31 wxserver weewx[10631]: stats: stats database up to date.
Mar 21 16:33:31 wxserver weewx[10631]: wxengine: Using stats database: stats_mysql
Mar 21 16:33:31 wxserver weewx[10631]: wxengine: Finished loading service weewx.wxengine.StdArchive
Mar 21 16:33:31 wxserver weewx[10631]: wxengine: Loading service weewx.wxengine.StdTimeSynch
Mar 21 16:33:31 wxserver weewx[10631]: wxengine: Finished loading service weewx.wxengine.StdTimeSynch
Mar 21 16:33:31 wxserver weewx[10631]: wxengine: Loading service weewx.wxengine.StdPrint
Mar 21 16:33:31 wxserver weewx[10631]: wxengine: Finished loading service weewx.wxengine.StdPrint
Mar 21 16:33:31 wxserver weewx[10631]: wxengine: Loading service weewx.wxengine.StdRESTful
Mar 21 16:33:31 wxserver weewx[10631]: wxengine: Data will not be posted to Wunderground
Mar 21 16:33:31 wxserver weewx[10631]:     ****  'station'
Mar 21 16:33:31 wxserver weewx[10631]: wxengine: Data will not be posted to PWSweather
Mar 21 16:33:31 wxserver weewx[10631]:     ****  'station'
Mar 21 16:33:31 wxserver weewx[10631]: wxengine: Data will not be posted to CWOP
Mar 21 16:33:31 wxserver weewx[10631]:     ****  'station'
Mar 21 16:33:31 wxserver weewx[10631]: wxengine: No RESTful upload sites. No need to start thread.
Mar 21 16:33:31 wxserver weewx[10631]: wxengine: Finished loading service weewx.wxengine.StdRESTful
Mar 21 16:33:31 wxserver weewx[10631]: wxengine: Loading service weewx.wxengine.StdReport
Mar 21 16:33:31 wxserver weewx[10631]: wxengine: Finished loading service weewx.wxengine.StdReport
Mar 21 16:33:31 wxserver weewx[10631]: wxengine: Starting up weewx version 2.2.1.
Mar 21 16:33:31 wxserver weewx[10631]: VantagePro: Getting archive packets since 2013-03-21 16:30:00 PDT (1363908600)
Mar 21 16:33:32 wxserver weewx[10631]: VantagePro: successfully woke up console
Mar 21 16:33:32 wxserver weewx[10631]: VantagePro: Retrieving 1 page(s); starting index= 2
Mar 21 16:33:32 wxserver weewx[10631]: Archive: added archive record 2013-03-21 16:31:00 PDT (1363908660)
Mar 21 16:33:32 wxserver weewx[10631]: Archive: added archive record 2013-03-21 16:32:00 PDT (1363908720)
Mar 21 16:33:32 wxserver weewx[10631]: Archive: added archive record 2013-03-21 16:33:00 PDT (1363908780)
Mar 21 16:33:32 wxserver weewx[10631]: wxengine: Starting main packet loop.
Mar 21 16:33:33 wxserver weewx[10631]: VantagePro: successfully woke up console
Mar 21 16:33:33 wxserver weewx[10631]: VantagePro: successfully woke up console
Mar 21 16:33:33 wxserver weewx[10631]: wxengine: Clock error is -1.16 seconds (positive is fast)
Mar 21 16:33:33 wxserver weewx[10631]: VantagePro: Requesting 200 LOOP packets.
Mar 21 16:33:34 wxserver weewx[10631]: VantagePro: successfully woke up console
Mar 21 16:33:48 wxserver weewx[10631]: VantagePro: LOOP #5; read error. Try #1
Mar 21 16:33:48 wxserver weewx[10631]:       ****  Expected to read 99 chars; got 0 instead




Thomas Keffer

unread,
Mar 22, 2013, 10:45:31 AM3/22/13
to weewx...@googlegroups.com
I found a little bit on the Davis website about the protocol used by the APRS streaming logger here and here. It is a little hazy in the details, but I get the impression that every so often (the "Transmission Rate") it will stream data unprovoked, using the APRS format. Nowhere am I able to find anything about how to configure it. I am hoping there is a way to turn it off.

Two suggestions:
Did the logger come with a piece of software that allows the Transmission Rate to be set? If so, is one of the options "Indefinite"? That is, effectively turn off the streaming feature?

Try using a software terminal to connect directly to the logger. I like minicom, because it just requires a simple TTY terminal (no graphics necessary):

sudo apt-get install minicom
minicom -b 19200 -D /dev/ttyS0

... and see what comes out. Does it show a continual stream of APRS TNC commands? Nothing? If the latter, try testing the connection by typing "TEST", all in capital letters, then <enter>. It should echo "TEST". 

If that works, then try sending a few LOOP commands by typing "LOOP 5", agin in capital letters. This should send back 5 LOOP packets, spaced about 2-3 seconds apart. They will look like gibberish because they use binary encoding.

Let me know what you find.

-tk


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

K1DRT

unread,
Mar 22, 2013, 12:46:39 PM3/22/13
to weewx...@googlegroups.com

I had already installed minicom and confirmed that TEST did echo TEST. LOOP 5 seems a bit unpredictable - some attempts return nothing at all, but occasionally, an attempt will return a string of characters (but only one string is returned, immediately).  There does not appear to be any continuously streaming data coming in.

Thomas Keffer

unread,
Mar 22, 2013, 5:16:03 PM3/22/13
to weewx...@googlegroups.com
Dan,

I've put in a support email to Davis about how to turn on and off the APRS streaming mode. We'll see what they say.

-tk

On Fri, Mar 22, 2013 at 9:46 AM, K1DRT <dan.te...@gmail.com> wrote:

I had already installed minicom and confirmed that TEST did echo TEST. LOOP 5 seems a bit unpredictable - some attempts return nothing at all, but occasionally, an attempt will return a string of characters (but only one string is returned, immediately).  There does not appear to be any continuously streaming data coming in.

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

Thomas Keffer

unread,
Mar 28, 2013, 6:40:34 PM3/28/13
to weewx...@googlegroups.com
Hi, Dan

I've heard back from Davis. The details are still a little hazy to me, but it looks like the APRS streaming mode kicks in any time there is no serial communications to or from the console:

Serial traffic is any bits going into the datalogger.  The 5 second time out… (this is changeable with the streaming datalogger utility that shipped with the Weatherlink software.  )…the 5 second timeout is after no traffic, in or out…so 5 seconds after your 200 LOOP packets end it will resume regurgitating APRS packets.

This brings in mind something you can try: I'm a little skeptical that the APRS streaming doesn't kick in until the full 200 LOOP packets are returned --- your experience suggests otherwise. So, we can try requesting only 2 packets at a time. That way, there will always be inbound traffic going to the console.

To do this, could you go to the file bin/weewx/VantagePro.py and change the line (should be about line 409) that looks like

  for _loopPacket in self.genDavisLoopPackets(200):

to

  for _loopPacket in self.genDavisLoopPackets(2):

and try again? Let me know if this is more stable. 

-tk

Clive

unread,
Jun 28, 2013, 10:18:21 AM6/28/13
to weewx...@googlegroups.com
Hi Tom,

I have been having random problems with, " ****  Expected to read 99 chars; got 0 instead " errors.

So I modified the code from 200 to 2, and so far it seems to be working.  Can you explain what this code is doing?

I took a long time to find the file! Just a note to anyone else, it was located in  /usr/share/weewx/weewx/drivers and called vantage.py


Clive

unread,
Jun 28, 2013, 5:37:14 PM6/28/13
to weewx...@googlegroups.com
Well spoke too soon, that doesn't fix it either.  Just fills up the log files with LOOP's very 2 seconds!

Thomas Keffer

unread,
Jun 28, 2013, 5:39:23 PM6/28/13
to weewx-user
Unless you are using the APRS version of the logger, I don't see why it would make any difference.

Do you have a USB version of the logger? If so, and if you are getting lots of read errors, try putting in some ferrite coils. See the documentation.

-tk


On Fri, Jun 28, 2013 at 2:37 PM, Clive <cli...@gmail.com> wrote:
Well spoke too soon, that doesn't fix it either.  Just fills up the log files with LOOP's very 2 seconds!

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

Steve M

unread,
Nov 26, 2013, 8:03:55 PM11/26/13
to weewx...@googlegroups.com
Hi, I am wondering if there has been a successful outcome with using the APRS logger, I am trying to interface with mine and having the same issue.
I did change the value as shown and it is now generating images, but not with fresh data.
Thanks!

Thomas Keffer

unread,
Nov 27, 2013, 6:41:06 AM11/27/13
to weewx-user
Try the tips in the User's Guide section Weewx generates HTML pages, but it does not update them.

-tk


Steve M

unread,
Nov 27, 2013, 1:37:06 PM11/27/13
to weewx...@googlegroups.com

Ok. I got it working as normal now.
I simply used the streaming data utility which is included in the 6540 software (in a subdirectory under weatherlink) to adjust the timeout period from 5 sec to 255 sec (which seems to be the max value)
I have changed the value in vantage.py back to the original 200.  All is well.

for _loopPacket in self.genDavisLoopPackets(200):

Thanks for this great software by the way! I had been wanting to run the reporting and logging interface in linux/mysql since I got the station in 2004 but lacked the skill to pull off such a coding feat! finally have it working with weewx on raspberry pi and using my qnap nas for mysql and apache.

Thomas Keffer

unread,
Nov 27, 2013, 1:57:02 PM11/27/13
to weewx-user
I had no idea there was such a utility. I also don't see how they do this: there is nothing in the programming API that indicates it's possible.

Perhaps you could write up your experience on the wiki?

Glad to hear all is working.

-tk


--

Niels Østergaard

unread,
May 12, 2014, 4:20:38 PM5/12/14
to weewx...@googlegroups.com
It seems I am having a problem that very much resembles this one. when running in display-mode (not as daemon) the data is looped all-right, and it seems to get to the database (I have configured MySql), but it does not generate HTML.

I dont have a cd-drive and a PC at hand to make any changes in the settings of the datalogging module.

Is this the same problem, and if, is there another fix?

I run 2.6.3 on a Raspberry Pi connected via a serial version of the logger (with a level conversion circuit). The station is a Vantage Pro2.

- Niels

Thomas Keffer

unread,
May 12, 2014, 6:22:25 PM5/12/14
to weewx-user
Niels, this problem is unique to the 6540 "APRS" logger. Is this what you have?

-tk


For more options, visit https://groups.google.com/d/optout.

Niels Østergaard

unread,
May 14, 2014, 4:42:46 PM5/14/14
to weewx...@googlegroups.com
Just checked, and found out my datalogger is the "standard" 6510SER. So this problem is not the one my installation suffers.
Maybe I should start at new thread, but I will try to explain a bit more about the problem that I am dealing with here:

The installation process did go smooth, and it seems to be quite ok. The achive-folder was created, and I succeded with a MySQL setup, so it is now using the database for storing.

I have only run in display-mode, not as a daemon yet, as I think I should iron out all problems before changing to daemon.

The public_html folder is not created, and when running the process crashes at random intervals no longer than about an hour, often far less.

Right now it is running, but in the Syslog it seems it is restarting about every minute. I am not able to tell what is happening:

May 14 22:29:19 hvalpsundvejr weewx[4336]: wxengine: Starting up weewx version 2.6.3 May 14 22:29:19 hvalpsundvejr weewx[4336]: vantage: successfully woke up console May 14 22:29:19 hvalpsundvejr weewx[4336]: wxengine: Clock error is -1.20 seconds (positive is fast) May 14 22:29:19 hvalpsundvejr weewx[4336]: vantage: Getting archive packets since 2014-05-14 22:00:00 CEST (1400097600) May 14 22:29:20 hvalpsundvejr weewx[4336]: vantage: successfully woke up console May 14 22:29:20 hvalpsundvejr weewx[4336]: vantage: Retrieving 0 page(s); starting index= 0 May 14 22:29:20 hvalpsundvejr weewx[4336]: wxengine: Starting main packet loop. May 14 22:29:20 hvalpsundvejr weewx[4336]: vantage: successfully woke up console May 14 22:29:20 hvalpsundvejr weewx[4336]: vantage: Requesting 200 LOOP packets. May 14 22:29:21 hvalpsundvejr weewx[4336]: vantage: successfully woke up console May 14 22:29:23 hvalpsundvejr weewx[4336]: vantage: LOOP #3; CRC error. Try #1 May 14 22:29:25 hvalpsundvejr weewx[4336]: vantage: LOOP #4; CRC error. Try #2 May 14 22:29:25 hvalpsundvejr weewx[4336]: vantage: LOOP #5; CRC error. Try #3 May 14 22:29:28 hvalpsundvejr weewx[4336]: vantage: LOOP #6; CRC error. Try #4 May 14 22:29:28 hvalpsundvejr weewx[4336]: vantage: Max retries (4) exceeded. May 14 22:29:28 hvalpsundvejr weewx[4336]: vantage: successfully woke up console May 14 22:29:28 hvalpsundvejr weewx[4336]: wxengine: Caught WeeWxIOError: Max retries exceeded while getting LOOP data. May 14 22:29:28 hvalpsundvejr weewx[4336]:     ****  Waiting 60 seconds then retrying... May 14 22:30:28 hvalpsundvejr weewx[4336]: wxengine: retrying... May 14 22:30:28 hvalpsundvejr weewx[4336]: wxengine: Using configuration file /home/weewx/2.6.3/weewx.conf May 14 22:30:28 hvalpsundvejr weewx[4336]: wxengine: Loading station type Vantage (weewx.drivers.vantage) May 14 22:30:28 hvalpsundvejr weewx[4336]: vantage: Opened up serial port /dev/ttyAMA0, baudrate 19200 May 14 22:30:30 hvalpsundvejr weewx[4336]: vantage: successfully woke up console May 14 22:30:31 hvalpsundvejr weewx[4336]: wxengine: Loading service weewx.wxengine.StdTimeSynch May 14 22:30:31 hvalpsundvejr weewx[4336]: wxengine: Finished loading service weewx.wxengine.StdTimeSynch May 14 22:30:31 hvalpsundvejr weewx[4336]: wxengine: Loading service weewx.wxengine.StdConvert May 14 22:30:31 hvalpsundvejr weewx[4336]: wxengine: StdConvert target unit is 0x1 May 14 22:30:31 hvalpsundvejr weewx[4336]: wxengine: Finished loading service weewx.wxengine.StdConvert May 14 22:30:31 hvalpsundvejr weewx[4336]: wxengine: Loading service weewx.wxengine.StdCalibrate May 14 22:30:31 hvalpsundvejr weewx[4336]: wxengine: Finished loading service weewx.wxengine.StdCalibrate May 14 22:30:31 hvalpsundvejr weewx[4336]: wxengine: Loading service weewx.wxengine.StdQC May 14 22:30:31 hvalpsundvejr weewx[4336]: wxengine: Finished loading service weewx.wxengine.StdQC May 14 22:30:31 hvalpsundvejr weewx[4336]: wxengine: Loading service weewx.wxengine.StdArchive May 14 22:30:31 hvalpsundvejr weewx[4336]: wxengine: Record generation will be attempted in 'hardware' May 14 22:30:31 hvalpsundvejr weewx[4336]: wxengine: Using archive interval of 1800 seconds May 14 22:30:31 hvalpsundvejr weewx[4336]: wxengine: Use LOOP data in hi/low calculations: 1 May 14 22:30:31 hvalpsundvejr weewx[4336]: wxengine: Using archive database: archive_mysql May 14 22:30:31 hvalpsundvejr weewx[4336]: stats: Schema exists with 16 elements May 14 22:30:31 hvalpsundvejr weewx[4336]: stats: Backfilling stats database. May 14 22:30:31 hvalpsundvejr weewx[4336]: stats: stats database up to date. May 14 22:30:31 hvalpsundvejr weewx[4336]: wxengine: Using stats database: stats_mysql May 14 22:30:31 hvalpsundvejr weewx[4336]: wxengine: Finished loading service weewx.wxengine.StdArchive May 14 22:30:31 hvalpsundvejr weewx[4336]: wxengine: Loading service weewx.restx.StdStationRegistry May 14 22:30:31 hvalpsundvejr weewx[4336]: restx: StationRegistry: Registration not requested. May 14 22:30:31 hvalpsundvejr weewx[4336]: wxengine: Finished loading service weewx.restx.StdStationRegistry May 14 22:30:31 hvalpsundvejr weewx[4336]: wxengine: Loading service weewx.restx.StdWunderground May 14 22:30:31 hvalpsundvejr weewx[4336]: restx: Wunderground: Data will not be posted: Missing option ‘station'
May 14 22:30:31 hvalpsundvejr weewx[4336]: wxengine: Loading service weewx.restx.StdWunderground May 14 22:30:31 hvalpsundvejr weewx[4336]: restx: Wunderground: Data will not be posted: Missing option 'station' May 14 22:30:31 hvalpsundvejr weewx[4336]: wxengine: Finished loading service weewx.restx.StdWunderground May 14 22:30:31 hvalpsundvejr weewx[4336]: wxengine: Loading service weewx.restx.StdPWSweather May 14 22:30:31 hvalpsundvejr weewx[4336]: restx: PWSWeather: Data will not be posted: Missing option 'station' May 14 22:30:31 hvalpsundvejr weewx[4336]: wxengine: Finished loading service weewx.restx.StdPWSweather May 14 22:30:31 hvalpsundvejr weewx[4336]: wxengine: Loading service weewx.restx.StdCWOP May 14 22:30:31 hvalpsundvejr weewx[4336]: restx: CWOP: Data will not be posted. Missing option: 'station' May 14 22:30:31 hvalpsundvejr weewx[4336]: wxengine: Finished loading service weewx.restx.StdCWOP May 14 22:30:31 hvalpsundvejr weewx[4336]: wxengine: Loading service weewx.restx.StdWOW May 14 22:30:31 hvalpsundvejr weewx[4336]: restx: WOW: Data will not be posted: Missing option 'station' May 14 22:30:31 hvalpsundvejr weewx[4336]: wxengine: Finished loading service weewx.restx.StdWOW May 14 22:30:31 hvalpsundvejr weewx[4336]: wxengine: Loading service weewx.restx.StdAWEKAS May 14 22:30:31 hvalpsundvejr weewx[4336]: restx: AWEKAS: Data will not be posted: Missing option 'username' May 14 22:30:31 hvalpsundvejr weewx[4336]: wxengine: Finished loading service weewx.restx.StdAWEKAS May 14 22:30:31 hvalpsundvejr weewx[4336]: wxengine: Loading service weewx.wxengine.StdPrint May 14 22:30:31 hvalpsundvejr weewx[4336]: wxengine: Finished loading service weewx.wxengine.StdPrint May 14 22:30:31 hvalpsundvejr weewx[4336]: wxengine: Loading service weewx.wxengine.StdReport May 14 22:30:31 hvalpsundvejr weewx[4336]: wxengine: Finished loading service weewx.wxengine.StdReport May 14 22:30:31 hvalpsundvejr weewx[4336]: wxengine: Starting up weewx version 2.6.3 May 14 22:30:31 hvalpsundvejr weewx[4336]: vantage: successfully woke up console May 14 22:30:31 hvalpsundvejr weewx[4336]: wxengine: Clock error is -1.19 seconds (positive is fast) May 14 22:30:31 hvalpsundvejr weewx[4336]: vantage: Getting archive packets since 2014-05-14 22:00:00 CEST (1400097600) May 14 22:30:32 hvalpsundvejr weewx[4336]: vantage: successfully woke up console May 14 22:30:32 hvalpsundvejr weewx[4336]: vantage: Retrieving 1 page(s); starting index= 1 May 14 22:30:32 hvalpsundvejr weewx[4336]: archive: added record 2014-05-14 22:30:00 CEST (1400099400) to database 'weewx'; table 'archive' May 14 22:30:33 hvalpsundvejr weewx[4336]: vantage: DMPAFT complete: page timestamp 2014-02-20 08:00:00 CET (1392879600) less than final timestamp 2014-05-14 22:30:00 CEST (1400099400) May 14 22:30:33 hvalpsundvejr weewx[4336]: vantage: Catch up complete. May 14 22:30:33 hvalpsundvejr weewx[4336]: wxengine: Starting main packet loop. May 14 22:30:33 hvalpsundvejr weewx[4336]: vantage: successfully woke up console May 14 22:30:33 hvalpsundvejr weewx[4336]: vantage: Requesting 200 LOOP packets. May 14 22:30:34 hvalpsundvejr weewx[4336]: vantage: successfully woke up console May 14 22:30:35 hvalpsundvejr weewx[4336]: vantage: LOOP #2; CRC error. Try #1 May 14 22:30:36 hvalpsundvejr weewx[4336]: vantage: LOOP #3; CRC error. Try #2 May 14 22:30:37 hvalpsundvejr weewx[4336]: vantage: LOOP #4; CRC error. Try #3 May 14 22:30:39 hvalpsundvejr weewx[4336]: vantage: LOOP #5; CRC error. Try #4 May 14 22:30:39 hvalpsundvejr weewx[4336]: vantage: Max retries (4) exceeded. May 14 22:30:40 hvalpsundvejr weewx[4336]: vantage: successfully woke up console May 14 22:30:40 hvalpsundvejr weewx[4336]: wxengine: Caught WeeWxIOError: Max retries exceeded while getting LOOP data. May 14 22:30:40 hvalpsundvejr weewx[4336]:     ****  Waiting 60 seconds then retrying... 

Niels Østergaard

unread,
May 14, 2014, 4:48:58 PM5/14/14
to weewx...@googlegroups.com
An update:
It now crashed with the following error on the promptline:
Traceback (most recent call last):  File "./bin/weewxd", line 68, in <module>    weewx.wxengine.main(options, args)  File "/home/weewx/2.6.3/bin/weewx/wxengine.py", line 948, in main    engine = EngineClass(config_dict)  File "/home/weewx/2.6.3/bin/weewx/wxengine.py", line 68, in __init__    self.setupStation(config_dict)  File "/home/weewx/2.6.3/bin/weewx/wxengine.py", line 100, in setupStation    self.console = loader_function(config_dict, self)  File "/home/weewx/2.6.3/bin/weewx/drivers/vantage.py", line 29, in loader    service = VantageService(engine, config_dict)  File "/home/weewx/2.6.3/bin/weewx/drivers/vantage.py", line 1420, in __init__    Vantage.__init__(self, **config_dict['Vantage'])  File "/home/weewx/2.6.3/bin/weewx/drivers/vantage.py", line 391, in __init__    self._setup()  File "/home/weewx/2.6.3/bin/weewx/drivers/vantage.py", line 893, in _setup    self.rain_year_start   = self._getEEPROM_value(0x2C)[0]  File "/home/weewx/2.6.3/bin/weewx/drivers/vantage.py", line 952, in _getEEPROM_value    raise weewx.RetriesExceeded("While getting EEPROM data value at address 0x%X" % offset) weewx.RetriesExceeded: While getting EEPROM data value at address 0x2C
In the syslog, the last entries are:

May 14 22:39:57 hvalpsundvejr weewx[4336]: wxengine: Starting up weewx version 2.6.3

May 14 22:39:57 hvalpsundvejr weewx[4336]: vantage: successfully woke up console

May 14 22:39:57 hvalpsundvejr weewx[4336]: wxengine: Clock error is -1.26 seconds (positive is fas$

May 14 22:39:57 hvalpsundvejr weewx[4336]: vantage: Getting archive packets since 2014-05-14 22:30$

May 14 22:39:58 hvalpsundvejr weewx[4336]: vantage: successfully woke up console

May 14 22:39:58 hvalpsundvejr weewx[4336]: vantage: Retrieving 0 page(s); starting index= 0

May 14 22:39:58 hvalpsundvejr weewx[4336]: wxengine: Starting main packet loop.

May 14 22:39:58 hvalpsundvejr weewx[4336]: vantage: successfully woke up console

May 14 22:39:58 hvalpsundvejr weewx[4336]: vantage: Requesting 200 LOOP packets.

May 14 22:39:59 hvalpsundvejr weewx[4336]: vantage: successfully woke up console

May 14 22:40:01 hvalpsundvejr weewx[4336]: vantage: LOOP #3; CRC error. Try #1

May 14 22:40:03 hvalpsundvejr weewx[4336]: vantage: LOOP #4; CRC error. Try #2

May 14 22:40:03 hvalpsundvejr weewx[4336]: vantage: LOOP #5; CRC error. Try #3

May 14 22:40:06 hvalpsundvejr weewx[4336]: vantage: LOOP #6; CRC error. Try #4

May 14 22:40:06 hvalpsundvejr weewx[4336]: vantage: Max retries (4) exceeded.

May 14 22:40:06 hvalpsundvejr weewx[4336]: vantage: successfully woke up console

May 14 22:40:06 hvalpsundvejr weewx[4336]: wxengine: Caught WeeWxIOError: Max retries exceeded whi$

May 14 22:40:06 hvalpsundvejr weewx[4336]:     ****  Waiting 60 seconds then retrying...

May 14 22:41:06 hvalpsundvejr weewx[4336]: wxengine: retrying...

May 14 22:41:06 hvalpsundvejr weewx[4336]: wxengine: Using configuration file /home/weewx/2.6.3/we$

May 14 22:41:06 hvalpsundvejr weewx[4336]: wxengine: Loading station type Vantage (weewx.drivers.v$

May 14 22:41:06 hvalpsundvejr weewx[4336]: vantage: Opened up serial port /dev/ttyAMA0, baudrate 1$

May 14 22:41:07 hvalpsundvejr weewx[4336]: vantage: successfully woke up console

May 14 22:41:07 hvalpsundvejr weewx[4336]: vantage: No <ACK> received from console

May 14 22:41:07 hvalpsundvejr weewx[4336]: vantage: No <ACK> received from console

May 14 22:41:07 hvalpsundvejr weewx[4336]: vantage: No <ACK> received from console

May 14 22:41:07 hvalpsundvejr weewx[4336]: vantage: No <ACK> received from console

May 14 22:41:07 hvalpsundvejr weewx[4336]: vantage: Max retries exceeded while getting EEPROM data$

May 14 22:41:07 hvalpsundvejr weewx[4336]: wxengine: Unable to open WX station hardware: While get$

The time from start to the time when the process crashed was about 19 minutes this time.. 

Thomas Keffer

unread,
May 14, 2014, 9:10:09 PM5/14/14
to weewx-user
You are definitely having a communication problem between the RPi and the Vantage.

Things to try:

Does the Vantage configuration program successfully query the station?

wee_config_vantage --info

Do you have another serial to USB converter you can try?

Are there other things plugged into the RPi USB ports?

-tk

Niels Østergaard

unread,
May 15, 2014, 3:28:38 AM5/15/14
to weewx...@googlegroups.com
Hi Tom, thanks for taking your time with my problem.

It might be a configuration problem.
When i Query i get this:

weewx@hvalpsundvejr ~/2.6.3 $ ./bin/wee_config_vantage --info

No configuration file specified, and none found in any of:

  /etc/weewx, /home/weewx

I am not using the usb-port at all, but have connected the Vantage logger to a MAX3232 level shifter that is connected to the Rpi.
I am pretty sure the connection is fine. Using minicom I have fine communication, and when running weewx the loop data is flowing it seems.
but once in a while there seems to be no answer.
When looking in syslog, it seems that weewx is starting over again without crashing. about every 60 seconds..

-noe

Niels Østergaard

unread,
May 15, 2014, 3:56:57 AM5/15/14
to weewx...@googlegroups.com
OK -  sorry - didn't think...
Offcourse there was no configuration, as my weewx directory is /home/weewx/2.6.3

when run, the configuration query says:

Using configuration file weewx.conf.

Querying...

Davis Vantage EEPROM settings:

    

    CONSOLE TYPE:                   VantagePro2

    

    CONSOLE FIRMWARE:

      Date:                         Dec 11 2012

      Version:                      3.12

    

    CONSOLE SETTINGS:

      Archive interval:             1800 (seconds)

      Altitude:                     7 (meter)

      Wind cup type:                large

      Rain bucket type:             0.2 MM

      Rain year start:              1

      Onboard time:                 2014-05-15 09:54:01

      

    CONSOLE DISPLAY UNITS:

      Barometer:                    hPa

      Temperature:                  degree_10F

      Rain:                         mm

      Wind:                         meter_per_second

      

    CONSOLE STATION INFO:

      Latitude (onboard):           56.7

      Longitude (onboard):          9.2

      Use manual or auto DST?       AUTO

      DST setting:                  N/A

      Use GMT offset or zone code?  ZONE_CODE

      Time zone code:               20

      GMT offset:                   N/A

        

    RECEPTION STATS:

      Total packets received:       13860

      Total packets missed:         44

      Number of resynchronizations: 0

      Longest good stretch:         1743

      Number of CRC errors:         31

      

Unable to wake up console... sleeping

Unable to wake up console... retrying

    BAROMETER CALIBRATION DATA:

      Current barometer reading:    30.344 inHg

      Altitude:                     7 feet

      Dew point:                    49 F

      Virtual temperature:          50 F

      Humidity correction factor:   24

      Correction ratio:             1.000

      Correction constant:          +0.000 inHg

      Gain:                         0.000

      Offset:                       -40.000

Niels Østergaard

unread,
May 15, 2014, 3:59:33 AM5/15/14
to weewx...@googlegroups.com
Could it be related to:
snip
Archive interval:             1800 (seconds)
snip

Longest good stretch:         1743

snip

?

Thomas Keffer

unread,
May 15, 2014, 8:56:43 AM5/15/14
to weewx-user
The frequent CRC errors and inability to wake up the console all point to a connectivity problem. The problem is most likely in the level shifter or its driver. I've never tried one, so I can't help you there.

Do you have a serial to USB converter handy that you can try?

-tk

Niels Østergaard

unread,
May 23, 2014, 11:19:17 AM5/23/14
to weewx...@googlegroups.com
Hi again

This is a bit weird.

I finally had the time to go digging in the small boxes for a USB-interface.
The only one to find was with a TTL-interface.

So, although suspecting the levelshifter is the problem, I coupled the Vantage to the USB using the serial cable AND the levelshifter.
I expected to get the same errors, but no. In the log there is no CRC, and the HTML is now generated (I havent opened the pages to see, (will have to do a little configuration setting of rights to have it created in the right folder i guess).

So the conclusion must be that the levelshifter is OK. This leaves the Raspberry Serial pins as the suspects. Or a compatibility-problem between the (simple) levelshifter and the Rpi.

Although it is great news that I now have it running, I was hoping to find a solution using the serial port instead of USB, as I have read a lot about problems maintaining the connection on the USB port.

But thanks for the suggestion, think I will have to look deeper into the serial port thing...

/NOE

Thomas Keffer

unread,
May 23, 2014, 11:37:30 AM5/23/14
to weewx-user
The Vantage USB ports are not so bad. You just have to make sure to put ferrite cores on the cable.

I use one on my home stations and only very rarely have any problems.

Can't speak for the RPi end of the USB connection, though.

I'd say give it a try and see if you like it.

-tk
Reply all
Reply to author
Forward
0 new messages