Good sleuthing! The solution is a lot simpler: svc_dict is actually an ordered dictionary (specifically, a ConfigObj.section). So, all we have to do is make sure they are listed in the correct order in DEFAULTS_INI. Right now, they are in alphabetical order.
-tk On Thu, Jan 30, 2020 at 1:00 AM gjr80 <[email protected]> wrote: > OK, had another look and I see the problem; the changes in the 'Bad > commit' inadvertently caused WeeWX to try to calculate altimeter before > pressure and since altimeter is dependent on pressure that causes a > problem if pressure does not exist (as is the case on a Davis system > using other than LOOP2). I have applied a fix to the 4.0 code base, guess > we will see if that survives Tom's critical eye, but either way 4.0 will > have the problem fixed. > > Well spotted and thanks. > > Gary > > On Thursday, 30 January 2020 14:05:24 UTC+10, gjr80 wrote: >> >> I just updated to the latest 4.0 code and ran it under python3 with the >> simulator providing only barometer out of the three pressures (for the >> purposes of this exercise this is closely resembles the Davis loop packet). >> altimeter was not calculated for each loop packet; however, it was >> calculated for and appeared in each archive record. Coupled with the >> changes in the 'First_Know_Bad_commit' being of a cosmetic nature only I am >> not convinced yet there is an issue in the code base. Nothing seems out of >> place in your log or config, can you run WeeWX directly >> <http://weewx.com/docs/usersguide.htm#Running_directly> and provide >> screen captures of the console output making sure we see at least one >> archive record (lines starting with REC:) and the loop packets (lines >> starting with LOOP:) leading up to the archive record. >> >> Gary >> >> On Wednesday, 29 January 2020 13:04:54 UTC+10, Paul Anderson wrote: >>> >>> Hi All, >>> First off huge fan of WeeWx it is amazing software written by an >>> unbelievable group of developers ! Thank you all for your tireless effects >>> and dedication. >>> >>> Running Beta 4 version 4.0.0b10 >>> Hardware Vantage Pro 2 >>> Set to use LOOP1 so WeeWx needs to calculate altimeter as it's not in >>> LOOP1. >>> Unfortunately it seems to silently fail to calculate altimeter, if used >>> in a tag it returns as na. >>> And a sqlite query returns: >>> Note the missing altimeter values. >>> sqlite> select datetime, barometer,altimeter,pressure from archive order >>> by datetime desc limit 5; >>> 1580259900|29.792||29.6113663568201 >>> >>> I know this is going to sound crazy, the issue seems to have began at >>> this commit: >>> I'm sure that Halloween Goblins were somehow involved :) >>> >>> First Know Bad commit >>> Document parameters of WXCalculate.__init__ >>> >>> https://github.com/weewx/weewx/commit/bb130bb55c3c941c9160388161198ada199b3032 >>> @tkeffer >>> tkeffer committed on Oct 31, 2019 >>> >>> Last Know Good commit >>> Don't bail on a type until you have to. >>> >>> https://github.com/weewx/weewx/commit/2286aece0abdaa2d1fc67e7da0627a620b9673ff >>> @tkeffer >>> tkeffer committed on Oct 30, 2019 >>> >>> Ran each commit with the same weewx.conf >>> Logged the run and put a sqlite query at the bottom. >>> >>> Because I had such a difficult time believing it has gone unnoticed so >>> long looked for some evidence beyond my own setup. TK your DW3693 station >>> stopped sending altimeter data to CWOP on 2019-11-09T23:10:00Z >>> CWOP hasn't seen a Pressure reading from DW3693 since then. >>> I'm guessing that you updated to First Know Bad commit at that time or >>> Switched from LOOP2 to LOOP1 at that time? >>> LAST Barometric Pressure to CWOP Nov 9 23:00 Z >>> >>> Station Date_Time altimeter air_temp >>> _ID >>> D3693,2019-11-09T22:20:00Z,30.16,55.99,71.0 >>> D3693,2019-11-09T22:30:00Z,30.16,55.99,70.0 >>> D3693,2019-11-09T22:40:00Z,30.17,55.99,70.0 >>> D3693,2019-11-09T22:50:00Z,30.16,55.99,70.0 >>> D3693,2019-11-09T23:00:00Z,30.16,55.99,70.0 >>> D3693,2019-11-09T23:10:00Z,,55.99,70.0 >>> D3693,2019-11-09T23:15:00Z,,55.99,71.0 >>> D3693,2019-11-09T23:25:00Z,,55.0,71.0 >>> D3693,2019-11-09T23:35:00Z,,55.0,71.0 >>> D3693,2019-11-09T23:45:00Z,,55.0,73.0 >>> >>> >>> Thanks, >>> Paul >>> >>> Attached >>> 4.0.0b10.log.txt >>> Last_Know_Good_Commit_2286a.log.txt >>> First_Know_Bad_commit_bb130.log.txt >>> weewx.conf.txt >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/weewx-user/688dcca9-89e1-4c13-a3ea-51e0a728c079%40googlegroups.com > <https://groups.google.com/d/msgid/weewx-user/688dcca9-89e1-4c13-a3ea-51e0a728c079%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/CAPq0zEDteVux8OOA9BK9dVT2n%2BEcKqWccnyN1kM51WxdhufgtA%40mail.gmail.com.
