Author Topic: VP2 + RPi + WeeWX + FTP = Chrome not refreshing graphs  (Read 780 times)

0 Members and 1 Guest are viewing this topic.

Offline clv101

  • Member
  • *
  • Posts: 12
VP2 + RPi + WeeWX + FTP = Chrome not refreshing graphs
« on: January 12, 2021, 04:51:41 PM »
I've recently set up my first weather station (VP2), my first Raspberry Pi and with WeeWX (and NeoWX skin) my first weather website. I'm just a little bit proud of myself.

Anyway, it all seems to be working well, I'm running every 5 minutes - is there any downside of running so frequently instead of the console's default of 30 mins?

Main problem seems to be web browser related though - on Chrome when I hit 'refresh' it doesn't refresh the graphs. Checking on the server, they have uploaded fine. If I go into developer tools and do a hard refresh it does pick them up. Any idea why a normal refresh isn't picking up the new charts? The difference between a normal refresh and a hard refresh is something about the former just checking if files have been modified vs downloading everything anyway.

Any idea how I can fix this?

Offline gszlag

  • Forecaster
  • *****
  • Posts: 431
  • ..have you calibrated your barometer today?
    • Michael's Bay - Manitoulin Island weather
Re: VP2 + RPi + WeeWX + FTP = Chrome not refreshing graphs
« Reply #1 on: January 13, 2021, 11:45:36 AM »
I've recently set up my first weather station (VP2), my first Raspberry Pi and with WeeWX (and NeoWX skin) my first weather website. I'm just a little bit proud of myself.

Anyway, it all seems to be working well, I'm running every 5 minutes - is there any downside of running so frequently instead of the console's default of 30 mins?

Main problem seems to be web browser related though - on Chrome when I hit 'refresh' it doesn't refresh the graphs. Checking on the server, they have uploaded fine. If I go into developer tools and do a hard refresh it does pick them up. Any idea why a normal refresh isn't picking up the new charts? The difference between a normal refresh and a hard refresh is something about the former just checking if files have been modified vs downloading everything anyway.

Any idea how I can fix this?

You are prorbably pulling data from your browser cache.
Not sure if there is a equivalent in Chrome but the firefox extension I use is called ReloadMatic -it automatically refreshes a desired tab at any custom time interval and you can set it to disable the browser cache at the same time. Works very well for weather templates.

Your VP2 is producing data every 2 -3 seconds. You should be able to easily FTP every 60 seconds just by changing your archive interval.

I don't have the GW1000 WIFI gateway (I use the ATMOCOM device) but there is a weewx driver available. I believe it may be able to give you the ability to go live. Perhaps others with more experience with the GW1000 API driver and the VP2 can comment.
Ambient Weather WS-2000
Ecowitt GW1000/GW1100
Ecowitt WS68: Anemometer, UV/solar
Ecowitt WH40: Rain gauge
Ecowitt WH57 Lightning sensor
Ecowitt WH32E: Outside T & H sensor
Stratus Rain Gauge (manual)
Raspberry Pi 3B+ (WeeWX/CumulusMX)
Raspberry Pi Zero 2W (WeeWX/MQTT/Belchertown)
---
Barometer wiki: http://meshka.eu/Ecowitt/dokuwiki/doku.php?id=barometer#barometer
---
http://weather.glenns.ca (pwsdashboard - live)
http://weewx.glenns.ca
http://glenns.ca/cumulusmx2/index.htm
---
Uploading to: AWN, ecowitt.net, Weather Underground, PWSweather.com, AWEKAS, Windy.com, WOW

Offline clv101

  • Member
  • *
  • Posts: 12
Re: VP2 + RPi + WeeWX + FTP = Chrome not refreshing graphs
« Reply #2 on: January 13, 2021, 06:43:20 PM »
You are prorbably pulling data from your browser cache.
Not sure if there is a equivalent in Chrome but the firefox extension I use is called ReloadMatic -it automatically refreshes a desired tab at any custom time interval and you can set it to disable the browser cache at the same time. Works very well for weather templates.
Yes, I can 'fix it' with a hard refresh, but I shouldn't have to. Why doesn't Chrome recognise the updated images as new during a regular refresh, they have a new timestamp and are most likely a different size.

Offline AWL

  • Forecaster
  • *****
  • Posts: 727
    • Ardmore Weather Live
Re: VP2 + RPi + WeeWX + FTP = Chrome not refreshing graphs
« Reply #3 on: January 13, 2021, 07:02:48 PM »
You might try adding the following up in the meta section and see if it helps with the caching


Code: [Select]
<meta http-equiv="Expires" content="-1" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Cache-Control" content="no-cache" />

Doug

Offline clv101

  • Member
  • *
  • Posts: 12
Re: VP2 + RPi + WeeWX + FTP = Chrome not refreshing graphs
« Reply #4 on: January 14, 2021, 04:57:54 AM »
Thanks AWL, that does't seem to have made a difference though.  :sad:

Offline Bushman

  • Forecaster
  • *****
  • Posts: 7549
    • Eagle Bay Weather
Re: VP2 + RPi + WeeWX + FTP = Chrome not refreshing graphs
« Reply #5 on: January 14, 2021, 09:44:54 AM »
Are you logged into your Google account?  It keeps the cache alive for cross-device accessibility.
Need low cost IP monitoring?  http://wirelesstag.net/wta.aspx?link=NisJxz6FhUa4V67/cwCRWA or PM me for 50% off Wirelesstags!!

Offline gszlag

  • Forecaster
  • *****
  • Posts: 431
  • ..have you calibrated your barometer today?
    • Michael's Bay - Manitoulin Island weather
Re: VP2 + RPi + WeeWX + FTP = Chrome not refreshing graphs
« Reply #6 on: January 14, 2021, 10:18:45 AM »
You are prorbably pulling data from your browser cache.
Not sure if there is a equivalent in Chrome but the firefox extension I use is called ReloadMatic -it automatically refreshes a desired tab at any custom time interval and you can set it to disable the browser cache at the same time. Works very well for weather templates.
Yes, I can 'fix it' with a hard refresh, but I shouldn't have to. Why doesn't Chrome recognise the updated images as new during a regular refresh, they have a new timestamp and are most likely a different size.
..browsers do strange things. Sometimes when you hit the back button it pulls down a fresh page..other times it pulls from the cache.
I should mention that the firefox extension I mentioned previously can optionally disable the cache for that specific tab - you don't have to disable the cache for the whole browser.
Unless you absolutely have to use Chrome for some reason -try firefox and the auto-reload extension and see if that works for you. Or look for a Chrome extension that does something similar.
Ambient Weather WS-2000
Ecowitt GW1000/GW1100
Ecowitt WS68: Anemometer, UV/solar
Ecowitt WH40: Rain gauge
Ecowitt WH57 Lightning sensor
Ecowitt WH32E: Outside T & H sensor
Stratus Rain Gauge (manual)
Raspberry Pi 3B+ (WeeWX/CumulusMX)
Raspberry Pi Zero 2W (WeeWX/MQTT/Belchertown)
---
Barometer wiki: http://meshka.eu/Ecowitt/dokuwiki/doku.php?id=barometer#barometer
---
http://weather.glenns.ca (pwsdashboard - live)
http://weewx.glenns.ca
http://glenns.ca/cumulusmx2/index.htm
---
Uploading to: AWN, ecowitt.net, Weather Underground, PWSweather.com, AWEKAS, Windy.com, WOW

Offline clv101

  • Member
  • *
  • Posts: 12
Re: VP2 + RPi + WeeWX + FTP = Chrome not refreshing graphs
« Reply #7 on: January 17, 2021, 07:05:26 PM »
Some strangeness, when I load the page directly from the local Raspberry Pi, it works. Always refreshes the latest images. But when I load the page from my web site, exactly the same files just FTPed moments after generation, it sticks with the old cached versions of the images.

So what, specifically is the difference between a regular refresh and a hard reload, looks like there's something to do with the server or how the files are copied over that might be the problem?

Offline gszlag

  • Forecaster
  • *****
  • Posts: 431
  • ..have you calibrated your barometer today?
    • Michael's Bay - Manitoulin Island weather
Re: VP2 + RPi + WeeWX + FTP = Chrome not refreshing graphs
« Reply #8 on: January 18, 2021, 08:09:08 AM »
Some strangeness, when I load the page directly from the local Raspberry Pi, it works. Always refreshes the latest images. But when I load the page from my web site, exactly the same files just FTPed moments after generation, it sticks with the old cached versions of the images.

So what, specifically is the difference between a regular refresh and a hard reload, looks like there's something to do with the server or how the files are copied over that might be the problem?

dunno for sure..based on what I am seeing:
hard refresh (cntrl F5) = pull a fresh page from the internet; ignore cache
reg refresh =pull from cache or pull a new page

re: Chrome
-in settings clear all data for "all time"
- try opening icognito window ( it disable cache) and see if that helps.
..interesting article about Chrome hidden cache files: https://www.zdnet.com/article/these-hidden-cache-files-are-bloating-your-google-chrome/
« Last Edit: January 18, 2021, 08:13:31 AM by gszlag »
Ambient Weather WS-2000
Ecowitt GW1000/GW1100
Ecowitt WS68: Anemometer, UV/solar
Ecowitt WH40: Rain gauge
Ecowitt WH57 Lightning sensor
Ecowitt WH32E: Outside T & H sensor
Stratus Rain Gauge (manual)
Raspberry Pi 3B+ (WeeWX/CumulusMX)
Raspberry Pi Zero 2W (WeeWX/MQTT/Belchertown)
---
Barometer wiki: http://meshka.eu/Ecowitt/dokuwiki/doku.php?id=barometer#barometer
---
http://weather.glenns.ca (pwsdashboard - live)
http://weewx.glenns.ca
http://glenns.ca/cumulusmx2/index.htm
---
Uploading to: AWN, ecowitt.net, Weather Underground, PWSweather.com, AWEKAS, Windy.com, WOW