cmon Unit system mismatch

Skip to first unread message

Lucas Heijst

Feb 21, 2023, 9:48:03 AM2/21/23
to weewx-development
The Computer monitor program ( doesn't call 'genLoopPackets' which yield loop data.
Once per archive interval 'new_archive_record' is called which in version 5.0.0a16 generates an 'Unit system mismatch' error.

Probably the default value is 'US' while uses 'METRIC'.

Do I have to solve this in (e.g. call  'genLoopPackets' once during init)?

cmon Unit system mismatch.txt

Lucas Heijst

Feb 21, 2023, 6:47:40 PM2/21/23
to weewx-development
As a test I replaced service ComputerMonitor with service alarm (copied from examples/ and got a similar exception.

        prep_services = weewx.engine.StdTimeSynch
        data_services = ,
        process_services = weewx.engine.StdConvert, weewx.engine.StdCalibrate, weewx.engine.StdQC, weewx.wxservices.StdWXCalculate
        xtype_services = weewx.wxxtypes.StdWXXTypes, weewx.wxxtypes.StdPressureCooker, weewx.wxxtypes.StdRainRater, weewx.wxxtypes.StdDelta
        archive_services = weewx.engine.StdArchive
        restful_services = ""
        report_services = weewx.engine.StdPrint, weewx.engine.StdReport, user.alarm.MyAlarm

I wonder if line 1624 in has something to do with the error (arbitrarily, pick the US unit system:)

    # Is the record None?
    if record_dict is None:
        # Yes. Signal a value of None and, arbitrarily, pick the US unit system:
        val = None
        std_unit_system = weewx.US
        # There is a record. Get the value, and the unit system.
        val = record_dict[obs_type]
        std_unit_system = record_dict['usUnits']

Op dinsdag 21 februari 2023 om 11:48:03 UTC-3 schreef Lucas Heijst:
alarn Unit system mismatch.txt

Tom Keffer

Feb 21, 2023, 7:01:27 PM2/21/23
to Lucas Heijst, weewx-development
The alarm example works for me without any problems.

I have not tried cmon: it's not part of weewx, and I have to draw the line somewhere!

You received this message because you are subscribed to the Google Groups "weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Lucas Heijst

Feb 22, 2023, 6:56:06 AM2/22/23
to weewx-development
Problem solved, my fault!

I tested command 'weectl station create --no-prompt', so I got a weewx.conf file with default values.
After that I edited weewx.conf to meet the data for ComputerMonitor and forgot to change the default 'target_unit' from US to METRIC.

Op dinsdag 21 februari 2023 om 21:01:27 UTC-3 schreef Tom Keffer:
Reply all
Reply to author
0 new messages