time/date issue in my INDEX.HTML file

141 views
Skip to first unread message

Eric Gammeter

unread,
Jul 5, 2019, 3:58:01 PM7/5/19
to weewx-user
Hi-  My INDEX.HTML file is being produced each half hour as it should be...but the timestamp (in the file) is incorrect!  The report (attached) shows it is 8/6/2036 @ 08:22:00PM.  

I can see that the reports fire off every 30 mins- and that a new (correct time stamp) INDEX.HTML file is created in the /var/www/html/weewx filesystem-- but that file's info is incorrect.  

I tested (with minicom) and that TEST's fine.

I have shutdown and rebooted the VantageVue station to no avail.  

Thanks for reading!  

/Eric 
index.html

Thomas Keffer

unread,
Jul 5, 2019, 4:13:53 PM7/5/19
to weewx-user
See the troubleshooting section WeeWX generates HTML pages, but it does not update them in the User's Guide.

--
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/780e67d7-d435-41ec-b497-bd5ac727553e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Eric Gammeter

unread,
Jul 6, 2019, 4:02:03 PM7/6/19
to weewx-user
Not making any progress Tom:  

root@raspberrypi:/var/lib/weewx# ls -l
total 9084
-rw-r--r-- 1 root root 4648960 Jul  4 02:30 weewx.sdb
-rw-r--r-- 1 root root 4648960 Jul  6 15:00 weewx.sdb.backup
root@raspberrypi:/var/lib/weewx# sqlite3 weewx.sdb
SQLite version 3.16.2 2017-01-06 16:32:41
Enter ".help" for usage hints.
sqlite> delete from archive where dateTime > x;
Error: no such column: x
sqlite> 
root@raspberrypi:/var/lib/weewx# 


root@raspberrypi:/var/lib/weewx# wee_device --clear-memory
Using configuration file /etc/weewx/weewx.conf
Using Vantage driver version 3.1.1 (weewx.drivers.vantage)
Traceback (most recent call last):
  File "/usr/bin/wee_device", line 66, in <module>
    main()
  File "/usr/bin/wee_device", line 62, in main
    device.configure(config_dict)
  File "/usr/share/weewx/weewx/drivers/__init__.py", line 69, in configure
    self.do_options(options, parser, config_dict, prompt)
  File "/usr/share/weewx/weewx/drivers/vantage.py", line 1972, in do_options
    station = Vantage(**config_dict[DRIVER_NAME])
  File "/usr/share/weewx/weewx/drivers/vantage.py", line 488, in __init__
    self._setup()
  File "/usr/share/weewx/weewx/drivers/vantage.py", line 1289, in _setup
    unit_bits              = self._getEEPROM_value(0x29)[0]
  File "/usr/share/weewx/weewx/drivers/vantage.py", line 1375, in _getEEPROM_value
    raise weewx.RetriesExceeded("While getting EEPROM data value at address 0x%X" % offset)
weewx.RetriesExceeded: While getting EEPROM data value at address 0x29
root@raspberrypi:/var/lib/weewx# 

Thomas Keffer

unread,
Jul 6, 2019, 4:25:42 PM7/6/19
to weewx-user
Did you stop weewx before running wee_device?

--
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.

Eric Gammeter

unread,
Jul 6, 2019, 4:32:06 PM7/6/19
to weewx-user
Yes-  I did.

My mistake!  I did not.  Doing that now.  


On Friday, July 5, 2019 at 3:58:01 PM UTC-4, Eric Gammeter wrote:

Eric Gammeter

unread,
Jul 7, 2019, 8:08:15 AM7/7/19
to weewx-user

No joy-  It is stopped.  

pi@raspberrypi:/var/lib/weewx $ sqlite3 /var/lib/weewx/weewx.sdb
SQLite version 3.16.2 2017-01-06 16:32:41
Enter ".help" for usage hints.
sqlite> delete from archive where dateTime > x;
Error: no such column: x
sqlite> 







On Friday, July 5, 2019 at 3:58:01 PM UTC-4, Eric Gammeter wrote:

Andrew Milner

unread,
Jul 7, 2019, 8:22:02 AM7/7/19
to weewx-user
you need to replace x with an actual epoch date time value!

so, for example:
delete from archive where dateTime > 1561983540;

to convert a date / time into an epoch date use a site such as:  

Thomas Keffer

unread,
Jul 7, 2019, 8:34:51 AM7/7/19
to weewx-user
I was referring to running wee_device (not sqlite3). 

Stop weewxd, then clear the memory.

Then restart weewxd.

-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.

Eric Gammeter

unread,
Jul 8, 2019, 9:08:40 AM7/8/19
to weewx-user
Still at this...  Is there any way to determine the last-good db record and then delete everything after that in order to salvage my WX year history?


root@raspberrypi:/var/lib/weewx# /etc/init.d/weewx status
● weewx.service - LSB: weewx weather system
   Loaded: loaded (/etc/init.d/weewx; generated; vendor preset: enabled)
   Active: active (exited) since Mon 2019-07-08 08:52:59 EDT; 10min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 2872 ExecStop=/etc/init.d/weewx stop (code=exited, status=0/SUCCESS)
  Process: 3049 ExecStart=/etc/init.d/weewx start (code=exited, status=0/SUCCESS)

Jul 08 08:53:00 raspberrypi weewx[3064]:     ****    File "/usr/share/weewx/weewx/engine.py", line 142, in loadServices
Jul 08 08:53:00 raspberrypi weewx[3064]:     ****      self.service_obj.append(weeutil.weeutil._get_object(svc)(self, config_dict))
Jul 08 08:53:00 raspberrypi weewx[3064]:     ****    File "/usr/share/weewx/weewx/engine.py", line 500, in __init__
Jul 08 08:53:00 raspberrypi weewx[3064]:     ****      self.setup_database(config_dict)
Jul 08 08:53:00 raspberrypi weewx[3064]:     ****    File "/usr/share/weewx/weewx/engine.py", line 617, in setup_database
Jul 08 08:53:00 raspberrypi weewx[3064]:     ****      _nrecs, _ndays = dbmanager.backfill_day_summary() # @UnusedVariable
Jul 08 08:53:00 raspberrypi weewx[3064]:     ****    File "/usr/share/weewx/weewx/manager.py", line 1447, in backfill_day_summary
Jul 08 08:53:00 raspberrypi weewx[3064]:     ****      timestamp_to_string(lastRecord)))
Jul 08 08:53:00 raspberrypi weewx[3064]:     ****  ViolatedPrecondition: lastUpdate(2036-08-06 20:22:00 EDT (2101681320)) > lastRecord(2019-07-01 00:00:00 EDT (1561953600))
Jul 08 08:53:00 raspberrypi weewx[3064]:     ****  Exiting.
root@raspberrypi:/var/lib/weewx# 










On Friday, July 5, 2019 at 3:58:01 PM UTC-4, Eric Gammeter wrote:

Thomas Keffer

unread,
Jul 8, 2019, 9:24:00 AM7/8/19
to weewx-user
I'm lost where you are in the process. Let's take it from the top:

1. Stop weewx

sudo systemctl stop weewx

2. Clear the memory of your logger

sudo wee_device --clear-memory

3. Delete the daily summaries. Normally this step isn't necessary, but yours seems to have gotten messed up somehow.

sudo wee_database --drop-daily

4. Rebuild the daily summaries. Depending on the size of your database, this could take a little time.

sudo wee_database --rebuild-daily

5. Restart weewx

sudo systemctl start weewx

-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.

Andrew Milner

unread,
Jul 8, 2019, 9:26:20 AM7/8/19
to weewx-user
do you use phpliteadmin to browse the database or do you just retrieve records using sqlite3?

only you can determine the datetime of the last good archive record - let us say it is 987654321

then to delete all records later than that
use sqlite 3
delete from archive where dateTime > 987654321; 
would delete additional archive records

then to sort out the daily summaries use wee_database to 
1) drop daily
2) rebuild daily

if your NOAA summary data is looking corrupted just delete the NOAA files and weewx will recreate them on the next report cycle.

Thomas Keffer

unread,
Jul 8, 2019, 9:37:07 AM7/8/19
to weewx-user
While Andrew offers helpful information on how to delete records from your archive, I would NOT start there. Most likely, your data are fine. Just drop, then rebuild, the daily summaries. Then run weewx. If all is good, you're done. Otherwise, we'll take on the more complicated stuff.

--
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.

Eric Gammeter

unread,
Jul 8, 2019, 10:24:39 AM7/8/19
to weewx-user
Thank you Tom!  That cleared-up the log error I was getting.  So far the timestamp on my index.html report shows 7/1/2019- but that is much better than what I was getting before.  I will let it run for a while to see how it shakes-out.  Your utilities are fantastic!
/Eric




On Friday, July 5, 2019 at 3:58:01 PM UTC-4, Eric Gammeter wrote:

Eric Gammeter

unread,
Jul 9, 2019, 9:01:46 AM7/9/19
to weewx-user
Operation is back to normal!  All I see is I am missing daily data from July 1 thru 7...but I can live with that for sure.  Thanks so much for your assistance guys.  
/Eric 



On Friday, July 5, 2019 at 3:58:01 PM UTC-4, Eric Gammeter wrote:
Reply all
Reply to author
Forward
0 new messages