Author Topic: Davis 'Live' Console script  (Read 53234 times)

0 Members and 1 Guest are viewing this topic.

Offline weatherdoc

  • Senior Contributor
  • ****
  • Posts: 180
    • Willowsford Farm Weather
Re: Davis 'Live' Console script
« Reply #200 on: February 19, 2024, 07:12:51 AM »
The comment for that section of code where line 110 is located is:

// synchronise page refresh to tags upload time - assumes correct time zone set in php scripts to match WXstation location

I wonder if there is a time difference issue between your website/console?

I did notice right under the left side of your console it says Next Graph & Forecast update @ ~ 12:00 am but under my console (I'm eastern time) it says Next Graph & Forecast update @ ~ 07:10. I would think that should say Next Graph & Forecast update @ ~ 06:10, because you're in central time.

Yet, the time displayed in the upper right of the console itself is the same as the update time on your webpage.

Offline BKS97

  • Senior Contributor
  • ****
  • Posts: 173
    • Sartell East Weather
Re: Davis 'Live' Console script
« Reply #201 on: February 19, 2024, 08:23:32 AM »
Thanks, weatherdoc.  Yes, I think you are right that there must be a time discrepancy somewhere, even though the data on the console displays correctly and matches the website dashboard. As a temporary fix, I commented out the “next update” lines in the script and the warning now no longer shows up.  I will try to find where the error is coming from.

Offline Adrian23

  • Forecaster
  • *****
  • Posts: 387
Re: Davis 'Live' Console script
« Reply #202 on: March 07, 2024, 04:17:19 PM »
Does this script work on the new 6313 console? That would look great

Offline BKS97

  • Senior Contributor
  • ****
  • Posts: 173
    • Sartell East Weather
Re: Davis 'Live' Console script
« Reply #203 on: March 09, 2024, 02:12:42 PM »
Thanks, weatherdoc.  Yes, I think you are right that there must be a time discrepancy somewhere, even though the data on the console displays correctly and matches the website dashboard. As a temporary fix, I commented out the “next update” lines in the script and the warning now no longer shows up.  I will try to find where the error is coming from.

After a lot of searching and failed attempts, I finally found a fix in davconvp2CW-inc.php so that the “Next Graph & Update @ ~” message is no longer “frozen” at 12:00 am and now shows the correct next update time.

First, I had to comment out lines 110 and 112 in davconvp2CW.php, which removes the notice: Warning: A non-numeric value encountered in /home/sartelleast/www/www/davconvp2CW.php on line 110.

Then in davconvp2CW-inc.php, I changed line 280 from

<?php if ($showupdate === 1) { ?>
         <div class="cellLeft50"> <?php echo 'Next Graph & Forecast update @ ~ ' . $nextupdate; ?> </div>

to

<?php if ($showupdate === 1) { ?>
         <div class="cellLeft50"> <?php echo 'Next Graph & Forecast update @ ~ ' . $timeofnextupdate; ?> </div>

(I just addied  “time of” to “$nextupdate;”)

Finally, I also set up a NWS Forecast upload in WD to replace the Davis VP forecast on the console ticker.

Not sure if I understand why the change in line 280 made a difference, but the page seems to be working fully now.


 

anything