updated to 5.0.1 still no joy

343 views
Skip to first unread message

Rich Strle

unread,
Feb 6, 2024, 10:51:18 PM2/6/24
to weewx-user
I've been following the 5.0 issues. I have updated to 5.0.1 and done the usermod but I'm still having issues. RaspberryPi 3 B+ My Vantage Pro is connected via ethernet using the IP adaptor. I appreciate all the work that's gone into this free product.

vp2pi@rpivp2:~ $ sudo apt update
vp2pi@rpivp2:~ $ sudo apt install weewx 
 
vp2pi@rpivp2:~ $ sudo usermod -aG dialout weewx

vp2pi@rpivp2:~ $ sudo systemctl status weewx
* weewx.service - WeeWX
     Loaded: loaded (/lib/systemd/system/weewx.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Tue 2024-02-06 21:19:31 CST; 3min 18s ago
       Docs: https://weewx.com/docs
    Process: 460 ExecStart=weewxd /etc/weewx/weewx.conf (code=exited, status=4)
   Main PID: 460 (code=exited, status=4)
        CPU: 966ms

Feb 06 21:19:31 rpivp2 weewxd[460]: CRITICAL weewx.engine:     ****      Vantage.__init__(self, **config_dict[DRIVER_NAME])
Feb 06 21:19:31 rpivp2 weewxd[460]: CRITICAL weewx.engine:     ****    File "/usr/share/weewx/weewx/drivers/vantage.py", line 536, in __init__
Feb 06 21:19:31 rpivp2 weewxd[460]: CRITICAL weewx.engine:     ****      self.port.openPort()
Feb 06 21:19:31 rpivp2 weewxd[460]: CRITICAL weewx.engine:     ****    File "/usr/share/weewx/weewx/drivers/vantage.py", line 359, in openPort
Feb 06 21:19:31 rpivp2 weewxd[460]: CRITICAL weewx.engine:     ****      raise weewx.WeeWxIOError(ex)
Feb 06 21:19:31 rpivp2 weewxd[460]: CRITICAL weewx.engine:     ****  weewx.WeeWxIOError: [Errno 101] Network is unreachable
Feb 06 21:19:31 rpivp2 weewxd[460]: CRITICAL __main__: Unable to load driver: [Errno 101] Network is unreachable
Feb 06 21:19:31 rpivp2 weewxd[460]: CRITICAL __main__:     ****  Exiting...
Feb 06 21:19:31 rpivp2 systemd[1]: weewx.service: Main process exited, code=exited, status=4/NOPERMISSION
Feb 06 21:19:31 rpivp2 systemd[1]: weewx.service: Failed with result 'exit-code'.
vp2pi@rpivp2:~ $ sudo usermod -aG dialout weewx

vince

unread,
Feb 7, 2024, 12:51:54 AM2/7/24
to weewx-user
Can't help with such minimal log data and no info from your weewx.conf file driver section for the driver you're using.   What os+version are you running ?

What is the weewx pi's address ?  What is an 'ip adaptor' ?  What is its address ? Can you ping it from the weewx pi ?  If you stop/start weewx 'after' your network is stable does 'that' work ?

Tom Keffer

unread,
Feb 7, 2024, 8:54:14 AM2/7/24
to weewx...@googlegroups.com
Rich, 

One other question: does this happen after a reboot? Or, every time? 

If it's only after a reboot, the problem could be that the network isn't ready by the time the VP2 needs it.


--
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/2c3336ab-72b9-49bb-a602-be652a00e531n%40googlegroups.com.

Rich Strle

unread,
Feb 7, 2024, 9:14:35 AM2/7/24
to weewx-user
Hi Tom, it happens every time. Attached is a log of what happened when I turned off the Pi, restarted the Pi, shut down weewx, and restarted weewx. 

I running a fresh RasberryPi Debian install. Vantage Pro2 with a WeatherLinkIP attached to a  VantagePro2 console.

Attached is what happened with my most recent boot and the log file.
Restart.txt
weex_error_log.txt

Tom Keffer

unread,
Feb 7, 2024, 10:12:44 AM2/7/24
to weewx...@googlegroups.com
Something to try: edit the weewx service file and change permissions back to root. The service file should be located at /lib/systemd/system/weewx.service. Comment out the User and Group lines. When you're done, it will look something like this:

[Service]

ExecStart=weewxd /etc/weewx/weewx.conf

StandardOutput=null

StandardError=journal+console

RuntimeDirectory=weewx

RuntimeDirectoryMode=775

# User=weewx

# Group=weewx


Then restart weewxd.

Let us know if that makes a difference.

-tk

John Smith

unread,
Feb 7, 2024, 10:45:39 AM2/7/24
to weewx...@googlegroups.com
On Thu, 8 Feb 2024 at 02:12, Tom Keffer <tke...@gmail.com> wrote:
Something to try: edit the weewx service file and change permissions back to root. The service file should be located at /lib/systemd/system/weewx.service. Comment out the User and Group lines. When you're done, it will look something like this:

[Service]

ExecStart=weewxd /etc/weewx/weewx.conf

StandardOutput=null

StandardError=journal+console

RuntimeDirectory=weewx

RuntimeDirectoryMode=775

# User=weewx

# Group=weewx


Then restart weewxd.

Let us know if that makes a difference.

Why not start as root then drop privileges, it would solve a lot of the permission problems people are having  

Glen N

unread,
Feb 11, 2024, 9:01:24 PM2/11/24
to weewx-user
I was having a no start problem after upgrading RPi3B running DietPi. I tried Tom's suggestion and it fixed the problem.

Prior to the "fix" my log file showed:
-- Journal begins at Mon 2024-02-12 11:47:21 AEDT, ends at Mon 2024-02-12 12:40:34 AEDT. --
Feb 12 11:47:23 SystemName systemd[1]: Started WeeWX.
Feb 12 11:47:24 SystemName weewxd[309]: INFO __main__: Initializing weewxd version 5.0.1
Feb 12 11:47:24 SystemName weewxd[309]: INFO __main__: Command line: /usr/share/weewx/weewxd.py /etc/weewx/weewx.conf
Feb 12 11:47:24 SystemName weewxd[309]: INFO __main__: Using Python 3.9.2 (default, Feb 28 2021, 17:03:44)
                                         [GCC 10.2.1 20210110]
Feb 12 11:47:24 SystemName weewxd[309]: INFO __main__: Located at /usr/bin/python3
Feb 12 11:47:24 SystemName weewxd[309]: INFO __main__: Platform Linux-6.1.21-v8+-aarch64-with-glibc2.31
Feb 12 11:47:24 SystemName weewxd[309]: INFO __main__: Locale: 'en_AU.UTF-8'
Feb 12 11:47:24 SystemName weewxd[309]: INFO __main__: Entry path: /usr/share/weewx/weewxd.py
Feb 12 11:47:24 SystemName weewxd[309]: INFO __main__: WEEWX_ROOT: /etc/weewx
Feb 12 11:47:24 SystemName weewxd[309]: INFO __main__: Configuration file: /etc/weewx/weewx.conf
Feb 12 11:47:24 SystemName weewxd[309]: INFO __main__: User module: /etc/weewx/bin/user
Feb 12 11:47:24 SystemName weewxd[309]: INFO __main__: Debug: 0
Feb 12 11:47:24 SystemName weewxd[309]: INFO weewx.engine: Loading station type FineOffsetUSB (weewx.drivers.fousb)
Feb 12 11:47:24 SystemName weewxd[309]: INFO weewx.drivers.fousb: driver version is 1.3
Feb 12 11:47:24 SystemName weewxd[309]: INFO weewx.drivers.fousb: polling mode is PERIODIC
Feb 12 11:47:24 SystemName weewxd[309]: INFO weewx.drivers.fousb: polling interval is 60
Feb 12 11:47:25 SystemName weewxd[309]: INFO weewx.drivers.fousb: found station on USB bus= device=
Feb 12 11:47:25 SystemName weewxd[309]: INFO weewx.engine: StdConvert target unit is 0x11
Feb 12 11:47:25 SystemName weewxd[309]: INFO weewx.wxservices: StdWXCalculate will use data binding wx_binding
Feb 12 11:47:25 SystemName weewxd[309]: INFO weewx.engine: Archive will use data binding wx_binding
Feb 12 11:47:25 SystemName weewxd[309]: INFO weewx.engine: Record generation will be attempted in 'software'
Feb 12 11:47:25 SystemName weewxd[309]: INFO weewx.engine: Using archive interval of 300 seconds (software record generation)
Feb 12 11:47:25 SystemName weewxd[309]: INFO weewx.restx: StationRegistry: Station will not be registered: no station_url specified.
Feb 12 11:47:25 SystemName weewxd[309]: INFO weewx.restx: Wunderground-PWS: Data for station ITEATR7 will be posted
Feb 12 11:47:25 SystemName weewxd[309]: INFO weewx.restx: PWSWeather: Data for station THISTLEWIND will be posted
Feb 12 11:47:25 SystemName weewxd[309]: INFO weewx.restx: CWOP: Posting not enabled.
Feb 12 11:47:25 SystemName weewxd[309]: INFO weewx.restx: WOW: Posting not enabled.
Feb 12 11:47:25 SystemName weewxd[309]: INFO weewx.restx: AWEKAS: Posting not enabled.
Feb 12 11:47:25 SystemName weewxd[309]: INFO weewx.engine: 'pyephem' detected, extended almanac data is available
Feb 12 11:47:25 SystemName weewxd[309]: INFO __main__: Starting up weewx version 5.0.1
Feb 12 11:47:25 SystemName weewxd[309]: INFO weewx.engine: Using binding 'wx_binding' to database 'weewx.sdb'
Feb 12 11:47:25 SystemName weewxd[309]: INFO weewx.manager: Starting backfill of daily summaries
Feb 12 11:47:25 SystemName weewxd[309]: INFO weewx.manager: Daily summaries up to date
Feb 12 11:47:26 SystemName weewxd[309]: INFO weewx.drivers.fousb: synchronising to the weather station (quality=0)
Feb 12 11:47:57 SystemName weewxd[309]: INFO weewx.drivers.fousb: unstable read: blocks differ for ptr 0x001380
Feb 12 11:49:44 SystemName weewxd[309]: ERROR weewx.drivers.fousb: invalid data in get_records at 0x09b0, 2024-02-08T18:19:29
Feb 12 11:49:47 SystemName weewxd[309]: /usr/lib/python3/dist-packages/gpiozero/devices.py:288: PinFactoryFallback: Falling back from rpigpio: No module named 'RPi'
Feb 12 11:49:47 SystemName weewxd[309]:   warnings.warn(
Feb 12 11:49:47 SystemName weewxd[309]: /usr/lib/python3/dist-packages/gpiozero/devices.py:288: PinFactoryFallback: Falling back from lgpio: No module named 'lgpio'
Feb 12 11:49:47 SystemName weewxd[309]:   warnings.warn(
Feb 12 11:49:47 SystemName weewxd[309]: /usr/lib/python3/dist-packages/gpiozero/devices.py:288: PinFactoryFallback: Falling back from rpio: No module named 'RPIO'
Feb 12 11:49:47 SystemName weewxd[309]:   warnings.warn(
Feb 12 11:49:47 SystemName weewxd[309]: /usr/lib/python3/dist-packages/gpiozero/devices.py:288: PinFactoryFallback: Falling back from pigpio: No module named 'pigpio'
Feb 12 11:49:47 SystemName weewxd[309]:   warnings.warn(
Feb 12 11:49:47 SystemName weewxd[309]: /usr/lib/python3/dist-packages/gpiozero/devices.py:288: PinFactoryFallback: Falling back from native: unable to open /dev/gpiomem or /dev/mem; upgrade your kernel or run as root
Feb 12 11:49:47 SystemName weewxd[309]:   warnings.warn(
Feb 12 11:49:47 SystemName weewxd[309]: INFO weewx.engine: Main loop exiting. Shutting engine down.
Feb 12 11:49:47 SystemName weewxd[309]: CRITICAL __main__: Caught unrecoverable exception:
Feb 12 11:49:47 SystemName weewxd[309]: CRITICAL __main__:     ****  Unable to load any default pin factory!
Feb 12 11:49:47 SystemName weewxd[309]: CRITICAL __main__:     ****  Traceback (most recent call last):
Feb 12 11:49:47 SystemName weewxd[309]: CRITICAL __main__:     ****    File "/usr/share/weewx/weewxd.py", line 166, in main
Feb 12 11:49:47 SystemName weewxd[309]: CRITICAL __main__:     ****      engine.run()
Feb 12 11:49:47 SystemName weewxd[309]: CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/engine.py", line 174, in run
Feb 12 11:49:47 SystemName weewxd[309]: CRITICAL __main__:     ****      self.dispatchEvent(weewx.Event(weewx.STARTUP))
Feb 12 11:49:47 SystemName weewxd[309]: CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/engine.py", line 241, in dispatchEvent
Feb 12 11:49:47 SystemName weewxd[309]: CRITICAL __main__:     ****      callback(event)
Feb 12 11:49:47 SystemName weewxd[309]: CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/engine.py", line 610, in startup
Feb 12 11:49:47 SystemName weewxd[309]: CRITICAL __main__:     ****      self._catchup(self.engine.console.genStartupRecords)
Feb 12 11:49:47 SystemName weewxd[309]: CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/engine.py", line 726, in _catchup
Feb 12 11:49:47 SystemName weewxd[309]: CRITICAL __main__:     ****      self.engine.dispatchEvent(weewx.Event(weewx.NEW_ARCHIVE_RECORD,
Feb 12 11:49:47 SystemName weewxd[309]: CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/engine.py", line 241, in dispatchEvent
Feb 12 11:49:47 SystemName weewxd[309]: CRITICAL __main__:     ****      callback(event)
Feb 12 11:49:47 SystemName weewxd[309]: CRITICAL __main__:     ****    File "/etc/weewx/bin/user/cputemp.py", line 17, in new_archive_record
Feb 12 11:49:47 SystemName weewxd[309]: CRITICAL __main__:     ****      cpu = CPUTemperature()
Feb 12 11:49:47 SystemName weewxd[309]: CRITICAL __main__:     ****    File "/usr/lib/python3/dist-packages/gpiozero/devices.py", line 108, in __call__
Feb 12 11:49:47 SystemName weewxd[309]: CRITICAL __main__:     ****      self = super(GPIOMeta, cls).__call__(*args, **kwargs)
Feb 12 11:49:47 SystemName weewxd[309]: CRITICAL __main__:     ****    File "/usr/lib/python3/dist-packages/gpiozero/internal_devices.py", line 277, in __init__
Feb 12 11:49:47 SystemName weewxd[309]: CRITICAL __main__:     ****      super(CPUTemperature, self).__init__(
Feb 12 11:49:47 SystemName weewxd[309]: CRITICAL __main__:     ****    File "/usr/lib/python3/dist-packages/gpiozero/internal_devices.py", line 69, in __init__
Feb 12 11:49:47 SystemName weewxd[309]: CRITICAL __main__:     ****      super(PolledInternalDevice, self).__init__(pin_factory=pin_factory)
Feb 12 11:49:47 SystemName weewxd[309]: CRITICAL __main__:     ****    File "/usr/lib/python3/dist-packages/gpiozero/internal_devices.py", line 42, in __init__
Feb 12 11:49:47 SystemName weewxd[309]: CRITICAL __main__:     ****      super(InternalDevice, self).__init__(pin_factory=pin_factory)
Feb 12 11:49:47 SystemName weewxd[309]: CRITICAL __main__:     ****    File "/usr/lib/python3/dist-packages/gpiozero/mixins.py", line 218, in __init__
Feb 12 11:49:47 SystemName weewxd[309]: CRITICAL __main__:     ****      super(EventsMixin, self).__init__(*args, **kwargs)
Feb 12 11:49:47 SystemName weewxd[309]: CRITICAL __main__:     ****    File "/usr/lib/python3/dist-packages/gpiozero/devices.py", line 250, in __init__
Feb 12 11:49:47 SystemName weewxd[309]: CRITICAL __main__:     ****      Device.pin_factory = Device._default_pin_factory()
Feb 12 11:49:47 SystemName weewxd[309]: CRITICAL __main__:     ****    File "/usr/lib/python3/dist-packages/gpiozero/devices.py", line 291, in _default_pin_factory
Feb 12 11:49:47 SystemName weewxd[309]: CRITICAL __main__:     ****      raise BadPinFactory('Unable to load any default pin factory!')
Feb 12 11:49:47 SystemName weewxd[309]: CRITICAL __main__:     ****  gpiozero.exc.BadPinFactory: Unable to load any default pin factory!
Feb 12 11:49:47 SystemName weewxd[309]: CRITICAL __main__:     ****  Exiting.
Feb 12 11:49:47 SystemName weewxd[309]: Traceback (most recent call last):
Feb 12 11:49:47 SystemName weewxd[309]:   File "/usr/share/weewx/weewxd.py", line 265, in <module>
Feb 12 11:49:47 SystemName weewxd[309]:     main()
Feb 12 11:49:47 SystemName weewxd[309]:   File "/usr/share/weewx/weewxd.py", line 166, in main
Feb 12 11:49:47 SystemName weewxd[309]:     engine.run()
Feb 12 11:49:47 SystemName weewxd[309]:   File "/usr/share/weewx/weewx/engine.py", line 174, in run
Feb 12 11:49:47 SystemName weewxd[309]:     self.dispatchEvent(weewx.Event(weewx.STARTUP))
Feb 12 11:49:47 SystemName weewxd[309]:   File "/usr/share/weewx/weewx/engine.py", line 241, in dispatchEvent
Feb 12 11:49:47 SystemName weewxd[309]:     callback(event)
Feb 12 11:49:47 SystemName weewxd[309]:   File "/usr/share/weewx/weewx/engine.py", line 610, in startup
Feb 12 11:49:47 SystemName weewxd[309]:     self._catchup(self.engine.console.genStartupRecords)
Feb 12 11:49:47 SystemName weewxd[309]:   File "/usr/share/weewx/weewx/engine.py", line 726, in _catchup
Feb 12 11:49:47 SystemName weewxd[309]:     self.engine.dispatchEvent(weewx.Event(weewx.NEW_ARCHIVE_RECORD,
Feb 12 11:49:47 SystemName weewxd[309]:   File "/usr/share/weewx/weewx/engine.py", line 241, in dispatchEvent
Feb 12 11:49:47 SystemName weewxd[309]:     callback(event)
Feb 12 11:49:47 SystemName weewxd[309]:   File "/etc/weewx/bin/user/cputemp.py", line 17, in new_archive_record
Feb 12 11:49:47 SystemName weewxd[309]:     cpu = CPUTemperature()
Feb 12 11:49:47 SystemName weewxd[309]:   File "/usr/lib/python3/dist-packages/gpiozero/devices.py", line 108, in __call__
Feb 12 11:49:47 SystemName weewxd[309]:     self = super(GPIOMeta, cls).__call__(*args, **kwargs)
Feb 12 11:49:47 SystemName weewxd[309]:   File "/usr/lib/python3/dist-packages/gpiozero/internal_devices.py", line 277, in __init__
Feb 12 11:49:47 SystemName weewxd[309]:     super(CPUTemperature, self).__init__(
Feb 12 11:49:47 SystemName weewxd[309]:   File "/usr/lib/python3/dist-packages/gpiozero/internal_devices.py", line 69, in __init__
Feb 12 11:49:47 SystemName weewxd[309]:     super(PolledInternalDevice, self).__init__(pin_factory=pin_factory)
Feb 12 11:49:47 SystemName weewxd[309]:   File "/usr/lib/python3/dist-packages/gpiozero/internal_devices.py", line 42, in __init__
Feb 12 11:49:47 SystemName weewxd[309]:     super(InternalDevice, self).__init__(pin_factory=pin_factory)
Feb 12 11:49:47 SystemName weewxd[309]:   File "/usr/lib/python3/dist-packages/gpiozero/mixins.py", line 218, in __init__
Feb 12 11:49:47 SystemName weewxd[309]:     super(EventsMixin, self).__init__(*args, **kwargs)
Feb 12 11:49:47 SystemName weewxd[309]:   File "/usr/lib/python3/dist-packages/gpiozero/devices.py", line 250, in __init__
Feb 12 11:49:47 SystemName weewxd[309]:     Device.pin_factory = Device._default_pin_factory()
Feb 12 11:49:47 SystemName weewxd[309]:   File "/usr/lib/python3/dist-packages/gpiozero/devices.py", line 291, in _default_pin_factory
Feb 12 11:49:47 SystemName weewxd[309]:     raise BadPinFactory('Unable to load any default pin factory!')
Feb 12 11:49:47 SystemName weewxd[309]: gpiozero.exc.BadPinFactory: Unable to load any default pin factory!
Feb 12 11:49:47 SystemName systemd[1]: weewx.service: Main process exited, code=exited, status=1/FAILURE
Feb 12 11:49:47 SystemName systemd[1]: weewx.service: Failed with result 'exit-code'.
Feb 12 11:49:47 SystemName systemd[1]: weewx.service: Consumed 2.701s CPU time.


Glen N

unread,
Feb 22, 2024, 5:18:28 AM2/22/24
to weewx-user
After updating DietPi to version 9.1.1

I am getting GPIOzero BadPinFactory errors again. I tried commenting out the weewx user in the service file as above, but the error remains.

● weewx.service - WeeWX

     Loaded: loaded (/lib/systemd/system/weewx.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Thu 2024-02-22 21:02:32 AEDT; 12min ago
       Docs: https://weewx.com/docs
   Main PID: 23495 (code=exited, status=1/FAILURE)
        CPU: 1.834s

Feb 22 21:02:32 NapsberryPi weewxd[23495]:   File "/usr/lib/python3/dist-packages/gpiozero/devices.py", line 291, in _default_pin_factory
Feb 22 21:02:32 NapsberryPi weewxd[23495]:     raise BadPinFactory('Unable to load any default pin factory!')
Feb 22 21:02:32 NapsberryPi weewxd[23495]: gpiozero.exc.BadPinFactory: Unable to load any default pin factory!
Feb 22 21:02:32 NapsberryPi weewxd[23495]: CRITICAL __main__:     ****    File "/usr/lib/python3/dist-packages/gpiozero/devices.py", line 291, in _default_pin_factory
Feb 22 21:02:32 NapsberryPi weewxd[23495]: CRITICAL __main__:     ****      raise BadPinFactory('Unable to load any default pin factory!')
Feb 22 21:02:32 NapsberryPi weewxd[23495]: CRITICAL __main__:     ****  gpiozero.exc.BadPinFactory: Unable to load any default pin factory!
Feb 22 21:02:32 NapsberryPi weewxd[23495]: CRITICAL __main__:     ****  Exiting.
Feb 22 21:02:32 NapsberryPi systemd[1]: weewx.service: Main process exited, code=exited, status=1/FAILURE
Feb 22 21:02:32 NapsberryPi systemd[1]: weewx.service: Failed with result 'exit-code'.
Feb 22 21:02:32 NapsberryPi systemd[1]: weewx.service: Consumed 1.834s CPU time.

vince

unread,
Feb 22, 2024, 1:44:42 PM2/22/24
to weewx-user
You're going to need to share your weewx.conf file for this one.
You have to be referencing gpio stuff somewhere under the hood.

Running 'weectl extension list' would help explain your setup too....

Glen N

unread,
Feb 23, 2024, 3:51:58 PM2/23/24
to weewx...@googlegroups.com
Thanks,
I got it to run again, by restarting weewx???

I will keep an eye on it and it if plays up again come back for help.
Glen

You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/DXWydJ-si5E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/936437b6-0137-4c60-a668-15c99e348814n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages