Author Topic: index page -'updated 0 sec ago' counter not resetting/in sync-Saratoga Templates  (Read 1796 times)

0 Members and 1 Guest are viewing this topic.

Offline gmahle551

  • Member
  • *
  • Posts: 7
I appreciate everyone's prior help with ironing out a few issues. I am down to one issue (for now) that I cannot figure out. The realtime weather on my index.php appears to be updating normally from my station as I am getting periodic "green flashes" with the properly updated data... However, the line of text above...  Updated: @ 1/12/2017 10:34:28am - updated 0 sec ago ...does not flash green nor reset seconds in sync with the data changes. It continues to count up. I have 'maxupdates' in ajaxWCTwx.js set to default setting of 24. On the Saratoga page (http://saratoga-weather.com/index.php), the two elements seem to be in sync, refreshing every 8-10 seconds. Can anyone help me out with what setting I am missing that would sync things up and reset counter? You can find my site below.
Thanks!

http://www.dcwpws.com/index.php

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
There is no 'clientraw.txt' file in your root directory or your '/webfiles' directory, so the updates will never occur.  You need to configure WD to upload 'clientraw.txt' to the appropriate directory, usually the root or '/webfiles'.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline gmahle551

  • Member
  • *
  • Posts: 7
Thanks, I use Weathercat. Similar procedure?

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Thanks, I use Weathercat. Similar procedure?
I'm afraid I'm worse than useless regarding this problem.  Sorry. :oops:
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9297
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
This is a very strange issue.  The ajaxWCTwx.js script seems to stop executing (without casting an error) after the line
Code: [Select]
set_ajax_obs("ajaxbaromax",pressuremax.toFixed(dpBaro) + uomBaro);
so the rest of the script which updates wind direction/speed, rain and date/time seems to be skipped.
The WCT_realtime.txt file is being uploaded (and updates) every 20 seconds or so so that's not the issue.

I'm working on diagnosing the problem.. never seen this before with WCT (or any of the other weather software).
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Ken I think it stops with the maxGust.

It doesnt like the maxGust.toFixed, when debugging step by step, it seems to parse the gust as "23.0" instead of 23.0, so it is trying to apply the toFixed to a string

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Here:

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9297
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Try changing ajaxWCTwx.js
Code: [Select]
if (useKnots) { return(rawwind * 1.0).toFixed(dpWind); } //force usage of knots for speed
to
Code: [Select]
if (useKnots) { return(rawwind * 1.0); } //force usage of knots for speed

I think that is what is causing the issue since he has
Code: [Select]
var useKnots = true;       // set to true to use wind speed in Knots (otherwise
// wind in km/hr for Metric or mph for English will be used.
set in the script.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Could be,  you are the expert  8-)

Offline gmahle551

  • Member
  • *
  • Posts: 7
Thanks! I used your suggestions and reverted back to 'mph' format, just in case. It seems to be behaving a bit better. If you could, take a look and see if the 'updating' counter seems to be operating as is should be.

Thanks very much... Really enjoying working with the templates.

www.dcwpws.com

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Hi,
yes the problem seems to be solved, no more errors in the console.

Just one thing - I am on a 1Gbit connection at work and I noticed your forest bg loads relatively slowly, I then checked the images and your image background is over 4MB! This is way too much and I would highly recommend reducing the size because for people on a slower connection it will substantially slow down loading of your page.


Offline gmahle551

  • Member
  • *
  • Posts: 7
Thanks, again... I adjusted size of background image as small as possible without having it 'tile' the image. If you'd like, see if it renders acceptably. Otherwise, I'll just remove it.

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
1.5MB now, it is better, but I still think it should be slightly less, I would aim for something like 600-800kb max, you can slightly reduce the compression quality to achieve this without reducing the size, it is a bg image so it does not have to be hi-res quality.

I have attached the same image, same size, just more compressed, I doubt you can tell the difference and it is only 700kb

Offline gmahle551

  • Member
  • *
  • Posts: 7
Thanks, again! I made the change. Hopefully, that will render better.

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Yes, down from 5s to 0.5