@Tom Keffer: I would like to add that the table dwd-forecast-K2714.sdb is 
created outside WeeWX by a separate program. It creates the core table 
only, no daily summaries. That is the reason, weewx.manager.Manager is 
used. I use it myself, and I never got an error message like that the 
thread starter experiences.

dwd-forecast-K2714.sdb has another interval than weewx.sdb: For 
dwd-forecast-K2714.sdb it is always an hour, for weewx.sdb it is 300 
seconds, I guess. This may be an issue if mixing them within the same plot.

Michael Waldor schrieb am Freitag, 17. November 2023 um 07:54:08 UTC+1:

> 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 weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/c9d0ee67-2b9d-4ad6-8e4f-39523da18ad8n%40googlegroups.com.

Reply via email to