Weewx 5.1 crashes with BYOWS driver

165 views
Skip to first unread message

Guido Groetie

unread,
Sep 22, 2024, 12:25:17 PM9/22/24
to weewx-user
I am running Weewx 5.1 on an rpi 4 with a BYOWS driver. It crashes several times a day at random times (weewx process stops somehow), below is the log file of a time where it crashes. I have created a crontab task that starts Weewx every hour (in case it has crashed and starts again) and that works, but then gaps appear, I can create that task every 5 minutes, but would rather get rid of the source of the problems and I can't figure out what is not going right now. Can anyone help me?

Log:
Sep 22 11:11:32 byows-jim weewxd[71261]: INFO weewx.engine: Main loop exiting. Shutting engine down.
Sep 22 11:11:32 byows-jim weewxd[71261]: INFO weewx.engine: Shutting down StdReport thread
Sep 22 11:11:32 byows-jim weewxd[71261]: CRITICAL __main__: Caught unrecoverable exception:
Sep 22 11:11:32 byows-jim weewxd[71261]: CRITICAL __main__:     ****  list index out of range
Sep 22 11:11:32 byows-jim weewxd[71261]: CRITICAL __main__:     ****  Traceback (most recent call last):
Sep 22 11:11:32 byows-jim weewxd[71261]: CRITICAL __main__:     ****    File "/usr/share/weewx/weewxd.py", line 127, in main
Sep 22 11:11:32 byows-jim weewxd[71261]: CRITICAL __main__:     ****      engine.run()
Sep 22 11:11:32 byows-jim weewxd[71261]: CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/engine.py", line 204, in run
Sep 22 11:11:32 byows-jim weewxd[71261]: CRITICAL __main__:     ****      for packet in self.console.genLoopPackets():
Sep 22 11:11:32 byows-jim weewxd[71261]: CRITICAL __main__:     ****    File "/etc/weewx/bin/user/byows_rpi.py", line 83, in genLoopPackets
Sep 22 11:11:32 byows-jim weewxd[71261]: CRITICAL __main__:     ****      data = self.station.get_data()
Sep 22 11:11:32 byows-jim weewxd[71261]: CRITICAL __main__:     ****             ^^^^^^^^^^^^^^^^^^^^^^^
Sep 22 11:11:32 byows-jim weewxd[71261]: CRITICAL __main__:     ****    File "/etc/weewx/bin/user/byows_rpi.py", line 147, in get_data
Sep 22 11:11:32 byows-jim weewxd[71261]: CRITICAL __main__:     ****      data["soilTemp1"] = self.get_soil_temp()
Sep 22 11:11:32 byows-jim weewxd[71261]: CRITICAL __main__:     ****                          ^^^^^^^^^^^^^^^^^^^^
Sep 22 11:11:32 byows-jim weewxd[71261]: CRITICAL __main__:     ****    File "/etc/weewx/bin/user/byows_rpi.py", line 129, in get_soil_temp
Sep 22 11:11:32 byows-jim weewxd[71261]: CRITICAL __main__:     ****      return self.temp_probe.read_temp()
Sep 22 11:11:32 byows-jim weewxd[71261]: CRITICAL __main__:     ****             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sep 22 11:11:32 byows-jim weewxd[71261]: CRITICAL __main__:     ****    File "/etc/weewx/bin/user/byows_rpi.py", line 189, in read_temp
Sep 22 11:11:32 byows-jim weewxd[71261]: CRITICAL __main__:     ****      success = self.crc_check(lines)
Sep 22 11:11:32 byows-jim weewxd[71261]: CRITICAL __main__:     ****                ^^^^^^^^^^^^^^^^^^^^^
Sep 22 11:11:32 byows-jim weewxd[71261]: CRITICAL __main__:     ****    File "/etc/weewx/bin/user/byows_rpi.py", line 180, in crc_check
Sep 22 11:11:32 byows-jim weewxd[71261]: Traceback (most recent call last):
Sep 22 11:11:32 byows-jim weewxd[71261]:   File "/usr/share/weewx/weewxd.py", line 226, in <module>
Sep 22 11:11:32 byows-jim weewxd[71261]: CRITICAL __main__:     ****      return lines[0].strip()[-3:] == "YES"
Sep 22 11:11:32 byows-jim weewxd[71261]: CRITICAL __main__:     ****             ~~~~~^^^
Sep 22 11:11:32 byows-jim weewxd[71261]:     main()
Sep 22 11:11:32 byows-jim weewxd[71261]:   File "/usr/share/weewx/weewxd.py", line 127, in main
Sep 22 11:11:32 byows-jim weewxd[71261]: CRITICAL __main__:     ****  IndexError: list index out of range
Sep 22 11:11:32 byows-jim weewxd[71261]:     engine.run()
Sep 22 11:11:32 byows-jim weewxd[71261]:   File "/usr/share/weewx/weewx/engine.py", line 204, in run
Sep 22 11:11:32 byows-jim weewxd[71261]:     for packet in self.console.genLoopPackets():
Sep 22 11:11:32 byows-jim weewxd[71261]:   File "/etc/weewx/bin/user/byows_rpi.py", line 83, in genLoopPackets
Sep 22 11:11:32 byows-jim weewxd[71261]: CRITICAL __main__:     ****  Exiting.
Sep 22 11:11:32 byows-jim weewxd[71261]:     data = self.station.get_data()
Sep 22 11:11:32 byows-jim weewxd[71261]:            ^^^^^^^^^^^^^^^^^^^^^^^
Sep 22 11:11:32 byows-jim weewxd[71261]:   File "/etc/weewx/bin/user/byows_rpi.py", line 147, in get_data
Sep 22 11:11:32 byows-jim weewxd[71261]:     data["soilTemp1"] = self.get_soil_temp()
Sep 22 11:11:32 byows-jim weewxd[71261]:                         ^^^^^^^^^^^^^^^^^^^^
Sep 22 11:11:32 byows-jim weewxd[71261]:   File "/etc/weewx/bin/user/byows_rpi.py", line 129, in get_soil_temp
Sep 22 11:11:32 byows-jim weewxd[71261]:     return self.temp_probe.read_temp()
Sep 22 11:11:32 byows-jim weewxd[71261]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sep 22 11:11:32 byows-jim weewxd[71261]:   File "/etc/weewx/bin/user/byows_rpi.py", line 189, in read_temp
Sep 22 11:11:32 byows-jim weewxd[71261]:     success = self.crc_check(lines)
Sep 22 11:11:32 byows-jim weewxd[71261]:               ^^^^^^^^^^^^^^^^^^^^^
Sep 22 11:11:32 byows-jim weewxd[71261]:   File "/etc/weewx/bin/user/byows_rpi.py", line 180, in crc_check
Sep 22 11:11:32 byows-jim weewxd[71261]:     return lines[0].strip()[-3:] == "YES"
Sep 22 11:11:32 byows-jim weewxd[71261]:            ~~~~~^^^
Sep 22 11:11:32 byows-jim weewxd[71261]: IndexError: list index out of range
Sep 22 11:11:32 byows-jim systemd[1]: weewx.service: Main process exited, code=exited, status=1/FAILURE
Sep 22 11:11:32 byows-jim systemd[1]: weewx.service: Failed with result 'exit-code'.
Sep 22 11:11:32 byows-jim systemd[1]: weewx.service: Consumed 5min 32.737s CPU time.'

salinois

unread,
Sep 22, 2024, 2:58:10 PM9/22/24
to weewx...@googlegroups.com

hello, I've had problems before but not several times a day. and I restart weewx.

bye

Patrick from FRANCE

--
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/7e9bbb9e-89bd-4d19-b5b9-c88af1c40a01n%40googlegroups.com.

Tom Keffer

unread,
Sep 23, 2024, 10:50:39 AM9/23/24
to weewx...@googlegroups.com
This looks like a problem in the BYOS driver. It makes assumptions about how the weather station responds that are not true. For example, it may be trying to parse an empty line.

I would file a report with the driver's author.

Message has been deleted

Guido Groetie

unread,
Sep 23, 2024, 2:18:37 PM9/23/24
to weewx-user
This is the second time I make a BYOWS weather station, with the other I have no problems? Can I check if there a difference in the code in both stations? Wich files should I check than?

Op maandag 23 september 2024 om 16:50:39 UTC+2 schreef Tom Keffer:
Message has been deleted

vince

unread,
Sep 23, 2024, 2:54:16 PM9/23/24
to weewx-user
From your logs, I'd say you should check to see if /etc/weewx/bin/user/byows_rpi.py is the same on the two stations.

Guido Groetie

unread,
Sep 23, 2024, 4:38:29 PM9/23/24
to weewx-user
How did you solve it?

Op zondag 22 september 2024 om 20:58:10 UTC+2 schreef salinois:

salinois

unread,
Sep 24, 2024, 6:58:30 AM9/24/24
to weewx...@googlegroups.com

hello,

I didn't do anything special. Here is the config of weewx.conf
A few lines

Guido Groetie

unread,
Sep 27, 2024, 10:14:33 AM9/27/24
to weewx-user
Weewx crashes randomly (several times a day) · Issue #16 · jardiamj/BYOWS_RPi (github.com)
Op dinsdag 24 september 2024 om 12:58:30 UTC+2 schreef salinois:
Reply all
Reply to author
Forward
0 new messages