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!

On Tue, Feb 21, 2023 at 3:47 PM Lucas Heijst <[email protected]> wrote:

> As a test I replaced service ComputerMonitor with service alarm (copied
> from examples/alarm.py) and got a similar exception.
>
> weewx_cmon.conf
> ...
>     [[Services]]
>         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 units.py 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
>     else:
>         # 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:
>
>> The Computer monitor program (cmon.py) 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 cmon.py uses 'METRIC'.
>>
>> Do I have to solve this in cmon.py (e.g. call  'genLoopPackets' once
>> during init)?
>>
>> Luc
>>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-development/d3a9ba87-b9e4-414a-ba9a-bb31855ed730n%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-development/d3a9ba87-b9e4-414a-ba9a-bb31855ed730n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-development/CAPq0zEBxMar2YB6mgLG5P5UKuLyR0TKUgpzpbN92mExwXxLchA%40mail.gmail.com.

Reply via email to