I have to admit that I do not understand the details howto setup sqlite
databases within weewx - I've tried to follow the recipe for DWD forecasts
as given within https://github.com/roe-dl/weewx-DWD , and I did retain all
database settings as given by standard delivery weewx.conf (I do a manual
diff with my private copy of weewx.conf each time when I update weewx to a
new release).
Here the full part w.r.t. sqlite from my weewx.conf (comments dropped)
[DataBindings]
[[wx_binding]]
database = archive_sqlite
table_name = archive
manager = weewx.manager.DaySummaryManager
schema = schemas.wview_extended.schema
[[dwd_binding]]
database = dwd_sqlite
table_name = forecast
manager = weewx.manager.Manager
schema = schemas.dwd.schema
[Databases]
[[archive_sqlite]]
database_name = weewx.sdb
database_type = SQLite
[[dwd_sqlite]]
database_name = dwd-forecast-K2714.sdb
database_type = SQLite
And the forecast schema /usr/share/weewx/schemas/dwd.py contains
schema = [('dateTime','INTEGER NOT NULL PRIMARY KEY'),
('usUnits','INTEGER NOT NULL'),
('interval','INTEGER NOT NULL')]
The sqlite DB itself is stored at /var/lib/weewx/dwd-forecast-K2714.sdb
side by side with weewx.sdb
echo .schema | sqlite3 /var/lib/weewx/dwd-forecast-K2714.sdb returns
CREATE TABLE forecast (dateTime INTEGER NOT NULL PRIMARY KEY,usUnits
INTEGER NOT
NULL,interval INTEGER NOT NULL,hour INTEGER,outTemp REAL,dewpoint
REAL,outHumid
ity REAL,windchill REAL,heatindex REAL,windDir REAL,windSpeed REAL,windGust
REAL
,pop REAL,cloudcover REAL,barometer REAL,rain REAL,rainDur REAL,sunshineDur
REAL
,visibility REAL,ww INTEGER);
Tom Keffer schrieb am Donnerstag, 16. November 2023 um 23:52:17 UTC+1:
> First weewx.conf:
>> [[dwd_binding]]
>> database = dwd_sqlite
>> table_name = forecast
>> manager = weewx.manager.Manager
>> schema = schemas.dwd.schema
>>
>
> You are using the database manager weewx.manager.Manager for the
> "forecast" table. That manager will not include daily summaries, which is
> why you are getting the error that the daily summary table
> forecast_day_wind is missing. Is this intentional?
>
> Nevertheless, it should be possible to calculate the wind vectors without
> the daily summaries. It would be frightfully slow, but it would work.
>
> Two questions:
>
> 1. What does the schema schemas.dwd.schema look like?
> 2. What is the actual schema used in the database used by forecast? You
> didn't give enough information for me to determine the path to the actual
> database, so you'll have to do that.
>
> echo .schema | sqlite3 path-to-the-forecast-database
>
> -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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-user/7c1b30f5-638f-4d17-96e9-3a60e0559b03n%40googlegroups.com.