WeeWx 4.7.0 and TE923 weather station running on a Pi4. Problem when restarting (sudo /etc/init.d/weewx restart or Pi reboot)

107 views
Skip to first unread message

Pierre-Yves

unread,
Apr 19, 2022, 6:17:11 AM4/19/22
to weewx-user
Hello,

After having made a small change to the weewx.conf (station website registration), I experienced problems for restarting, typing "sudo /etc/init.d/weewx restart". Same result when rebooting the PI4.
About 20 times, the restart failed with the following syslog messages :

Apr 18 19:12:50 weewx weewx[2225] ERROR weewx.drivers.te923: Unrecognized archive interval '129'
Apr 18 19:12:50 weewx weewx[2225] INFO weewx.engine: Main loop exiting. Shutting engine down.
Apr 18 19:12:50 weewx weewx[2225] CRITICAL __main__: Caught WeeWxIOError: Unrecognized archive interval '129'
Apr 18 19:12:50 weewx weewx[2225] CRITICAL __main__:     ****  Waiting 60 seconds then retrying...

Finally at 19:37:29, weewx restart succeeded and since works fine.

I noticed also this syslog line :

Apr 18 19:12:50 weewx weewx[2225] INFO weewx.drivers.te923: station time is 1650236400.0, computer time is 1650301970

I do not understand why the station and computer timestamps are so different.

Syslog is attached

Any idea on what could cause that behavior ?

Thanks a lot,

Pierre-Yves
Syslog-18-04-2022-1.txt

gary....@gmail.com

unread,
Apr 19, 2022, 9:23:04 AM4/19/22
to weewx-user
You are going to need to post your weewx.conf, but the error says the archive interval is 129, which is apparently not a supported value. Change that to 300 (for 5 minutes) and see what transpires.

Follow this link on how to post a help request:
https://github.com/weewx/weewx/wiki/Help!-Posting-to-weewx-user

Pierre-Yves

unread,
Apr 19, 2022, 10:46:31 AM4/19/22
to weewx-user
Thanks Gary for feedback.
The config archive interval is correct.
[StdArchive]
   
    # If the station hardware supports data logging then the archive interval
    # will be downloaded from the station. Otherwise, specify it (in seconds).
    archive_interval = 300

I don't where this '129' value come from
the weewx.conf is attached
PY
weewx.conf

Pierre-Yves

unread,
Apr 20, 2022, 5:24:58 PM4/20/22
to weewx-user
Hello,

I made some progress I believe. The problem or restart seems to have disappeared ! But I don't know why...

First I did a test on a Pi3B+. I performed several stops, starts, restarts, reboots... It worked perfectly, without any error.
The configuration was the same as the Pi4 apart WeeWx 4.6.2 instead of 4.7.0.

I also checked that "wee_device --get-interval" returns "5min"

pi@weewx:~ $ sudo wee_device --get-interval
Using configuration file /etc/weewx/weewx.conf
Using TE923 driver version 0.41.1 (weewx.drivers.te923)
Interval: 5 min

Back to the Pi4/Weewx 4.7.0 with debug=1 I did the same test. The restart failed 3 times before it succeeded.

From the syslog/debug log, I believe I understood the following:  (log attached)

Restart fails after "weewx.drivers.te923: read: address 0x0000fe" returns "5a 81 ..." (81 hex = 129 dec) which is a unrecognized interval value

Apr 20 16:32:39 weewx weewx[31672] DEBUG weewx.drivers.te923: read: address 0x0000fe
Apr 20 16:32:39 weewx weewx[31672] DEBUG weewx.manager: Daily summary version is 4.0
Apr 20 16:32:39 weewx weewx[31672] DEBUG weewx.manager: Daily summary version is 4.0
Apr 20 16:32:39 weewx weewx[31672] DEBUG weewx.drivers.te923: read: 5a 81 27 ae 54 15 05 14 09 a2 51 69 c0 94 24 c0 80 65 c0 3c 70 71 c0 99 23 c2 53 00 00 f1 3f 06 62 78
Apr 20 16:32:39 weewx weewx[31672] ERROR weewx.drivers.te923: Unrecognized archive interval '129'
Apr 20 16:32:39 weewx weewx[31672] INFO weewx.engine: Main loop exiting. Shutting engine down.
Apr 20 16:32:39 weewx weewx[31672] DEBUG weewx.restx: Shut down AWEKAS thread.
Apr 20 16:32:39 weewx weewx[31672] DEBUG weewx.restx: Shut down Wunderground-PWS thread.
Apr 20 16:32:39 weewx weewx[31672] DEBUG weewx.restx: Shut down StationRegistry thread.
Apr 20 16:32:39 weewx weewx[31672] CRITICAL __main__: Caught WeeWxIOError: Unrecognized archive interval '129'
Apr 20 16:32:39 weewx weewx[31672] CRITICAL __main__:     ****  Waiting 60 seconds then retrying...

In that situation, "wee_device --get-interval" returns "Unknown"

Restart succeeds when "read: address 0x0000fe" returns "5a 01..." 01 which is recognized by the te923 driver as a valid interval: 5min or 300s.

Apr 20 16:34:49 weewx weewx[31672] DEBUG weewx.drivers.te923: read: address 0x0000fe
Apr 20 16:34:49 weewx weewx[31672] DEBUG weewx.manager: Daily summary version is 4.0
Apr 20 16:34:49 weewx weewx[31672] DEBUG weewx.manager: Daily summary version is 4.0
Apr 20 16:34:49 weewx weewx[31672] DEBUG weewx.drivers.te923: read: 5a 01 28 ad 54 15 05 14 09 a2 51 69 c0 94 24 c0 80 65 c0 3c 70 71 c0 99 23 c2 53 00 00 f1 3f 06 62 f4
Apr 20 16:34:49 weewx weewx[31672] DEBUG weewx.drivers.te923: read: address 0x0000fb
Apr 20 16:34:49 weewx weewx[31672] DEBUG weewx.drivers.te923: read: 5a 22 02 06 01 28 ad 54 15 05 14 09 a2 51 69 c0 94 24 c0 80 65 c0 3c 70 71 c0 99 23 c2 53 00 00 f1 89
Apr 20 16:34:49 weewx weewx[31672] DEBUG weewx.drivers.te923: record_index=1576
Apr 20 16:34:49 weewx weewx[31672] DEBUG weewx.drivers.te923: count=5 oldest_addr=0x00ea33 latest_addr=0x00eacb
Apr 20 16:34:49 weewx weewx[31672] DEBUG weewx.drivers.te923: get_record at address 0x00ea33 (year=2022 month=4)
Apr 20 16:34:49 weewx weewx[31672] DEBUG weewx.drivers.te923: read: address 0x00ea33
Apr 20 16:34:49 weewx weewx[31672] DEBUG weewx.drivers.te923: read: 5a 34 20 16 14 23 a2 47 97 c1 39 91 c1 33 94 c3 09 20 18 c2 42 21 c2 47 aa 0a 0f 3f 03 37 c2 60 00 c2
Apr 20 16:34:49 weewx weewx[31672] DEBUG weewx.drivers.te923: read: address 0x00ea43
Apr 20 16:34:49 weewx weewx[31672] DEBUG weewx.drivers.te923: read: 5a 20 18 c2 42 21 c2 47 aa 0a 0f 3f 03 37 c2 60 00 56 00 01 97 0c 42 34 20 16 19 23 a2 47 95 c1 39 7e
...

Since that moment, everything works fine. I am not anymore able to reproduce the error.
A question still remains: where this 81 hex wrong value does come from ?

To be continued

Pierre-Yves
Syslog-2022-04-20-1631
Reply all
Reply to author
Forward
0 new messages