I don't think this has to be a problem: just change the unit system on the
Pi, so it matches the unit system of the database file from the old CentOS
system, METRICWX:

[StdConvert]
    # DO NOT MODIFY THIS VALUE UNLESS YOU KNOW WHAT YOU ARE DOING!
    target_unit = METRICWX    # Options are 'US', 'METRICWX', or 'METRIC'

NB: This is why that warning is there! Not only that, but the Vantage
series emits data in the US Customary system, so the converted data will
have lots of digits beyond the decimal point, making it less readable.

To answer your other questions:

1. Try this

*sqlite3 weewx.sdb*
*select min(usUnits), max(usUnits) from archive;*

This will show one of

1|1:  Us Customary
10|10: Metric
11|11: MetricWX

anything else and you've got mixed units in your database.

2. Yes, this can be done. You use the utility wee_database with the
--reconfigure
<http://www.weewx.com/docs/utilities.htm#Action_--reconfigure11> option.
But, why do it?

3. Yes. The units in the database are completely independent of the units
used for reporting. The former should be optimized around the hardware you
are using, which, in your case, is US Customary. The latter are about your
locale, which means setting the various unit groups to metric units.

-tk



On Sun, Sep 1, 2019 at 7:45 AM WindnFog <foc1...@gmail.com> wrote:

> Here's the context. My weakness is understanding databases in general. For
> almost 4 years, I have been weewx on a CentOS system capturing data from a
> Vantage Vue Console. My weewx.sdb file has nearly 4 years of historical
> data. That's the workhorse and is chugging along nicely.
>
>
> A week ago, I set up a parallel system on a Raspberry Pi 4 with a second
> Vantage Vue Console. That works well. The goal is to replace the CentOS
> system with the Pi. Two days ago, I renamed the weewx.sdb file on the new
> system, and replaced it with a copy of the one from the CentOS setup. The
> idea was to start adding data from the logger to the original database. I
> am getting the following error:
>
>
> "**** Unit system of incoming record (0x01) differs from 'archive' table
> in 'weewx.sdb' database (0x10)"
>
>
> I note that in 2018 someone else had the same error and asked the group
> for help. Tom's response was,* "Here's the most likely explanation: When
> you first started weeWX, you used a database in US units. Then you tried to
> change it to Metric. As explained in the **User's Guide
> <http://weewx.com/docs/usersguide.htm#StdConvert>, 'Once chosen, [the unit
> system] cannot be changed! WeeWX does not allow you to mix unit systems
> within the databases. You must choose a unit system and then stick with
> it.' If you did not try to change unit systems, then it must be something
> else."*
>
>
> I know I set up the Pi a week ago as metric. I don't remember how I set up
> the original CentOS instance. I may well have used US units because I was a
> weewx newbie at the time. I *think* one can do that and still display them
> as metric if you configure the skin.conf and/or weewx.conf file
> accordingly. All of my display data is metric.
>
>
> I have spent a couple of days reading the documentation. The database
> sections aren't clicking with me. If there's a way out of this, I can't see
> it (or understand it.)
>
>
> That's the situation. My questions are:
>
>
> (1) How can I find out which units the original weewx.sdb is using?
>
> (2) If they are US, is there a utility or way to export them and then
> import them into a metric system?
>
> (3) If there is no way, is the best way out of this to set up the Pi again
> using US units? I assume if the old system is US and working and displaying
> metric units, I can do the same on my new installation.
>
>
> While I'm hesitant to ask what may be a questions with obvious answers,
> for the life of me I can't find them in the documention or on the Internet.
>
>
> Paul VE1DX
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/58de53f1-f8a4-4bbb-97c2-a4dabc949f46%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-user/58de53f1-f8a4-4bbb-97c2-a4dabc949f46%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 weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/CAPq0zEAXp63%3Dt8SDy%3DwM4zmftH59-Hm_4z4%2B-mKpBy2kNZxqsA%40mail.gmail.com.

Reply via email to