Vince is right that you need V4.5.

But, your command is also wrong. Review the docs for wee_database
<http://www.weewx.com/docs/utilities.htm#wee_database_utility>.

The --config option selects a *configuration file*, such as weewx.conf, not
a database.

The --binding option selects the *binding*. By default, it uses the binding
wx_binding.

So, if you want to use a second database, such as envoy.sdb, it must first
be listed as a binding. For example,

[DataBindings]

    [[envoy_binding]]
        # The database must match one of the sections in [Databases].
        # This is likely to be the only option you would want to change.
        database = envoy_sqlite
        # The name of the table within the database
        table_name = archive
        # The manager handles aggregation of data for historical summaries
        manager = weewx.wxmanager.WXDaySummaryManager
        # The schema defines the structure of the database.
        # It is *only* used when the database is created.
        schema = schemas.wview_extended.schema

[Databases]

    # A SQLite database is simply a single file
    [[envoy_sqlite]]
        database_name = envoy.sdb
        database_type = SQLite

This sets up a new binding envoy_binding, which uses envoy.sdb. Now you can
add a new column to the new binding:

*wee_database --add-column=mynewcolumn --binding=envoy_binding*



On Mon, Apr 19, 2021 at 12:57 PM vince <vinceska...@gmail.com> wrote:

> Your weewx is too old.  You need to update to 4.5.0 or later according to
> the release notes at https://github.com/weewx/weewx/releases
>
>
> On Monday, April 19, 2021 at 11:38:54 AM UTC-7 weatherl...@gmail.com
> wrote:
>
>> I am asking just that but I can’t see how —binding might work
>>
>> When I installed the Envoy drive, it still uses wx_binding when in
>> creates envoy.sdb
>>
>> So I tried:
>>
>> In /home/weewx:
>>
>> sudo bin/wee_database --add-column=energy_total --config=archive/envoy.sdb
>>
>> And it throws an error:
>>
>> wee_database: error: no such option: --add-column
>>
>> On 16 Apr, 2021, at 17:58, vince <vince...@gmail.com> wrote:
>>
>> (untested but...) see if the --binding option gets you what you're
>> looking for, if you're asking how to add column(s) to a secondary database
>> other than the default one.
>>
>> On Friday, April 16, 2021 at 2:54:19 PM UTC-7 weatherl...@gmail.com
>> wrote:
>>
>>> From the WeeWx docs:
>>>
>>> Adding a new type to an existing database
>>>
>>> Here's how you would add the observation type electricity (from the
>>> example *Adding a second data source*
>>> <http://weewx.com/docs/customizing.htm#Adding_2nd_source>) to an
>>> existing database by using wee_database:
>>>
>>> wee_database --add-column=electricity
>>>
>>>
>>> But if I want to specify **which** .sdb file can I do:
>>>
>>> wee_database --add-column=mynewcolumn --config=another.sdb (which
>>> already exists).
>>>
>>> WeeWx 4.4.1
>>> Python 3.7
>>> Raspian Desktop Buster
>>>
>>
>> --
>> 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.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/weewx-user/961ff186-7efa-4306-9e21-4fa6c505e9e2n%40googlegroups.com
>> <https://groups.google.com/d/msgid/weewx-user/961ff186-7efa-4306-9e21-4fa6c505e9e2n%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/3a4ffda4-c4c6-4506-af39-22d5140e81ddn%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-user/3a4ffda4-c4c6-4506-af39-22d5140e81ddn%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/CAPq0zECBhPoP3CSaJJZ-EdxKOKj5kziWGZTF%3DqbWiJo2x%3D0QkA%40mail.gmail.com.

Reply via email to