Author Topic: Saratoga Alternate Template - Error:Notice: Undefined variable: evening  (Read 1122 times)

0 Members and 1 Guest are viewing this topic.

Offline nineback

  • Contributor
  • ***
  • Posts: 136
    • Albertville, AL Weather
I am attempting to use the alternate template with WeeWX.  I get the following error under the UV Summary block: Notice: Undefined variable: evening in /home/kq5sco5/public_html/weewxwdalt/ajax-dashboard6.php on line 1945.  Any ideas?

www.kq5s.com/weewxwdalt

Tom
Davis VP+
Weather Display/WeeWX
http://www.kq5s.com/

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Ahh.. I'd not tested the alternative dashboard w/o Solar/UV sensors enabled.

In alt-dashboard6.php change
Code: [Select]
                    <?php
                    
if ($haveUV) { // Show todays high if evening or yesterdays high if morning
                        
$evening 0;    // Need to adjust forecasts if it's before Midnight after dark
to
Code: [Select]
                    <?php
    $evening 0;
                    if (
$haveUV) { // Show todays high if evening or yesterdays high if morning
                        
$evening 0;    // Need to adjust forecasts if it's before Midnight after dark
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 nineback

  • Contributor
  • ***
  • Posts: 136
    • Albertville, AL Weather
Thanks Ken.  That worked like a champ.  I am a friend of Gary's and we have been working on a couple of other possible glitches involving his plug-in.  Gary is an amazing person.

One more question.  The updated time is turning green when updated but the time since the last update is not counting to 10 and then back to 0.

Updated: 05/26/2021 @ 12:40:00 pm (157 sec ago)

I just looked at your site again and see that your alternate site is doing the same thing.

Thanks,
Tom
« Last Edit: May 26, 2021, 01:53:25 PM by nineback »
Davis VP+
Weather Display/WeeWX
http://www.kq5s.com/

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Yes, I agree that Gary is an amazing person .. our collaboration since March on the WEEWX plugin has been productive and delightful.  We've corresponded numerous times via email (and the GitHub issues area), and I'm very impressed with his coding and attention to details.

I see what you are saying about the counter indicator not resetting with ajaxWDwx3.js and the alternative dashboard.. I'll chase down that issue...
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 saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Ah.. found the issue.  I'd disabled the update for current conditions (since WeeWX doesn't include a icon_number in clientraw.txt) and that inadvertently caused the counter reset to not be executed.

Download https://saratoga-weather.org/weewx/ajaxWDwx3.js and replace (after any needed customization) on your site.. this version does reset now on my site.  Thanks for highlighting the problem.
I've also updated the AltAjaxDashboard695d.zip file with these two changes.
« Last Edit: May 26, 2021, 04:49:28 PM by saratogaWX »
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 nineback

  • Contributor
  • ***
  • Posts: 136
    • Albertville, AL Weather
Hi Ken,
Mine is still not updating.  I downloaded via the link you sent and also downloaded the new 695d file and used that ajaxWDwx3.js as well.  Neither one worked.  I looked at your alt site and it is not updating either.

Tom
Davis VP+
Weather Display/WeeWX
http://www.kq5s.com/

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Try a shift-reload of the page to get the browser cache of the JavaScript updated
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 nineback

  • Contributor
  • ***
  • Posts: 136
    • Albertville, AL Weather
Yep.  The shift-reload did it.  I tried just a reload but was not aware of the shift-reload.  It's been a good day.  I learned something new.

Thanks for the help and quick response.

Tom
Davis VP+
Weather Display/WeeWX
http://www.kq5s.com/

Offline scudwatcher

  • Billy T. Forecaster Webmaster csraweather.net
  • Senior Contributor
  • ****
  • Posts: 157
  • Amateur Radio KC4SRA csraweather.net
    • CSRA Weather
Ken,
  I too, am attempting to install the ALT template and get Error: Notice: Underfined Variables when I log on to https://csraweather.org/ajax-dashboard6.php.  Here is how I provided the input in setting-weather.php

$SITE['WXtags']     = 'testtags.php';  // for weather variables .. we're using the old name instead of WDtags.php
$SITE['ajaxScript']     = 'ajaxWDwx3.js'; // for AJAX enabled display
$SITE['ajaxDashboard'] = './ajax-dashboard6.php';
$SITE['clientrawfile']  = 'clientraw.txt';  // directory and name of Weather-Display realtime.txt file
$SITE['graphImageDir']  = './';  // directory location for graph images with trailing /

Could you please advise what I am doing wrong?  Also, do I need to modify ajax-dashboard6.php with the correct time zone?  Thank You, Sir!