Hi. Help needed please. I have imported several years of data from my old weather station into weewx.sdb. In particular, I imported the rain data into the [rain] field in the archive table and left the [rainRate] field blank.
I then ran ‘sudo wee_database --drop-daily’ followed by ‘sudo wee_database --rebuild-daily’ and both ran ok without error. The monthly and yearly summary reports generated for the imported temperature and wind data summarised ok but the precipitation summary data remains blank for some reason.
Any idea how I get the rain data summaries would be appreciated. Thanks.
--
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/1fdb99af-6e6b-4a72-ac15-5389c6f27eb0n%40googlegroups.com.
Hi Tom, many thanks for your response, apologies it wasn’t too clear.
Yes I deleted and regenerated the reports after adding my old WS data.
For info, I started using weewx with my new WS on dateTime = 1588201200 / 29-Apr-20. Before that date is the imported data from my old WS. Here is a screenshot showing some data either side of that date (select datetime(dateTime,'unixepoch','localtime'), sum from archive_day_rain;)

And here is the result of the second query (select datetime(min(dateTime),'unixepoch','localtime'), sum(sum) from archive_day_rain group by strftime("%Y",dateTime,'unixepoch','localtime')

So thankfully it looks like my imported rain data has been processed.
However, here's a screenshot of an example annual summary for 2014 with the precipitation summary blank. (Note that the wind and temperature summary is summarised)
Any thoughts would be very welcome.
Thanks again.
Alastair
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/CAPq0zEBf39Zc3xcpgMnRxodFyHB%3D7hTikPvxC4XibinTomR2KA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/CAKvi5dS-QQxtDEbr-wqoBCjPAJDU7s0Y10d97EVWx3bBdXUfGw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/CAPq0zEAnFbwmjiFM2_iJa_20LgXnCUxfpXNejEWqR_QEnThFEQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/CAKvi5dS4%2BeqHLpgqW7UzaDRNOPp-gT4ObK0qOBzidwsS69enOQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/CAPq0zECio9tahrEeq2JY%3DEF-Nty%2B3AZtVRwQMi5u3WWxzwHTXQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/CAKvi5dQ-vs8jPoizoFpHq6cd%2BwQLrWOqc908GWgyauw5oyyGzA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/228d6907-945c-43dd-aa48-d3141ed04f13n%40googlegroups.com.
My lack of knowledge on weewx will no doubt become apparent here - apologies in advance, the Pi / weewx environment is all pretty new to me.
I’m as sure as I can be that I followed the procedure you gave me to generate the log file. I'm taking it that the NOAA files are the various ‘archive_day_(etc)’ data tables within weewx.db?
To generate the missing summary data, I have gone through the following steps again that I think is necessary and pated the results below. As you will see below, I stopped the weewx service, ran the drop daily command and dropped the daily summaries, ran a query on the archive_day_rain table which shows the table didn't exist, restarted weewx service and finally re-ran a couple of queries to confirm the ‘archive_day_ rain table had been populated.
Here’s a copy of the various commands as I went through them. :
pi@raspberrypi:~ $ sudo /etc/init.d/weewx stop
[ ok ] Stopping weewx (via systemctl): weewx.service.
pi@raspberrypi:~ $ sudo wee_database --drop-daily
Using configuration file /etc/weewx/weewx.conf
Using database binding 'wx_binding', which is bound to database 'archive_sqlite'
Proceeding will delete all your daily summaries from database 'weewx.sdb'
Are you sure you want to proceed (y/n)? y
Dropping daily summary tables from 'weewx.sdb' ...
Daily summary tables dropped from database 'weewx.sdb' in 2.99 seconds
pi@raspberrypi:~ $ cd /var/lib/weewx/
pi@raspberrypi:/var/lib/weewx $ sqlite3 weewx.sdb
SQLite version 3.27.2 2019-02-25 16:06:06
Enter ".help" for usage hints.
sqlite> select datetime(min(dateTime),'unixepoch','localtime'), sum(count), sum(sum) from archive_day_rain where strftime("%Y",dateTime,'unixepoch','localtime')='2014' group by strftime("%Y-%m",dateTime,'unixepoch','localtime');
Error: no such table: archive_day_rain
sqlite>
pi@raspberrypi:/var/lib/weewx $ sudo /etc/init.d/weewx start
[ ok ] Starting weewx (via systemctl): weewx.service.
pi@raspberrypi:/var/lib/weewx $ sqlite3 weewx.sdb
SQLite version 3.27.2 2019-02-25 16:06:06
Enter ".help" for usage hints.
sqlite> select datetime(min(dateTime),'unixepoch','localtime'), sum(count), sum(sum) from archive_day_rain where strftime("%Y",dateTime,'unixepoch','localtime')='2014' group by strftime("%Y-%m",dateTime,'unixepoch','localtime');
2014-01-01 00:00:00|2941|5.858267927
2014-02-01 00:00:00|2685|10.110236633
2014-03-01 00:00:00|7364|24.838583605
2014-04-01 00:00:00|2974|0.0
2014-05-01 00:00:00|2564|0.0
2014-06-01 00:00:00|2562|0.0
2014-07-01 00:00:00|2778|2.78740166
2014-08-01 00:00:00|2082|24.307087427
2014-09-01 00:00:00|2873|10.759842921
2014-10-01 00:00:00|2972|27.248032548
2014-11-01 00:00:00|2875|4.110236407
2014-12-01 00:00:00|2974|2.964567051
sqlite> select
datetime(min(dateTime),'unixepoch','localtime'), sum(sum) from archive_day_rain
group by strftime("%Y",dateTime,'unixepoch','localtime');
2012-11-02 00:00:00|16.606299895
2013-01-01 00:00:00|134.173233399
2014-01-01 00:00:00|112.984256179
2015-01-01 00:00:00|14.078740731
2016-02-27 00:00:00|16.759843256
2017-01-07 00:00:00|23.19685154
2018-06-18 00:00:00|12.874016437
2019-01-03 00:00:00|20.149607156
2020-01-01 00:00:00|37.0157479471
2021-01-01 00:00:00|12.8897637009
As previously, the annual summary table precipitation data remains blank. So it looks to me that weewx is populating the archive_day_etc tables, just not showing the data in the annual summary. If you can spot where I am going wrong here, I would much appreciate it.
Again, thanks for looking at this.
Alastair

To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/CAPq0zED3eadhLJ9u9Zm1OUgOiORWkdo9OnWA%2BJcg1newb0e7iA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/6b603bf8-a013-48f0-93ce-eab957ef2abbn%40googlegroups.com.