daily graphs stuck on an old date

804 views
Skip to first unread message

Richard Beare

unread,
Nov 20, 2017, 4:27:15 PM11/20/17
to weewx-user
Hi,
I've had the following problems with weewx following a brief power outage. The system is a fineoffset station connected to a raspberry pi. The power cycle corrupted the database, but didn't appear to affect the station. I restored the database from a backup earlier in the week, and everything appears to be running fine. Missing data was fetched from the station, the panel on the left seems to be updating correctly. However the graphs are stuck on a single day. (2017/11/18). The weekly graphs are fine.

I've confirmed the clock settings are OK, and I've upgraded to the latest version.

I've tried the following using various combinations of backup databases: dumping newer than the day before the power outage, dropping and rebuilding summaries and deleting the png files. 

At this point I'm starting to think I need to reinstall, but I hope I'm missing something basic. 

Thanks

Summary logs:

Nov 21 08:21:11 raspberrypi weewx[23919]: manager: Added record 2017-11-21 08:20:00 AEDT (1511212800) to database 'weewx.sdb'

Nov 21 08:21:11 raspberrypi weewx[23919]: manager: Added record 2017-11-21 08:20:00 AEDT (1511212800) to daily summary in 'weewx.sdb'

Nov 21 08:21:11 raspberrypi weewx[23919]: reportengine: Running reports for latest time in the database.

Nov 21 08:21:11 raspberrypi weewx[23919]: reportengine: Running report StandardReport

Nov 21 08:21:12 raspberrypi weewx[23919]: reportengine: Found configuration file /home/weewx/skins/Standard/skin.conf for report StandardReport

Nov 21 08:21:12 raspberrypi weewx[23919]: cheetahgenerator: using search list ['weewx.cheetahgenerator.Almanac', 'weewx.cheetahgenerator.Station', 'weewx.cheetahgenerator.Current', 'weewx.cheetahgenerator.Stats', 'weewx.cheetahgenerator.UnitInfo', 'weewx.cheetahgenerator.Extras']

Nov 21 08:21:12 raspberrypi weewx[23919]: manager: Daily summary version is 2.0

Nov 21 08:21:12 raspberrypi weewx[23919]: restx: Wunderground-PWS: Published record 2017-11-21 08:20:00 AEDT (1511212800)

Nov 21 08:21:24 raspberrypi weewx[23919]: cheetahgenerator: Generated 14 files for report StandardReport in 12.17 seconds

Nov 21 08:21:24 raspberrypi weewx[23919]: manager: Daily summary version is 2.0

Nov 21 08:21:28 raspberrypi weewx[23919]: imagegenerator: Generated 12 images for StandardReport in 4.18 seconds

Nov 21 08:21:28 raspberrypi weewx[23919]: copygenerator: copied 0 files to /home/weewx/public_html

Nov 21 08:21:28 raspberrypi weewx[23919]: reportengine: Running report FTP

Nov 21 08:21:28 raspberrypi weewx[23919]: reportengine: Found configuration file /home/weewx/skins/Ftp/skin.conf for report FTP

Nov 21 08:21:28 raspberrypi weewx[23919]: ftpgenerator: FTP upload not requested. Skipped.

Nov 21 08:21:28 raspberrypi weewx[23919]: reportengine: Running report RSYNC

Nov 21 08:21:28 raspberrypi weewx[23919]: reportengine: Found configuration file /home/weewx/skins/Rsync/skin.conf for report RSYNC

Nov 21 08:21:28 raspberrypi weewx[23919]: rsyncgenerator: rsync upload not requested. Skipped.


sudo /home/weewx/bin/wee_device /home/weewx/weewx.conf --info

Using configuration file /home/weewx/weewx.conf

Using FineOffsetUSB driver version 1.9 (weewx.drivers.fousb)

Querying the station...

Fine Offset station settings:

                    local time: 2017.11.21 08:26:19 AEDT

                  polling mode: PERIODIC


                  abs_pressure: 1019.1

                   current_pos: 21728

                  data_changed: 0

                    data_count: 4080

                     date_time: 2017-11-21 07:23

                 hum_in_offset: 8967

                hum_out_offset: 8465

                            id: None

                 lux_wm2_coeff: 0

                       magic_1: 0x55

                       magic_2: 0xaa

                         model: None

                     rain_coef: None

                   read_period: 5

                  rel_pressure: 1020.0

                temp_in_offset: 5896

               temp_out_offset: 514

                      timezone: 16

                    unknown_01: 0

                    unknown_18: 1

                       version: 255

                     wind_coef: None

                     wind_mult: 0


Thomas Keffer

unread,
Nov 20, 2017, 4:56:29 PM11/20/17
to weewx-user
If you look at the timestamps on the daily image files (ls -l /home/weewx/public_html/day*) are they being updated? Or, stuck on the 18th?

One thing you could try is deleting all the graphs (png files). WeeWX will regenerate them on the next reporting cycle.

rm  /home/weewx/public_html/*.png

-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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Richard Beare

unread,
Nov 20, 2017, 5:51:58 PM11/20/17
to weewx...@googlegroups.com
Yep, I've already done that. They are being updated. I'm about to start learning about the db structure to see if there's something else hanging around, but that sounds like it might take more sweat than I really want to expend right now.

--
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/Qkb5l9fjk9Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+unsubscribe@googlegroups.com.

Thomas Keffer

unread,
Nov 20, 2017, 6:19:54 PM11/20/17
to weewx-user
OK. Did you try deleting all the png files?

-tk

Richard Beare

unread,
Nov 20, 2017, 8:06:25 PM11/20/17
to weewx...@googlegroups.com
Yep - and they all appear to have the right timestamp when they get recreated. Is there any lock file or temporary copies hidden away?

gjr80

unread,
Nov 20, 2017, 8:18:06 PM11/20/17
to weewx-user
On Tuesday, 21 November 2017 07:27:15 UTC+10, Richard Beare wrote:

At this point I'm starting to think I need to reinstall, but I hope I'm missing something basic. 


Don't go doing this, it is seldom required and is usually a waste of your and our time. If forcing regeneration by deletion has not helped then I would have a look at what is in your database, are you getting current data in there or not? Assuming you are using SQLite and not MySQL try the following (assumes sqlite3 is installed, if not you need something like sudo apt-get install sqlite3 to install it, also change paths to suit your install):

$ sqlite3 /home/weewx/archive/weewx.sdb
sqlite
> SELECT STRFTIME('%d-%m-%Y %H:%M:%S', datetime(dateTime, 'unixepoch')), outTemp FROM archive ORDER BY dateTime DESC LIMIT 20;
sqlite
> .quit

What does the SQLite query return? This will show whether you in fact have current data being saved to archive or not.

Gary

Richard Beare

unread,
Nov 20, 2017, 8:37:17 PM11/20/17
to weewx...@googlegroups.com
I'm not in front of the machine at the moment, but I did check the most recent time, and it matched the current time.

from memory:

select max(timeDate) from archive;

which I then converted to a readable form (with R). It was definitely today, not the stuck date of 3 days ago.

Mysterious!

--

gjr80

unread,
Nov 20, 2017, 9:51:41 PM11/20/17
to weewx-user
max(dateTime) will just show you the most recent archive record timestamp, what we need to see is whether there is any observational data being recorded in the archive. It is quite possible that no observational data is being recorded for some reason and hence the generated plots show no data. Weekly and greater plots display some form of aggregate data so they may well still show something whilst the daily plot does not.

Gary
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.

Richard Beare

unread,
Nov 20, 2017, 10:16:42 PM11/20/17
to weewx...@googlegroups.com
OK, thanks, I'll check that tonight.

To unsubscribe from this group and all its topics, send an email to weewx-user+unsubscribe@googlegroups.com.

Andrew Milner

unread,
Nov 20, 2017, 11:51:46 PM11/20/17
to weewx-user
An obvious one - but it's caught me out before - have you forced a page reload in the browser and/or have you viewed the .png file directly via a file explorer?

Richard Beare

unread,
Nov 21, 2017, 12:00:59 AM11/21/17
to weewx...@googlegroups.com
Have done the refreshing, but not separate viewing. Will confirm.
Thanks

To unsubscribe from this group and all its topics, send an email to weewx-user+unsubscribe@googlegroups.com.

Richard Beare

unread,
Nov 21, 2017, 3:47:18 AM11/21/17
to weewx...@googlegroups.com
Well, this is embarrassing. Data is going in, and timestamp is appropriate:

SELECT dateTime, outTemp FROM archive ORDER BY dateTime DESC LIMIT 20;

1511253600|84.08

as.POSIXct(1511253600, origin = "1970-01-01")

[1] "2017-11-21 19:40:00 AEDT"


Repeated refresh of page from chrome, and restarts of chrome didn't change the image in the web page. But using a different browser and viewing the graph images manually showed that they're actually OK. Explicitly clearing the image cache in chrome eventually did the trick.

I'll go and hide now...

Thanks for all the prompt help.



Andrew Milner

unread,
Nov 21, 2017, 4:53:35 AM11/21/17
to weewx...@googlegroups.com
Sometimes the obvious proves to be the 'solution'!!  Gets harder trying to work out why the cache clear worked whilst the refresh didn't though!!!

Glad to hear you're sorted now though.  From experience it's often best to put weewx itself at the end of any list of possible causes!!



drhaller

unread,
May 9, 2018, 1:33:37 PM5/9/18
to weewx-user
Richard, thanks for this thread - I had the same issue here.  Weird.

/dan

Rich Altmaier

unread,
May 13, 2018, 12:32:00 PM5/13/18
to weewx-user
The next time you see a stale image, please try a screen capture of this Chrome browser info:
   -click on Chrome 3-dots menu and select MoreTools-Developer Tools
   -then click the Network tab in the developer box.
   -then click the URL bar refresh.
   -the page repaints, and each of the image files is listed in the left column.   
   -set the browser to full screen and drag the vertical bar which is to the left of the bar graphs to see more info on each filename.
    -the "Size" field shows if the image was fetched, giving a size number, or it says "(from memory", or "(from disk cache".  
   -Click on the stale image filename, e.g. daytempdew.png.
   -screen capture the information on Request Headers and Response Headers

That data should inform as to why the image is fetched or not!
Rich

Richard Beare

unread,
May 13, 2018, 5:11:14 PM5/13/18
to weewx...@googlegroups.com
OK - I'll keep an eye on it. I haven't noticed the same behaviour since then. It is also possible that chrome has been updated.

--
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/Qkb5l9fjk9Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+unsubscribe@googlegroups.com.

breph...@gmail.com

unread,
Aug 7, 2024, 9:34:06 AM8/7/24
to weewx-user
BTW, same thing is happening with Firefox.. it's caching an image from a week ago. 

To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.

Jeremiah Garmatter

unread,
Jan 7, 2025, 10:11:50 AM1/7/25
to weewx-user
Good morning,

I just experienced this same issue on Firefox. Chrome shows the correct date and graph.
In Firefox you can disable cache from right-click > Inspect > Network tab > "Disable Cache" checkbox (on the right).
With cache disabled, I refreshed the page and got the up-to-date graphs. Then I re-enabled the cache.

Here are the headers from the cached attempts (there was only a request header, no response):
GET /weewx/daybarometer.png HTTP/1.1
Host: REDACTED
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:133.0) Gecko/20100101 Firefox/133.0
Accept: image/avif,image/webp,image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br, zstd
Referer: https://REDACTED/weewx/

Here's the uncached attempt:
Request Headers:
GET /weewx/daybarometer.png HTTP/1.1
Host: REDACTED
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:133.0) Gecko/20100101 Firefox/133.0
Accept: image/avif,image/webp,image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br, zstd
Referer: https://REDACTED/weewx/
Connection: keep-alive
Sec-Fetch-Dest: image
Sec-Fetch-Mode: no-cors
Sec-Fetch-Site: same-origin
Priority: u=4
Pragma: no-cache
Cache-Control: no-cache

Response Headers:
HTTP/1.1 200 OK
Date: Tue, 07 Jan 2025 14:14:11 GMT
Server: Apache/2.4.37 (Red Hat Enterprise Linux) OpenSSL/1.1.1k
Last-Modified: Tue, 07 Jan 2025 14:10:18 GMT
ETag: "2040-62b1e4e10b3f2"
Accept-Ranges: bytes
Content-Length: 8256
Strict-Transport-Security: max-age=15768000
X-Frame-Options: ALLOW-FROM http://REDACTED/
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: image/png
Reply all
Reply to author
Forward
0 new messages