Wind Missing from Database

56 views
Skip to first unread message

William Reinhardt

unread,
Nov 10, 2021, 6:45:34 PM11/10/21
to weewx-user
Hello all,

Back in July, I successfully added a couple new observation types ("appTemp" and "cloudbase") to my SQLite database by following these instructions:

Inexplicably, the "archive_day_wind" table was missing afterwards! The other wind-related tables ("archive_day_windDir", "archive_day_windGust," etc.) are still in the database, just the "wind" table is missing. I'll post the Debug errors from the syslog at the end of this post. Let me know if you need more. It also shows up on my weather station website at www.woodvilleweather.com. In the "Weather Records Snapshot" section, the Average and Highest Wind data show as $day.wind.avg, $month.wind.avg, etc., with similar errors since July 2021 in the Reports page. I verified the absence of the table using a SQLite database viewer to open old database backups from before and after I added the observations in July.

My question is: how can I regain the wind table? Is there a wee_database command to add this table? Add a new observation type and call it "wind"? Copy-paste from a backup database and rebuild the daily data? My weather station stores no data so I can't get it from there. It's been a busy summer and I'm now just getting time to play with this and get my WEEWX box working 100% again. Thanks for any ideas.

-Bill

Debug info:
Nov 10 18:30:30 WX_WS1 weewx[29868] DEBUG weewx.cheetahgenerator: Unrecognized: $day.wind.max
Nov 10 18:30:30 WX_WS1 weewx[29868] DEBUG weewx.cheetahgenerator: Unrecognized: $day.wind.maxtime
Nov 10 18:30:30 WX_WS1 weewx[29868] DEBUG weewx.cheetahgenerator: Unrecognized: $day.wind.gustdir
Nov 10 18:30:30 WX_WS1 weewx[29868] DEBUG weewx.cheetahgenerator: Unrecognized: $day.wind.avg
Nov 10 18:30:30 WX_WS1 weewx[29868] DEBUG weewx.cheetahgenerator: Unrecognized: $day.wind.vecdir
Nov 10 18:30:30 WX_WS1 weewx[29868] DEBUG weewx.cheetahgenerator: Unrecognized: $day.wind.vecavg
Nov 10 18:30:30 WX_WS1 weewx[29868] DEBUG weewx.cheetahgenerator: Unrecognized: $day.wind.rms
Nov 10 18:30:30 WX_WS1 weewx[29868] DEBUG weewx.cheetahgenerator: Unrecognized: $week.wind.max
Nov 10 18:30:30 WX_WS1 weewx[29868] DEBUG weewx.cheetahgenerator: Unrecognized: $week.wind.maxtime
Nov 10 18:30:30 WX_WS1 weewx[29868] DEBUG weewx.cheetahgenerator: Unrecognized: $week.wind.gustdir
Nov 10 18:30:30 WX_WS1 weewx[29868] DEBUG weewx.cheetahgenerator: Unrecognized: $week.wind.avg
Nov 10 18:30:30 WX_WS1 weewx[29868] DEBUG weewx.cheetahgenerator: Unrecognized: $week.wind.vecdir
Nov 10 18:30:30 WX_WS1 weewx[29868] DEBUG weewx.cheetahgenerator: Unrecognized: $week.wind.vecavg
Nov 10 18:30:30 WX_WS1 weewx[29868] DEBUG weewx.cheetahgenerator: Unrecognized: $week.wind.rms
Nov 10 18:30:31 WX_WS1 weewx[29868] DEBUG weewx.cheetahgenerator: Unrecognized: $month.wind.max
Nov 10 18:30:31 WX_WS1 weewx[29868] DEBUG weewx.cheetahgenerator: Unrecognized: $month.wind.maxtime
Nov 10 18:30:31 WX_WS1 weewx[29868] DEBUG weewx.cheetahgenerator: Unrecognized: $month.wind.gustdir
Nov 10 18:30:31 WX_WS1 weewx[29868] DEBUG weewx.cheetahgenerator: Unrecognized: $month.wind.avg
Nov 10 18:30:31 WX_WS1 weewx[29868] DEBUG weewx.cheetahgenerator: Unrecognized: $month.wind.vecdir
Nov 10 18:30:31 WX_WS1 weewx[29868] DEBUG weewx.cheetahgenerator: Unrecognized: $month.wind.vecavg
Nov 10 18:30:31 WX_WS1 weewx[29868] DEBUG weewx.cheetahgenerator: Unrecognized: $month.wind.rms
Nov 10 18:30:31 WX_WS1 weewx[29868] DEBUG weewx.cheetahgenerator: Unrecognized: $year.wind.max
Nov 10 18:30:31 WX_WS1 weewx[29868] DEBUG weewx.cheetahgenerator: Unrecognized: $year.wind.maxtime
Nov 10 18:30:31 WX_WS1 weewx[29868] DEBUG weewx.cheetahgenerator: Unrecognized: $year.wind.gustdir
Nov 10 18:30:31 WX_WS1 weewx[29868] DEBUG weewx.cheetahgenerator: Unrecognized: $year.wind.avg
Nov 10 18:30:31 WX_WS1 weewx[29868] DEBUG weewx.cheetahgenerator: Unrecognized: $year.wind.vecdir
Nov 10 18:30:31 WX_WS1 weewx[29868] DEBUG weewx.cheetahgenerator: Unrecognized: $year.wind.vecavg
Nov 10 18:30:31 WX_WS1 weewx[29868] DEBUG weewx.cheetahgenerator: Unrecognized: $year.wind.rms

vince

unread,
Nov 10, 2021, 6:52:17 PM11/10/21
to weewx-user
You might try to run wee_database and --drop-daily to drop all the summary tables and then run it again --rebuild-daily option to rebuild tham (after backing up your existing database someplace safe !!!)

If you run the wview_extended schema that is the new default for new installations in v4 you will get the two elements you added without any manual intervention required.   After you get your summary tables rebuilt ok you might want to just switch to the new extended schema.

Tom Keffer

unread,
Nov 10, 2021, 7:07:02 PM11/10/21
to weewx-user
How a database schema is specified changed in V4.0. The newer wview_extended schema uses the new way, the older wview schema uses the old way. My hunch is that you're mixing the new way and the old way. 

Take a look in the [[wx_binding]] section of weewx.conf. You want either:

# Old way, using wview schema
[DataBindings]

    [[wx_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 = archive_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.schema


# New way, using wview_extended schema
[DataBindings]

    [[wx_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 = archive_sqlite
        # The name of the table within the database
        table_name = archive
        # The manager handles aggregation of data for historical summaries
        manager = weewx.manager.DaySummaryManager
        # The schema defines the structure of the database.
        # It is *only* used when the database is created.
        schema = schemas.wview_extended.schema

If you're using the older wview schema, make sure the manager is set to weewx.wxmanager.WXDaySummaryManager. Then, use wee_database to drop, then rebuild the daily summaries.

-tk




--
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/766f2e09-9b9f-4604-a939-a406e31b1639n%40googlegroups.com.

William Reinhardt

unread,
Nov 11, 2021, 9:20:04 AM11/11/21
to weewx-user
Thanks for the info! I'll be sure the schema matches above. It's very likely I'm trying to mix schemas. Will let you know what happens.

William Reinhardt

unread,
Nov 11, 2021, 10:31:10 AM11/11/21
to weewx-user
That did it! I found I'm running the v4.0 schema, and the [[wx_binding] section of weewx.conf matches the new schema configuration. After doing a drop-daily and rebuild-daily, and waiting for the next archive intervals, it all came back.
Thanks very much for your assistance!
Reply all
Reply to author
Forward
0 new messages