You did some impressive digging, there!

There are now two different ways of specifying a schema. The old, V3.9 way,
and a new V4.0 way. The new way is more flexible, although the old way is
still supported.

The problem is that you're mixing methods. The old way used the superclass
manager weewx.wxmanager.WXDaySummaryManager to add in the wind. The new way
mentions it explicitly in the schema.

Stick with one or the other and you'll be OK.

In any case, the database itself has not changed. If you just continue to
use your "old" database, it will work fine in V4.0. The only thing that's
changed is how to specify the schema for a brand new database.

Hope that helps.

-tk

On Thu, May 21, 2020 at 8:52 AM RothMa <rothmartin1...@gmail.com> wrote:

> Hello,
> i have installed the new stable version 4.0 in parallel (as described in
> the WIKI beta test) to test if my hardware and my own extensions work with
> python3.
> I started with a new database and a new weewx.conf.
> My old installation is weewx 3.9.1 (here the database and the weewx.conf
> was created with version 3.8.0).
> During my tests with the new version I have now encountered a strange
> behaviour. Suddenly the database has lost the table "archive_daily_wind".
> On my search for the error I then came across this thread:
> https://groups.google.com/forum/m/#!topic/weewx-development/ODJ-VnkZS_0
> With this thread I was able to research and reproduce the behaviour on my
> computer.
> The database was created with the new weewx.conf here is used:
> schema = schemas.wview_extended.schema
> manager = weewx.manager.DaySummaryManager
>
> Afterwards I made my extension:
> import schemas.wview
>
> schema_with_sunshineHours = schemas.wview.schema + [('sunshineHours',
> 'REAL')]
>
> After changing the weewx.conf to "schema =
> user.sunshine.schema_with_sunshineHours" and a "wee_database --reconfigure"
> and "wee_database --rebuild-daily" the table "archive_daily_wind" was
> missing.
>
> If I make the extension using the new schema:
> import schemas.wview_extended
> schema_with_sunshineHours = {
>    'table': schemas.wview_extended.table + [('sunshineHours', 'REAL')]
>    'day_summaries' : schemas.wview_extended.day_summaries + [(
> 'sunshineHours', 'SCALAR')]
>
> and a "wee_database --reconfigure" and "wee_database --rebuild-daily" the
> table is not lost.
>
> Obviously the schemas and managers are not interchangeable and
> interdependent. I am a bit confused now, which is probably the right
> setting.
>
> My old installation uses
> manager = weewx.wxmanager.WXDaySummaryManager
> and an extended schema based on
> schemas.wview
>
> The new version 4.0 uses as default
> manager = weewx.manager.DaySummaryManager
> schema = schemas.wview_extended.schema
>
> In the documentation a third manager is also specified as default
> weewx.wxmanager.DaySummaryManager
>
> What are the differences between the managers?
> Where are the differences between the two schemas?
> Is there a documentation to read?
> Which schema and which manager are recommended and how to update the
> database to Verion 4.0?
>
> I look forward to your answers and thank you for the great program
> Martin
>
> --
> 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/b1496823-2571-4320-aeee-53800a430036%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-user/b1496823-2571-4320-aeee-53800a430036%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/CAPq0zEA4Z9uW-n7CyMYMJXpZ78d7t2oOf11NDMdJw1mM51XpOw%40mail.gmail.com.

Reply via email to