Just realized that you're using the as3935 service. In your weewx.conf,
make sure that it is included *before* StdConvert. So, your [Engine]
section should look something like this (NOT TESTED):

[Engine]

    [[Services]]
        # This section specifies the services that should be run. They are
        # grouped by type, and the order of services within each group
        # determines the order in which the services will be run.
        prep_services = weewx.engine.StdTimeSynch
        data_services = user.as3935.AS3935
        process_services = weewx.engine.StdConvert,
weewx.engine.StdCalibrate, weewx.engine.StdQC,
weewx.wxservices.StdWXCalculate
        archive_services = weewx.engine.StdArchive
        restful_services = weewx.restx.StdStationRegistry,
weewx.restx.StdWunderground, weewx.restx.StdPWSweather,
weewx.restx.StdCWOP, weewx.restx.StdWOW, weewx.restx.StdAWEKAS
        report_services = weewx.engine.StdPrint, weewx.engine.StdReport

-tk


On Sun, Sep 25, 2016 at 6:50 AM, Steve Sykes <sesyke...@gmail.com> wrote:

> Hi Tom,
>
> I have not modified [StdConvert]. Another interesting thing is that I
> don't believe that my extensions.py is getting read. I had to modify
> wview.py to get the database to include the lightning_strikes and
> avg_distance.
>
>
> [StdConvert]
>
>     # The target_unit affects only the unit system in the database. Once
>     # chosen it cannot be changed without converting the entire database.
>     # Modification of target_unit after starting weewx will result in
>     # corrupt data - the database will contain a mix of US and METRIC data.
>     #
>     # The value of target_unit does not affect the unit system for
>     # reporting - reports can display US, Metric, or any combination of
> units.
>     #
>     # In most cases, target_unit should be left as the default: US
>     #
>     # In particular, those migrating from a standard wview installation
>     # should use US since that is what the wview database contains.
>
>     # DO NOT MODIFY THIS VALUE UNLESS YOU KNOW WHAT YOU ARE DOING!
>     target_unit = US    # Options are 'US', 'METRICWX', or 'METRIC'
>
> ############################################################
> ##################
>
>
> On Saturday, September 24, 2016 at 10:18:47 PM UTC-4, Tom Keffer wrote:
>>
>> Your database is set up with US units, but you are trying to put  METRIC
>> into it.
>>
>> What does your section [StdConvert] look like in weewx.conf? Did you
>> change it?
>>
>> What the driver sends out does not matter (so long as it is correct!). It
>> is the job of the StdConvert service to convert it into the unit system
>> used by the database.
>>
>> -tk
>>
>> On Sat, Sep 24, 2016 at 7:07 PM, Steve Sykes <sesy...@gmail.com> wrote:
>>
>>> I am still getting this in the log.  I am running as3935.py v0.5rc1.
>>>
>>> Sep 24 21:32:55 raspberrypi weewx[9576]: as3935: strike at 1.0 km
>>> Sep 24 21:32:55 raspberrypi weewx[9576]: as3935: callback failed: Unit
>>> system of incoming record (0x10) differs from 'archive' table in
>>> 'weewx.sdb' database (0x01)
>>>
>>>
>>> Checking the database shows that the column and data are in the
>>> database.  I see that the distance units are shown in miles and the as3935
>>> sends distance in km.
>>>
>>> sqlite3> select avg_distance, lightning_strikes from archive;
>>>
>>> 3.10685596|2.0
>>> 3.10685596|3.0
>>> 1.864113576|2.0
>>> 0.621371192|1.0
>>> 0.621371192|1.0
>>> 0.621371192|2.0
>>> 0.621371192|1.0
>>> 0.621371192|1.0
>>>
>>>
>>> I am sure the strike at 1 km is just noise but it is helpful as a
>>> diagnostic.  Should just ignore the log?
>>>
>>> Steve
>>>
>>> --
>>> 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.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> 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+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to