Update Isses: WeeWX generates HTML pages, but it does not update them (From the user manual)

90 views
Skip to first unread message

Richard Back

unread,
Mar 6, 2020, 3:21:11 PM3/6/20
to weewx-user
Ok This is not my first rodeo!

I have this issue regularly when I lose power on my remote Rpi and things get out of sync but this time I cannot seem to get the Pi and and the Vantage 2pro station back online and yes I am at the remote location.  I usually just have to delete bad records in the database and clear the station memory(following the directions in the manual), but this time I just cannot seem to get things sorted and I need a sanity check. Look at the bold Items!

syslog messages

pi@weather:/var/lib/weewx $ tail /var/log/syslog
Mar  6 13:59:13 weather weewx[2356]:     ****    File "/usr/share/weewx/weewx/engine.py", line 141, in loadServices
Mar  6 13:59:13 weather weewx[2356]:     ****      self.service_obj.append(weeutil.weeutil._get_object(svc)(self, config_dict))
Mar  6 13:59:13 weather weewx[2356]:     ****    File "/usr/share/weewx/weewx/engine.py", line 491, in __init__
Mar  6 13:59:13 weather weewx[2356]:     ****      self.setup_database(config_dict)
Mar  6 13:59:13 weather weewx[2356]:     ****    File "/usr/share/weewx/weewx/engine.py", line 604, in setup_database
Mar  6 13:59:13 weather weewx[2356]:     ****      _nrecs, _ndays = dbmanager.backfill_day_summary() # @UnusedVariable
Mar  6 13:59:13 weather weewx[2356]:     ****    File "/usr/share/weewx/weewx/manager.py", line 1428, in backfill_day_summary
Mar  6 13:59:13 weather weewx[2356]:     ****      timestamp_to_string(lastRecord)))
Mar  6 13:59:13 weather weewx[2356]:     ****  ViolatedPrecondition: lastUpdate(2020-03-06 07:55:00 CST (1583502900)) > lastRecord(2020-03-05 12:00:00 CST (1583431200))
Mar  6 13:59:13 weather weewx[2356]:     ****  Exiting

note: I copied the original DB and deleted the records prior.

This is the database

pi@weather:/var/lib/weewx $ sudo sqlite3 /var/lib/weewx/weewx.sdb
SQLite version 3.16.2 2017-01-06 16:32:41
Enter ".help" for usage hints.
sqlite> select dateTime from archive where dateTime > 1583430000;
1583430300
1583430600
1583430900
1583431200
sqlite>

this is the timestamp

YrMonDay
-- 
HrMinSec
 :  : 
 
 
Epoch timestamp: 1583431200
Timestamp in milliseconds: 1583431200000
Date and time (GMT): Thursday, March 5, 2020 6:00:00 PM
Date and time (your time zone): Thursday, March 5, 2020 12:00:00 PM GMT-06:00

What am I missing?  The 7:55 timestamp is when I had to reset all of the hardware both the pi and the base station

I know I am missing something obvious, I just am not seeing it

Thanks in advance!

Richard

gjr80

unread,
Mar 6, 2020, 3:47:09 PM3/6/20
to weewx-user
Hi,

Your daily summaries believe they were updated after the most recent record in the archive. Try rebuilding the daily summaries using wee_database (http://weewx.com/docs/utilities.htm#Action_--rebuild-daily).

Gary

Richard Back

unread,
Mar 6, 2020, 3:52:25 PM3/6/20
to weewx...@googlegroups.com
weewx fails on startup with the error in the syslog.  I am not getting that far.

--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/A98fHji1uqU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/aff0d017-d02d-4dc4-a670-d7b23d72fe8f%40googlegroups.com.

gjr80

unread,
Mar 6, 2020, 3:55:35 PM3/6/20
to weewx-user
Not sure what you mean by ‘not getting that far’, you are getting to the check of the time of last update of the daily summaries and that fails, WeeWX stops. End.

The solution to your problem is resetting that time of last update of the daily summaries. Rebuilding the daily summaries resets that time.

Gary

Richard Back

unread,
Mar 6, 2020, 3:56:09 PM3/6/20
to weewx...@googlegroups.com
pi@weather:~ $ sudo wee_database --rebuild-daily
Using configuration file /etc/weewx/weewx.conf
Using database binding 'wx_binding', which is bound to database 'archive_sqlite'
All daily summaries will be rebuilt.
Proceed (y/n)? y
Rebuilding daily summaries in database 'weewx.sdb' ...
Traceback (most recent call last):
  File "/usr/bin/wee_database", line 793, in <module>
    main()
  File "/usr/bin/wee_database", line 153, in main
    rebuildDaily(config_dict, db_binding, options)
  File "/usr/bin/wee_database", line 262, in rebuildDaily
    trans_days=20)

  File "/usr/share/weewx/weewx/manager.py", line 1428, in backfill_day_summary
    timestamp_to_string(lastRecord)))
weewx.ViolatedPrecondition: lastUpdate(2020-03-06 07:55:00 CST (1583502900)) > lastRecord(2020-03-05 12:00:00 CST (1583431200))

Richard Back

unread,
Mar 6, 2020, 3:59:28 PM3/6/20
to weewx...@googlegroups.com
FYI the daily summaries have never worked the monthly summaries are fine (1yrs)

gjr80

unread,
Mar 6, 2020, 4:23:47 PM3/6/20
to weewx-user
OK, try dropping the daily summaries first, use wee_database --drop-daily. If that completes without error then repeat the --rebuild-daily.

Gary

PS. When I used the term 'daily summaries' above I was referring to the daily summary tables, a number of tables in your database that are used when producing reports etc that include data covering periods in excess of one day.
To unsubscribe from this group and all its topics, send an email to weewx...@googlegroups.com.

Richard Back

unread,
Mar 7, 2020, 1:35:23 PM3/7/20
to weewx...@googlegroups.com
That mostly worked, I bow to the master!  the webpage did update but the graphics did not?   I have had this issue before as well but it has been awhile, Thoughts!


To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/3a63c4ce-20ee-4d4d-b43e-3b972f1e06d2%40googlegroups.com.

gjr80

unread,
Mar 7, 2020, 5:01:41 PM3/7/20
to weewx-user
As I look at your site now the plots are updating every five minutes and appear to contain current data. I was going to reply that with the plots you need to be mindful that different plots update at different intervals; daily plots update every report cycle (in your case five minutes), weekly every hour, monthly every three hours and yearly every 24 hours. You can force them all to regenerate on the next report cycle by deleting all the generated images. But then again as far as I can tell your site only displays the daily plots.

Let me know if I have misunderstood the plot issue you mentioned.

Gary
Reply all
Reply to author
Forward
0 new messages