Can't get LOOP packets from WiFi logger

610 views
Skip to first unread message

cfor...@gmail.com

unread,
Nov 24, 2018, 7:37:26 PM11/24/18
to weewx-user
I've got my WiFi logger up and running and it mostly seems to work. It reports to Weather Underground (including rapid fire updates), the Met Office WOW, and my FTP site. WeeWx sees the WiFi logger and can get the archive packets, but not the LOOP packets. It always times out. I've fiddled with the tcp_send_delay, timeout, and max_tries settings in weewx.conf, but nothing helps.

Output of weewx_debug is attached.

A snippet from syslog is below. You can see weewx gets the archive packets, but fails with LOOP packets. I'm not sure how to go about debugging this from here. Maybe this isn't a weewx problem? Can anyone offer some other avenues I should explore?


Nov 24 19:10:00 raspberrypi weewx[3148]: vantage: Gentle wake up of console successful
Nov 24 19:10:15 raspberrypi weewx[3148]: vantage: ip-read error: timed out
Nov 24 19:10:15 raspberrypi weewx[3148]: vantage: LOOP try #3; error: timed out
Nov 24 19:10:15 raspberrypi weewx[3148]: vantage: Requesting 200 LOOP packets.
Nov 24 19:10:20 raspberrypi weewx[3148]: vantage: ip-read error: timed out
Nov 24 19:10:20 raspberrypi weewx[3148]: vantage: Retry  #0 failed
Nov 24 19:10:25 raspberrypi weewx[3148]: vantage: ip-read error: timed out
Nov 24 19:10:25 raspberrypi weewx[3148]: vantage: Retry  #1 failed
Nov 24 19:10:30 raspberrypi weewx[3148]: vantage: ip-read error: timed out
Nov 24 19:10:30 raspberrypi weewx[3148]: vantage: Retry  #2 failed
Nov 24 19:10:32 raspberrypi weewx[3148]: vantage: Gentle wake up of console successful
Nov 24 19:10:33 raspberrypi weewx[3148]: vantage: No <ACK> received from console
Nov 24 19:10:33 raspberrypi weewx[3148]: vantage: LOOP try #4; error: No <ACK> received from Vantage console
Nov 24 19:10:33 raspberrypi weewx[3148]: vantage: Requesting 200 LOOP packets.
Nov 24 19:10:38 raspberrypi weewx[3148]: vantage: ip-read error: timed out
Nov 24 19:10:38 raspberrypi weewx[3148]: vantage: Retry  #0 failed
Nov 24 19:10:39 raspberrypi weewx[3148]: vantage: Gentle wake up of console successful
Nov 24 19:10:40 raspberrypi weewx[3148]: vantage: Getting archive packets since 2018-11-24 19:05:00 EST (1543104300)
Nov 24 19:10:45 raspberrypi weewx[3148]: vantage: ip-read error: timed out
Nov 24 19:10:45 raspberrypi weewx[3148]: vantage: Retry  #0 failed
Nov 24 19:10:46 raspberrypi weewx[3148]: vantage: Gentle wake up of console successful
Nov 24 19:10:48 raspberrypi weewx[3148]: vantage: Retrieving 1 page(s); starting index= 0
Nov 24 19:10:49 raspberrypi weewx[3148]: engine: 2018-11-24 19:10:00 EST (1543104600) Archive value 'leafWet1' 8.0 outside limits (0.0001, 0.0002)
Nov 24 19:10:49 raspberrypi weewx[3148]: engine: 2018-11-24 19:10:00 EST (1543104600) Archive value 'leafWet2' 8.0 outside limits (0.0001, 0.0002)
Nov 24 19:10:49 raspberrypi weewx[3148]: engine: 2018-11-24 19:10:00 EST (1543104600) Archive value 'soilTemp1' -74.0 outside limits (0.0001, 0.0002)
Nov 24 19:10:49 raspberrypi weewx[3148]: engine: 2018-11-24 19:10:00 EST (1543104600) Archive value 'soilTemp2' -90.0 outside limits (0.0001, 0.0002)
Nov 24 19:10:49 raspberrypi weewx[3148]: engine: 2018-11-24 19:10:00 EST (1543104600) Archive value 'soilTemp3' -74.0 outside limits (0.0001, 0.0002)
Nov 24 19:10:49 raspberrypi weewx[3148]: engine: 2018-11-24 19:10:00 EST (1543104600) Archive value 'soilTemp4' -90.0 outside limits (0.0001, 0.0002)
Nov 24 19:10:49 raspberrypi weewx[3148]: engine: 2018-11-24 19:10:00 EST (1543104600) Archive value 'soilMoist1' 32.0 outside limits (0.0001, 0.0002)
Nov 24 19:10:49 raspberrypi weewx[3148]: engine: 2018-11-24 19:10:00 EST (1543104600) Archive value 'soilMoist3' 32.0 outside limits (0.0001, 0.0002)
Nov 24 19:10:49 raspberrypi weewx[3148]: engine: 2018-11-24 19:10:00 EST (1543104600) Archive value 'soilMoist4' 32.0 outside limits (0.0001, 0.0002)
Nov 24 19:10:49 raspberrypi weewx[3148]: engine: 2018-11-24 19:10:00 EST (1543104600) Archive value 'soilMoist2' 8.0 outside limits (0.0001, 0.0002)
Nov 24 19:10:49 raspberrypi weewx[3148]: engine: 2018-11-24 19:10:00 EST (1543104600) Archive value 'leafTemp2' -90.0 outside limits (0.0001, 0.0002)
Nov 24 19:10:49 raspberrypi weewx[3148]: engine: 2018-11-24 19:10:00 EST (1543104600) Archive value 'leafTemp1' -82.0 outside limits (0.0001, 0.0002)
Nov 24 19:10:49 raspberrypi weewx[3148]: manager: Added record 2018-11-24 19:10:00 EST (1543104600) to database 'weewx.sdb'
Nov 24 19:10:49 raspberrypi weewx[3148]: manager: Added record 2018-11-24 19:10:00 EST (1543104600) to daily summary in 'weewx.sdb'
Nov 24 19:10:49 raspberrypi weewx[3148]: vantage: Empty record page 0; index 1
Nov 24 19:10:49 raspberrypi weewx[3148]: reportengine: Running reports for latest time in the database.



Charlie
--
Earth, USA, GA, Atlanta

weewx_debug_20181124.txt

cfor...@gmail.com

unread,
Nov 25, 2018, 10:40:18 PM11/25/18
to weewx-user

On Saturday, November 24, 2018 at 7:37:26 PM UTC-5, cfor...@gmail.com wrote:
WeeWx sees the WiFi logger and can get the archive packets, but not the LOOP packets. It always times out.

It looks like the time out problems were caused by the TCP settings of the WiFiLogger, not weewx.

I know this isn't a WiFiLogger forum, but in the interest of anyone that stumbles upon this same problem here's how I fixed things: In the WiFiLogger I changed Setup > System > General Settings > TCP Port to Auto-Pause. This is with WiFiLogger firmware 1.23. The timeout problems now seem to be gone and weewx can get the LOOP packets as normal.



Charlie

loonsailor

unread,
Sep 22, 2020, 7:54:12 PM9/22/20
to weewx-user
Charlie, thanks for posting this!  I'm switching from my ancient vantage pro, connected via lantronix serial<->ethernet to a shiny new vantage pro 2 with the WiFiLogger 2 (firmware 2.33).  I ran into the same problem:

Sep 22 10:56:59 ubu-mini-weather weewx[178549] INFO weewx.manager: Starting backfill of daily summaries

Sep 22 10:57:00 ubu-mini-weather weewx[178549] INFO weewx.engine: Starting main packet loop.

Sep 22 10:58:02 ubu-mini-weather weewx[178549] ERROR weewx.drivers.vantage: LOOP try #1; error: Expected 99 characters; got zero instead

Sep 22 10:58:02 ubu-mini-weather weewx[178549] ERROR weewx.drivers.vantage: LOOP try #2; error: Expected 99 characters; got zero instead

Sep 22 10:58:02 ubu-mini-weather weewx[178549] ERROR weewx.drivers.vantage: LOOP try #3; error: Expected 99 characters; got zero instead

Sep 22 10:58:02 ubu-mini-weather weewx[178549] ERROR weewx.drivers.vantage: LOOP try #4; error: Expected 99 characters; got zero instead

Sep 22 10:58:02 ubu-mini-weather weewx[178549] ERROR weewx.drivers.vantage: LOOP max tries (4) exceeded.

Sep 22 10:58:02 ubu-mini-weather weewx[178549] INFO weewx.engine: Main loop exiting. Shutting engine down.

Sep 22 10:58:02 ubu-mini-weather weewx[178549] CRITICAL __main__: Caught WeeWxIOError: Max tries exceeded while getting LOOP data.

Sep 22 10:58:02 ubu-mini-weather weewx[178549] CRITICAL __main__:     ****  Waiting 60 seconds then retrying...

After several frustrating hours of trying to fix it, I searched the forum and found your post.  Sure enough, changing the WiFiLogger configuration Setup > System > General Settings > TCP Port to Pause (there was no "auto-pause") fixed the problem, and it's running great now.  Going through the log, I still find a couple of the loop errors, but they're rare now, and the retry gets it right.

A couple of checklist items for anybody else doing this.  The weewx config items are all in the Vantage section of weewx.conf.  The wfl items are set using a browser to access the web server built into the wfl.
  • Make sure the WiFiLogger (wfl) port number (setup->wiFi setup->tcp port settings, default 22222)  matches weewx.conf items tcp_port and port.  Actually, the "port" item is probably not used, but I just set them both.
  • Make sure the wfl is at a fixed ip address on your lan, and that weewx.conf "host" is set to that address.  You can fix the IP address either in your router (preferable, IMHO) or on the wfl itself (Setup->WiFi Setup->Connect to Router->Advanced Options).
  • I'm using loop type 2 (loop_request = 2 in weewx.conf), but I'm not sure this matters.
  • Make sure the archive intervals match.  In weewx.conf it's archive_interval in the StdArchive section.  On the wfl it's Setup->Weather Station Setup->Set Archive Interval, BUT the units are seconds in weewx.conf, minutes in wfl.  So, mine are 10 minutes on the wfl, 600 in weewx.conf.
I haven't had it running for long, but it's very nice to have a wireless connection to the Davis console, and to stick my old Lantronix on a shelf.

Thanks again for posting the fix, Charlie.

Graham Eddy

unread,
Sep 24, 2020, 10:13:57 AM9/24/20
to weewx...@googlegroups.com
the wifi logger looks attractive, for getting rid of the cable.
could someone tell me the firmware version of my davis vp2 envoy? i haven’t updated it for a while :-) but my console is older. wifi logger needs vp2 v1.9+.
wee_device says:
    CONSOLE FIRMWARE:
      Date:                         Apr 10 2006
      Version:                      <Unavailable>

On 23 Sep 2020, at 9:54 am, 'loonsailor' via weewx-user <weewx...@googlegroups.com> wrote:

WiFiLogger 2 (firmware 2.33)

loonsailor

unread,
Sep 24, 2020, 2:14:24 PM9/24/20
to weewx-user
I'm still getting the LOOP errors, not every time, so the system does work, but more often than I like.  Once every few hours it will exhaust all 4 retries and I lose a record.

I'm continuing to play with some parameters, both in weewx.conf and on the WFL.  I'll update when I know more.

loonsailor

unread,
Sep 25, 2020, 3:14:51 PM9/25/20
to weewx-user
I wanted to provide a status update, and see if anybody else has any experience with the WiFiLogger that's similar to this, or has any ideas.

Ryan, I'm having problems with the WiFiLogger2.  I'm reading it with weeWx.  There is no email address on wifilogger.net, so I don't know how to reach out the the developer directly.

It took a while to get the parameters on the WFL right, but I got it working, mostly.  However, I still get lots of errors.  Here is the weeWx error log for the last few hours:

Sep 25 05:17:56 ubu-mini-weather weewx[198474] ERROR weewx.drivers.vantage: ip-read error: [Errno 104] Connection reset by peer

Sep 25 05:17:56 ubu-mini-weather weewx[198474] ERROR weewx.drivers.vantage: LOOP try #1; error: [Errno 104] Connection reset by peer

Sep 25 05:17:56 ubu-mini-weather weewx[198474] ERROR weewx.drivers.vantage: LOOP try #2; error: Expected 99 characters; got zero instead

Sep 25 05:17:56 ubu-mini-weather weewx[198474] ERROR weewx.drivers.vantage: LOOP try #3; error: Expected 99 characters; got zero instead

Sep 25 05:17:56 ubu-mini-weather weewx[198474] ERROR weewx.drivers.vantage: LOOP try #4; error: Expected 99 characters; got zero instead

Sep 25 05:17:56 ubu-mini-weather weewx[198474] ERROR weewx.drivers.vantage: LOOP max tries (4) exceeded.

Sep 25 05:17:56 ubu-mini-weather weewx[198474] ERROR weewx.drivers.vantage: ip-write error: [Errno 32] Broken pipe

Sep 25 05:17:56 ubu-mini-weather weewx[198474] CRITICAL __main__: Caught WeeWxIOError: Max tries exceeded while getting LOOP data.

Sep 25 08:05:40 ubu-mini-weather weewx[198474] ERROR weewx.drivers.vantage: ip-read error: [Errno 104] Connection reset by peer

Sep 25 08:05:40 ubu-mini-weather weewx[198474] ERROR weewx.drivers.vantage: LOOP try #1; error: [Errno 104] Connection reset by peer

Sep 25 08:05:40 ubu-mini-weather weewx[198474] ERROR weewx.drivers.vantage: LOOP try #2; error: Expected 99 characters; got zero instead

Sep 25 08:05:40 ubu-mini-weather weewx[198474] ERROR weewx.drivers.vantage: LOOP try #3; error: Expected 99 characters; got zero instead

Sep 25 08:05:40 ubu-mini-weather weewx[198474] ERROR weewx.drivers.vantage: LOOP try #4; error: Expected 99 characters; got zero instead

Sep 25 08:05:40 ubu-mini-weather weewx[198474] ERROR weewx.drivers.vantage: LOOP max tries (4) exceeded.

Sep 25 08:05:40 ubu-mini-weather weewx[198474] ERROR weewx.drivers.vantage: ip-write error: [Errno 32] Broken pipe

Sep 25 08:05:40 ubu-mini-weather weewx[198474] CRITICAL __main__: Caught WeeWxIOError: Max tries exceeded while getting LOOP data.

Sep 25 08:06:50 ubu-mini-weather weewx[198474] INFO weewx.engine: Clock error is 0.97 seconds (positive is fast)

Sep 25 10:53:24 ubu-mini-weather weewx[198474] ERROR weewx.drivers.vantage: ip-read error: [Errno 104] Connection reset by peer

Sep 25 10:53:24 ubu-mini-weather weewx[198474] ERROR weewx.drivers.vantage: LOOP try #1; error: [Errno 104] Connection reset by peer

Sep 25 10:53:24 ubu-mini-weather weewx[198474] ERROR weewx.drivers.vantage: LOOP try #2; error: Expected 99 characters; got zero instead

Sep 25 10:53:24 ubu-mini-weather weewx[198474] ERROR weewx.drivers.vantage: LOOP try #3; error: Expected 99 characters; got zero instead

Sep 25 10:53:24 ubu-mini-weather weewx[198474] ERROR weewx.drivers.vantage: LOOP try #4; error: Expected 99 characters; got zero instead

Sep 25 10:53:24 ubu-mini-weather weewx[198474] ERROR weewx.drivers.vantage: LOOP max tries (4) exceeded.

Sep 25 10:53:24 ubu-mini-weather weewx[198474] ERROR weewx.drivers.vantage: ip-write error: [Errno 32] Broken pipe

Sep 25 10:53:24 ubu-mini-weather weewx[198474] CRITICAL __main__: Caught WeeWxIOError: Max tries exceeded while getting LOOP data.


I'm not sure how often weewx tries these loop reads.  Archive interval is 10 minutes (both on weewx.conf and in hardware) but these loop reads don't seem to be synced with that. It only fails once every 2-3 hours, but of course it shouldn't fail at all.

I lengthened the timeouts in the weeWx config, as much as seems reasonable. tcp_send_delay is now 1.  It was 0.5, and I was getting a lot more ip-write errors, but I still got one error even with the longer delay.  I was getting a lot more ip-write errors until I did that, though you can see that I still got one of those this morning.  Vantage Timeout is now 10 seconds (it defaulted to 6) but I'm not sure that had any effect.

I've set the parameters on the WFL very conservatively.  The console archive interval is 10 minutes, all data exports are disabled (both individually and the "upload data" on the System setup screen), TCP port == Pause, Sleep Mode == Disabled.  Web Interface == Enable, but I've been closing any browser windows that point to it so it doesn't spend time on web page updates.  Stay Alive was set to "google + gateway", but I just set it to "disable" to see if that helps. 

I suspected that the WiFi communications might be the issue.  the wifi signal from the WFL is quite weak.  I moved it last night to just a few feet from a strong AP.  That seems to have reduced the errors, but as you can see it hasn't stopped them.  FWIW, even when located just 5 feet from the AP, my AP reports the signal from the WFL at -61dBm, which is quite low.  I wonder if that's normal for the device.

I love the convenience of the WFL, but unless this problem can be solved, I'm not sure I'd recommend it, and I may return it for the Davis wired interface.

BTW, I sent this as an e-mail to Ryan at Scaled Instruments (from whom I bought the station and the interface).  He responded instantly, but wasn't able to help directly.  He forwarded the e-mail to Wojtek, the developer of the device.  I would have sent him the e-mail, except that there's no contact information on his web site.  Ryan also promised a full refund if I can't solve it.  He's been great to deal with.

Anybody have any ideas or wisdom?  In any event, I'll update as I learn more.



steeple ian

unread,
Sep 25, 2020, 4:05:30 PM9/25/20
to weewx...@googlegroups.com
sup...@wifilogger.net is the email address

IM


--


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+...@googlegroups.com.


To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/e17c0c83-80f1-4e26-b483-8246e701ad0fn%40googlegroups.com.


bgra...@umw.edu

unread,
Sep 26, 2020, 10:16:55 AM9/26/20
to weewx-user
Hello,
I have had this problem and solved it for my VPro2 by modifying the vantage.py driver. It was suggested to me several years ago because I'm using the RS232 interface which is designed for APRS (ham radio) reporting. Not sure I understand why it works but it does for me and I need to modify each new driver file (vantage.py) when I update weewx.
I made the following modification:

In vantage.py:

def genLoopPackets(self):
        """Generator function that returns loop packets"""

        while True:
            # Get LOOP packets in big batches This is necessary because there is
            # an undocumented limit to how many LOOP records you can request
            # on the VP (somewhere around 220).
            for _loop_packet in self.genDavisLoopPackets(2): #[this is set to 200 in vantage.py original]
                yield _loop_packet

My archive time is set to 15 minutes, if this is important.
Good luck.
Bob

loonsailor

unread,
Sep 27, 2020, 2:14:26 PM9/27/20
to weewx-user
Thanks for the suggestion.  I just made the change.  I'll watch for the next few hours and report back on results.
Reply all
Reply to author
Forward
0 new messages