weewx / Vantage driver crash?

148 views
Skip to first unread message

n7uv...@gmail.com

unread,
Feb 9, 2025, 2:17:12 PM2/9/25
to weewx-user
Yesterday afternoon weewx stopped functioning, it looks like there's an issue with the Vantage drivers? (See journalctl snippet below). System is Raspberry Pi 4 running Bookworm. I've tried rebooting but get the same issue with being unable to wake up the Vantage console. The console is "alive", the data is updating, and the TCPIP data logger is blinking regularly. 
I'd like to not lose the data from yesterday at 1708 local. Any ideas what I should try?
Cheers - Jon

Feb 08 17:08:29 rpi-weewx weewxd[1338]: INFO weewx.reportengine: ftpgenerator: Ftp'd 22 files in 8.09 seconds
Feb 08 17:08:29 rpi-weewx weewxd[1338]: DEBUG weewx.reportengine: Report 'RSYNC' not enabled. Skipping.
Feb 08 17:09:01 rpi-weewx CRON[175920]: pam_unix(cron:session): session opened for user root(uid=0) by (uid=0)
Feb 08 17:09:01 rpi-weewx CRON[175922]: (root) CMD (  [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)
Feb 08 17:09:01 rpi-weewx CRON[175920]: pam_unix(cron:session): session closed for user root
Feb 08 17:09:09 rpi-weewx systemd[1]: Starting phpsessionclean.service - Clean php session files...
Feb 08 17:09:09 rpi-weewx systemd[1]: phpsessionclean.service: Deactivated successfully.
Feb 08 17:09:09 rpi-weewx systemd[1]: Finished phpsessionclean.service - Clean php session files.
Feb 08 17:09:13 rpi-weewx weewxd[1338]: ERROR weewx.drivers.vantage: ip-read error: timed out
Feb 08 17:09:13 rpi-weewx weewxd[1338]: ERROR weewx.drivers.vantage: LOOP batch try #1; error: timed out
Feb 08 17:09:16 rpi-weewx weewxd[1338]: DEBUG weewx.drivers.vantage: Bad wake-up response from Vantage console: b'LO'
Feb 08 17:09:16 rpi-weewx weewxd[1338]: DEBUG weewx.drivers.vantage: Retry #1 unable to wake up console... sleeping
Feb 08 17:09:29 rpi-weewx weewxd[1338]: ERROR weewx.drivers.vantage: ip-read error: timed out
Feb 08 17:09:29 rpi-weewx weewxd[1338]: DEBUG weewx.drivers.vantage: Wake up try 2 failed. Exception: timed out
Feb 08 17:09:29 rpi-weewx weewxd[1338]: DEBUG weewx.drivers.vantage: Retry #2 unable to wake up console... sleeping

Tom Keffer

unread,
Feb 9, 2025, 5:48:23 PM2/9/25
to weewx...@googlegroups.com
What kind of logger?

Does the command "weectl device info" work?

Please show the log from when the program starts up. There can be important configuration clues.

--
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 visit https://groups.google.com/d/msgid/weewx-user/9e60a16e-6e95-4753-8c48-34e04c7a217fn%40googlegroups.com.

n7uv...@gmail.com

unread,
Mar 30, 2025, 10:52:25 PM3/30/25
to weewx-user
Sorry for the long delay. A power outage had caused the Davis IP Data Logger to drop off the network. I unplugged the console from the network, then recycled power on the console. However, I lost several hours of data that way.

Today I had another power outage, the IP Data logger doesn't ping anymore, instead of just doing what I did before and losing data I thought I'd post the log.

Mar 30 19:38:40 rpi-weewx systemd[1]: Started weewx.service - WeeWX.
Mar 30 19:38:40 rpi-weewx weewxd[1334]: INFO __main__: Initializing weewxd version 5.1.0
Mar 30 19:38:40 rpi-weewx weewxd[1334]: INFO __main__: Command line: /usr/share/weewx/weewxd.py /etc/weewx/weewx.conf
Mar 30 19:38:40 rpi-weewx weewxd[1334]: INFO __main__: Using Python: 3.11.2 (main, Nov 30 2024, 21:22:50) [GCC 12.2.0]
Mar 30 19:38:40 rpi-weewx weewxd[1334]: INFO __main__: Located at:   /usr/bin/python3
Mar 30 19:38:40 rpi-weewx weewxd[1334]: INFO __main__: Platform:     Linux-6.6.28+rpt-rpi-v8-aarch64-with-glibc2.36
Mar 30 19:38:40 rpi-weewx weewxd[1334]: INFO __main__: Locale:       'en_GB.UTF-8'
Mar 30 19:38:40 rpi-weewx weewxd[1334]: INFO __main__: Entry path:   /usr/share/weewx/weewxd.py
Mar 30 19:38:40 rpi-weewx weewxd[1334]: INFO __main__: WEEWX_ROOT:   /etc/weewx
Mar 30 19:38:40 rpi-weewx weewxd[1334]: INFO __main__: Config file:  /etc/weewx/weewx.conf
Mar 30 19:38:40 rpi-weewx weewxd[1334]: INFO __main__: User module:  /etc/weewx/bin/user
Mar 30 19:38:40 rpi-weewx weewxd[1334]: INFO __main__: Debug:        1
Mar 30 19:38:40 rpi-weewx weewxd[1334]: INFO __main__: User:         weewx
Mar 30 19:38:40 rpi-weewx weewxd[1334]: INFO __main__: Group:        weewx
Mar 30 19:38:40 rpi-weewx weewxd[1334]: INFO __main__: Groups:       weewx
Mar 30 19:38:40 rpi-weewx weewxd[1334]: DEBUG __main__: loop_on_init: False
Mar 30 19:38:40 rpi-weewx weewxd[1334]: DEBUG __main__: Initializing engine
Mar 30 19:38:40 rpi-weewx weewxd[1334]: INFO weewx.engine: Loading station type Vantage (weewx.drivers.vantage)
Mar 30 19:38:40 rpi-weewx weewxd[1334]: DEBUG weewx.drivers.vantage: Driver version is 3.6.2
Mar 30 19:38:40 rpi-weewx weewxd[1334]: DEBUG weewx.drivers.vantage: Option loop_request=1
Mar 30 19:38:43 rpi-weewx weewxd[1334]: ERROR weewx.drivers.vantage: Socket error while opening port 22222 to ethernet host 192.168.1.81.
Mar 30 19:38:43 rpi-weewx weewxd[1334]: ERROR weewx.engine: Import of driver failed: [Errno 113] No route to host (<class 'weewx.WeeWxIOError'>)
Mar 30 19:38:43 rpi-weewx weewxd[1334]: CRITICAL weewx.engine:     ****  Traceback (most recent call last):
Mar 30 19:38:43 rpi-weewx weewxd[1334]: CRITICAL weewx.engine:     ****    File "/usr/share/weewx/weewx/drivers/vantage.py", line 354, in openPort
Mar 30 19:38:43 rpi-weewx weewxd[1334]: CRITICAL weewx.engine:     ****      self.socket.connect((self.host, self.port))
Mar 30 19:38:43 rpi-weewx weewxd[1334]: CRITICAL weewx.engine:     ****  OSError: [Errno 113] No route to host
Mar 30 19:38:43 rpi-weewx weewxd[1334]: CRITICAL weewx.engine:     ****
Mar 30 19:38:43 rpi-weewx weewxd[1334]: CRITICAL weewx.engine:     ****  During handling of the above exception, another exception occurred:
Mar 30 19:38:43 rpi-weewx weewxd[1334]: CRITICAL weewx.engine:     ****
Mar 30 19:38:43 rpi-weewx weewxd[1334]: CRITICAL weewx.engine:     ****  Traceback (most recent call last):
Mar 30 19:38:43 rpi-weewx weewxd[1334]: CRITICAL weewx.engine:     ****    File "/usr/share/weewx/weewx/engine.py", line 115, in setupStation
Mar 30 19:38:43 rpi-weewx weewxd[1334]: CRITICAL weewx.engine:     ****      self.console = loader_function(config_dict, self)
Mar 30 19:38:43 rpi-weewx weewxd[1334]: CRITICAL weewx.engine:     ****                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Mar 30 19:38:43 rpi-weewx weewxd[1334]: CRITICAL weewx.engine:     ****    File "/usr/share/weewx/weewx/drivers/vantage.py", line 32, in loader
Mar 30 19:38:43 rpi-weewx weewxd[1334]: CRITICAL weewx.engine:     ****      return VantageService(engine, config_dict)
Mar 30 19:38:43 rpi-weewx weewxd[1334]: CRITICAL weewx.engine:     ****             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Mar 30 19:38:43 rpi-weewx weewxd[1334]: CRITICAL weewx.engine:     ****    File "/usr/share/weewx/weewx/drivers/vantage.py", line 2046, in __init__
Mar 30 19:38:43 rpi-weewx weewxd[1334]: CRITICAL weewx.engine:     ****      Vantage.__init__(self, **config_dict[DRIVER_NAME])
Mar 30 19:38:43 rpi-weewx weewxd[1334]: CRITICAL weewx.engine:     ****    File "/usr/share/weewx/weewx/drivers/vantage.py", line 536, in __init__
Mar 30 19:38:43 rpi-weewx weewxd[1334]: CRITICAL weewx.engine:     ****      self.port.openPort()
Mar 30 19:38:43 rpi-weewx weewxd[1334]: CRITICAL weewx.engine:     ****    File "/usr/share/weewx/weewx/drivers/vantage.py", line 359, in openPort
Mar 30 19:38:43 rpi-weewx weewxd[1334]: CRITICAL weewx.engine:     ****      raise weewx.WeeWxIOError(ex)
Mar 30 19:38:43 rpi-weewx weewxd[1334]: CRITICAL weewx.engine:     ****  weewx.WeeWxIOError: [Errno 113] No route to host
Mar 30 19:38:43 rpi-weewx weewxd[1334]: CRITICAL __main__: Unable to load driver: [Errno 113] No route to host
Mar 30 19:38:43 rpi-weewx weewxd[1334]: CRITICAL __main__:     ****  Exiting...
Mar 30 19:38:43 rpi-weewx systemd[1]: weewx.service: Main process exited, code=exited, status=4/NOPERMISSION
Mar 30 19:38:43 rpi-weewx systemd[1]: weewx.service: Failed with result 'exit-code'.

Raspberry Pi 4, Bookworm 64-bit, Davis console connected via Davis IP data logger to the local network. Currently does not ping. The console is showing current data, but weewx attempts to read and then exits.

Any ideas would be muchly appreciated! 

Cheers - Jon

n7uv...@gmail.com

unread,
Mar 30, 2025, 10:54:33 PM3/30/25
to weewx-user
Oh, and when I attempt "weectl device info" I get the following

jta@rpi-weewx:~ $ weectl device info
Error parsing config file: info is not a file

Traceback (most recent call last):
  File "/usr/share/weewx/weectllib/device_actions.py", line 34, in device
    config_fn, config_dict = weecfg.read_config(config_path, sys.argv[2:])
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/weewx/weecfg/__init__.py", line 147, in read_config
    config_path = find_file(option_path, args, locations=locations, file_name=file_name)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/weewx/weecfg/__init__.py", line 106, in find_file
    raise OSError(f"{option_path} is not a file")
OSError: info is not a file
jta@rpi-weewx:~ $

But I suspect that's because weewx is not running %^)

matthew wall

unread,
Mar 30, 2025, 11:23:37 PM3/30/25
to weewx...@googlegroups.com


> On Mar 30, 2025, at 22:54, n7uv...@gmail.com <n7uv...@gmail.com> wrote:
>
> Oh, and when I attempt "weectl device info" I get the following
>
> jta@rpi-weewx:~ $ weectl device info
> Error parsing config file: info is not a file
> Traceback (most recent call last):
> File "/usr/share/weewx/weectllib/device_actions.py", line 34, in device
> config_fn, config_dict = weecfg.read_config(config_path, sys.argv[2:])
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/usr/share/weewx/weecfg/__init__.py", line 147, in read_config
> config_path = find_file(option_path, args, locations=locations, file_name=file_name)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/usr/share/weewx/weecfg/__init__.py", line 106, in find_file
> raise OSError(f"{option_path} is not a file")
> OSError: info is not a file
> jta@rpi-weewx:~ $

you want:

weectl device --info

the full form is:

weectl device [/path/to/configfile] [--help]

there may be additional options, such as --info, depending on the driver that is specified in the config file. see the docs for details:

https://weewx.com/docs/5.1/utilities/weectl-device/



matthew wall

unread,
Mar 30, 2025, 11:32:33 PM3/30/25
to weewx...@googlegroups.com


> On Mar 30, 2025, at 22:52, n7uv...@gmail.com <n7uv...@gmail.com> wrote:
>
> Sorry for the long delay. A power outage had caused the Davis IP Data Logger to drop off the network. I unplugged the console from the network, then recycled power on the console. However, I lost several hours of data that way.
>
> Today I had another power outage, the IP Data logger doesn't ping anymore, instead of just doing what I did before and losing data I thought I'd post the log.
>
> ...
> Mar 30 19:38:43 rpi-weewx weewxd[1334]: CRITICAL weewx.engine: **** weewx.WeeWxIOError: [Errno 113] No route to host
> Mar 30 19:38:43 rpi-weewx weewxd[1334]: CRITICAL __main__: Unable to load driver: [Errno 113] No route to host
> Mar 30 19:38:43 rpi-weewx weewxd[1334]: CRITICAL __main__: **** Exiting...
> Mar 30 19:38:43 rpi-weewx systemd[1]: weewx.service: Main process exited, code=exited, status=4/NOPERMISSION
> Mar 30 19:38:43 rpi-weewx systemd[1]: weewx.service: Failed with result 'exit-code'.
>
> Raspberry Pi 4, Bookworm 64-bit, Davis console connected via Davis IP data logger to the local network. Currently does not ping. The console is showing current data, but weewx attempts to read and then exits.
>
> Any ideas would be muchly appreciated!

possible problems:

1) 'no route to host' usually indicates that weewx is starting before the network has initialized on the pi. if this is the problem, you can:
a) use the loop-on-init option so that weewx keeps retrying on startup
b) configure your init system so that weewx will not start until network is up

2) the davis console does not show up on the network until after weewx has tried to connect to it. if this is the problem, use loop-on-init so weewx will keep retrying when it starts up.

3) the NOPERMISSION coming from systemd is probably a red herring, since you are using the ip interface to the davis, not usb. hopefully the NOPERMISSION goes away when you fix 1 and/or 2.

4) your last comment about the davis not being ping-able might indicate a bigger network problem, such as the davis and the pi being on different subnets, or your dhcp server is messed up, or you have multiple dhcp servers on the same network segment that are offering conflicting netmask/routing information, or ... be sure that your network is configured properly.

matthew wall

unread,
Mar 30, 2025, 11:36:08 PM3/30/25
to weewx...@googlegroups.com
also, if the pi has multiple network interfaces (e.g., wired and wireless), be sure that weewx is using the interface that attached to the same network that the davis is on.

n7uv...@gmail.com

unread,
Mar 31, 2025, 10:29:15 AM3/31/25
to weewx-user
Hi Matthew -

Thanks for the pointers!

The weewx Rpi is definitely on the network, it's also my ntp service and gpsd service. The Ethernet switch to which the Davis IP data logger is connected does get a minimal handshake and the LED on the Davis IP data logger lights up and flashes intermittently. If I move the data logger to a different port (unmanaged switch) nothing changes. However, the ip data logger never responds to a ping. I suspect the data logger has entered a state that it no longer responds to queries from the network.

weewx is configured to wait until network startup.

To the idea that perhaps the DCHP service has a issue, I rebooted that. Did not change anything.

I have no other subnets in the house, every device via the DHCP server has either a fixed IP address (like the IP data logger and the weewx RPi) or a lease. I have no unaccounted for devices. I can ping all the other devices that I know are active.

The pi has wi-fi turned off.

Both the weewx RPi and the IP data logger are on the same switch, within 2' of one another.

The Davis console batteries are in fine shape, the console is plugged in to ac power, and I didn't lose ac power, just the dc power runs the switches and weewx RPi. (All the network gear, computers, etc., are on solar battery power.)

This time I tried disconnecting the IP data logger from the network, then disconnecting ac power from the console but not removing the batteries from the console. Now the ip data logger pings. weewx starts up. This time I did not lose data!

Lessons learned - don't short the 48 volt main bus %^). And, if I lose contact with the Davis IP data logger, disconnect ac power but do not remove the batteries. Next project, move the ac power supply over to the dc circuits. (It's just an odd 9 volts, so I've been lazy)

Cheers - Jon
Reply all
Reply to author
Forward
0 new messages