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 <[email protected]
> <javascript:>> 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 [email protected] <javascript:>.
>> 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 [email protected].
For more options, visit https://groups.google.com/d/optout.