You need to make them an array. Something like:
schema = schemas.wview.schema + [('appTemp', 'REAL'), ('windrun',
'REAL')]
On Wednesday, December 26, 2018 at 6:27:53 PM UTC-5, Colin Larsen wrote:
>
> Maybe I did it wrong - but all I did was add the 2 new fields in the
> original wview schema, which for me was hiding in /var/lib/weewx/schemas
> from memory and then did the --rebuild which ran perfectly.
>
> There may be a good reason for not doing that :) so I may not be giving
> you the best advice but it did work fine.
>
> Colin
>
> On Thu, Dec 27, 2018 at 12:19 PM Scott Grayban <[email protected]
> <javascript:>> wrote:
>
>> I tried adding 1 at a time but it deletes the previous one. Certainly you
>> should be able to add more then just 1 right ?
>>
>> On Wednesday, December 26, 2018 at 6:54:40 AM UTC-8, Andrew Milner wrote:
>>>
>>> I think You should probably only have one new schema specified - not two
>>> - when you do the reconfigure
>>>
>>>
>>>
>>> On Wednesday, 26 December 2018 14:19:27 UTC+2, Scott Grayban wrote:
>>>>
>>>> Step 2 is not working at all for me...
>>>>
>>>> If I have
>>>> * schema = user.extensions.schema_apptemp*
>>>> * schema = user.extensions.schema_windrun*
>>>>
>>>> added in the
>>>>
>>>> *[DataBindings]*
>>>> * [[wx_binding]]*
>>>>
>>>>
>>>> *wee_database weewx.conf --reconfigure*
>>>>
>>>> Gives this error
>>>>
>>>> *configobj.DuplicateError: Duplicate keyword name at line 402.*
>>>>
>>>>
>>>> On Sunday, December 9, 2018 at 1:51:15 PM UTC-8, Philip Kutzenco wrote:
>>>>
>>>> 2) Stop weewx and edit weewx.conf to tell it to use this new schema
>>>>> extension by adding the *schema = line* below to the [DataBindings]
>>>>> stanza:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> *[DataBindings] [[wx_binding]] ...schema =
>>>>> user.extensions.schema_apptemp*
>>>>>
>>>>>
>>>>>
>>>>> 3) Create a new copy of the database with the extended schema
>>>>>
>>>>> *wee_database weewx.conf --reconfigure*
>>>>> and then rename the databases
>>>>>
>>>>>
>>>>>
>>>>> 4) Rebuild the database with new daily values
>>>>>
>>>>> *Sudo wee_database --rebuild-daily*
>>>>>
>>>>>
>>>>>
>>>>> 5) restart weewx
>>>>>
>>>>> phil
>>>>>
>>>>> On Sunday, December 9, 2018 at 4:27:23 PM UTC-5, Dj Merrill wrote:
>>>>>>
>>>>>> Please forgive my ignorance. It is not clear after reading the
>>>>>> instructions on extending the database precisely what I should do in
>>>>>> this
>>>>>> case. Obviously we don't have an "user/electricity.py" file, but we do
>>>>>> have a "user/belchertown.py" file.
>>>>>>
>>>>>> Should I modify the "belchertown.py" file with something like:
>>>>>>
>>>>>> import schemas.wview
>>>>>> schema_with_apptemp = schemas.wview.schema + [('appTemp', 'REAL')]
>>>>>>
>>>>>>
>>>>>> Then modify weewx.conf to have:
>>>>>>
>>>>>> [DataBindings]
>>>>>> [[wx_binding]]
>>>>>> database = archive_sqlite
>>>>>> table_name = archive
>>>>>> manager = weewx.wxmanager.WXDaySummaryManager
>>>>>> schema = user.belchertown.schema_with_apptemp
>>>>>>
>>>>>>
>>>>>> I am using SQLlite so I believe I can skip step 3.
>>>>>>
>>>>>> Then, "wee_database weewx.conf --reconfigure" and rename the
>>>>>> databases?
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> -Dj
>>>>>>
>>>>>> --
>> 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.