Author Topic: Ajax-dashboard Modifications  (Read 885 times)

0 Members and 1 Guest are viewing this topic.

Offline scudwatcher

  • Billy T. Forecaster Webmaster csraweather.net
  • Senior Contributor
  • ****
  • Posts: 158
  • Amateur Radio KC4SRA csraweather.net
    • CSRA Weather
Ajax-dashboard Modifications
« on: March 17, 2023, 06:23:26 PM »
Good Evening From The CSRA!  Since I have been unlucky to configure and run the newly updated ALT-DASHBOARD 6.95h three times, I am attempting modify the current distribution, Saratoga Base USA ajax-dashboard.php script, "Alamanac" section as follows:

Line 792   From:

 <td class="datahead"><?php langtrans('Almanac'); ?></td>

To:

<td class="datahead"><?php langtrans('Soil Temperature / Moisture'); ?></td>

I have entered the heading titles "Temperature 4", Moisture 4", Temperature 8" and Moisture 8" in Lines 879, 885, 908 and 914.
I have entered the corresponding WD testags as follows:

Line 881 ($soiltemp) Davis Soil Temp #1
Line 887 ($VPsoilmoisture) Davis Soil Moisture #1
Line 910 ($VPsoiltemp2) Davis Soil Temp #2
Line 916 ($VPsoilmoisture2) Davis Soil Moisture #2

But, when I run: https://csraweather.org I still observe ALMANAC Times.  Would / could someone direct me to a resolution with this modification?  Thank You in advance!

Offline Vasco

  • Forecaster
  • *****
  • Posts: 372
    • PWS
Re: Ajax-dashboard Modifications
« Reply #1 on: March 17, 2023, 07:08:38 PM »
I have entered the corresponding WD testags as follows:

Line 881 ($soiltemp) Davis Soil Temp #1
Line 887 ($VPsoilmoisture) Davis Soil Moisture #1
Line 910 ($VPsoiltemp2) Davis Soil Temp #2
Line 916 ($VPsoilmoisture2) Davis Soil Moisture #2

WD tags would be %VPsoiltemp%, etc., from tagslist.txt line 1528 on, but I don't think they are in testtags.txt?

And then I think you would need to define the corresponding strings to echo in lines 881 etc.
Ecowitt GW1102 (with GW2000) + Weather Display in Windows 10

Offline scudwatcher

  • Billy T. Forecaster Webmaster csraweather.net
  • Senior Contributor
  • ****
  • Posts: 158
  • Amateur Radio KC4SRA csraweather.net
    • CSRA Weather
Re: Ajax-dashboard Modifications
« Reply #2 on: March 18, 2023, 11:00:48 AM »
Vasco,
 I checked my WD testtags.txt:

Line 1011 '%soiltemp%' Davis Soil Temp #1
Line 1059  '%VPsoilmoisture%' Davis Soil Moisture #1
Line 1022  '%VPsoiltemp2%' Davis Soil Temp #2
Line 1078  '%VPsoilmoisture2%' Davis Soil Moisture #2

WD File Conversion # 29  testtags.txt to testtags.php every 60 seconds

At 1045 EDT / 1445Z

Line 1013  $soiltemp = '57&deg;F';  // Davis soil temperature #1
Line 1061  $VPsoilmoisture = '113.4';  //Davis Soil Moisture #1
Line 1024  $VPsoiltemp2 = '57';  // Davis soil temperature #2
Line 1080  $VPsoilmoisture2 = '117.9'; //Davis Soil Moisture #2

So, WD is running with no issues.

I believe in ajax-dashboard.php, I need to change the echo to define the data strings?  Doing a little research here...a serious learning curve...so would I change:

Line 881  From <?php echo fixup_time($soiltemp); ?>
              To     <?php echo data($soiltemp); ?>

Line 887 From  <?php echo fixup_time($VPsoilmoisture); ?>
             To       <?php echo data($VPsoilmoisture); ?>

Line 910  From  <?php echo fixup_time($VPsoiltemp2); ?>
              To       <?php echo data($VPsoiltemp2); ?>

Line 916  From   <?php echo fixup_time($VPsoilmoisture2); ?>
              To        <?php echo data($VPsoilmoisture2); ?>

Anyone out there would / could be willing to chime-in?  Thank You Vasco and All in advance!

 

Offline Vasco

  • Forecaster
  • *****
  • Posts: 372
    • PWS
Re: Ajax-dashboard Modifications
« Reply #3 on: March 18, 2023, 12:12:00 PM »
I checked my WD testtags.txt:

Line 1011 '%soiltemp%' Davis Soil Temp #1
Line 1059  '%VPsoilmoisture%' Davis Soil Moisture #1
Line 1022  '%VPsoiltemp2%' Davis Soil Temp #2
Line 1078  '%VPsoilmoisture2%' Davis Soil Moisture #2

Definitely not in my testtags.txt, but good luck for you  :-)

Quote
I believe in ajax-dashboard.php, I need to change the echo to define the data strings?  Doing a little research here...a serious learning curve...so would I change:

Line 881  From <?php echo fixup_time($soiltemp); ?>
              To     <?php echo data($soiltemp); ?>

No need for data(), just
Code: [Select]
<?php echo $soiltemp?>- I think. (I'm no expert!)

But $soiltemp already has units °F, while $VPsoiltemp2 does not. In that case
Code: [Select]
<?php echo $VPsoiltemp2.$uomTemp?>
I'm sorry I don't know what units moisture has, but you could add them.

Note 1. I think you could strip the WD units off $soiltemp first:
Code: [Select]
<?php $soiltemp=strip_units($soiltemp); echo $soiltemp.$uomTemp?>
or
Code: [Select]
<?php echo strip_units($soiltemp).$uomTemp?>
Note 2. There are two moonrises and two moonsets in ajax-dashboard.php . . .

As I say, I'm no expert, but it's fun to try these things  :grin:

« Last Edit: March 18, 2023, 12:32:45 PM by Vasco »
Ecowitt GW1102 (with GW2000) + Weather Display in Windows 10

Offline scudwatcher

  • Billy T. Forecaster Webmaster csraweather.net
  • Senior Contributor
  • ****
  • Posts: 158
  • Amateur Radio KC4SRA csraweather.net
    • CSRA Weather
Re: Ajax-dashboard Modifications
« Reply #4 on: March 18, 2023, 03:48:22 PM »
Thanks Vasco!  It worked!  I am now observing the data!  Configuring $UOM now.....the extra moonset and moonrise strings are bizarre, but I don't want to cut out anything.  I made an attempt yesterday, but thank The Lord I saved a back-up file!  Thank You for chiming-in!

Offline Vasco

  • Forecaster
  • *****
  • Posts: 372
    • PWS
Re: Ajax-dashboard Modifications
« Reply #5 on: March 18, 2023, 04:03:21 PM »
Thanks Vasco!  It worked!

 [tup]

Quote
the extra moonset and moonrise strings are bizarre, but I don't want to cut out anything.

You can get moonset before moonrise, as it says.

Quote
I made an attempt yesterday, but thank The Lord I saved a back-up file!

I always save "work in progress" to a completely different directory until I'm satisfied that it works.  :-)


P.S. What are moisture units?
« Last Edit: March 18, 2023, 04:10:24 PM by Vasco »
Ecowitt GW1102 (with GW2000) + Weather Display in Windows 10

Offline scudwatcher

  • Billy T. Forecaster Webmaster csraweather.net
  • Senior Contributor
  • ****
  • Posts: 158
  • Amateur Radio KC4SRA csraweather.net
    • CSRA Weather
Re: Ajax-dashboard Modifications
« Reply #6 on: March 18, 2023, 04:52:41 PM »
Well, I am struggling through an exhaustive search for the soil moisture UOM.  In WD it is "centipose".  Davis Soil Moisture is in "Centibars", which I prefer to utilize.  Is there one?  Or, do I create one in c:/wdisplay/webfiles/testtags.txt?  I created a new topic for this in the WD Weather-Watch Forum.  Hopefully someone can chime-in.  Thank You for all your help!  I have all the ajax-dashboard.php changes if interested.....I have saved a back-up copy as well in my external HD.

Offline Vasco

  • Forecaster
  • *****
  • Posts: 372
    • PWS
Re: Ajax-dashboard Modifications
« Reply #7 on: March 18, 2023, 05:51:08 PM »
I have seen "cb" - presumably centibar, although that really should be "cbar" - elsewhere. If you think that's correct you can add the units directly:

Code: [Select]
<?php echo $VPsoilmoisture." cb"?>
Note the space. . .
« Last Edit: March 18, 2023, 06:19:32 PM by Vasco »
Ecowitt GW1102 (with GW2000) + Weather Display in Windows 10

Offline scudwatcher

  • Billy T. Forecaster Webmaster csraweather.net
  • Senior Contributor
  • ****
  • Posts: 158
  • Amateur Radio KC4SRA csraweather.net
    • CSRA Weather
Re: Ajax-dashboard Modifications
« Reply #8 on: March 18, 2023, 07:25:01 PM »
Well, I didn't think it would be that easy....I will revise my dashboard tomorrow....so jealous!  Really like your FRESHWDL page!  You wouldn't consider zipping up a script package and send it to me?  I wish Brian Hamilton would bring it back!  Thanks anyway!

Offline Vasco

  • Forecaster
  • *****
  • Posts: 372
    • PWS
Re: Ajax-dashboard Modifications
« Reply #9 on: March 18, 2023, 07:47:33 PM »
Really like your FRESHWDL page!

Thanks. FreshWDL is available from Brian's download page at https://www.weather-display.com/files.php

The original WDL is defunct, it used Flash.



Ecowitt GW1102 (with GW2000) + Weather Display in Windows 10

Offline scudwatcher

  • Billy T. Forecaster Webmaster csraweather.net
  • Senior Contributor
  • ****
  • Posts: 158
  • Amateur Radio KC4SRA csraweather.net
    • CSRA Weather
Re: Ajax-dashboard Modifications
« Reply #10 on: March 19, 2023, 07:39:13 AM »
Well, I really meant the "old" flash in Weather Display.  Back in the good ole days, I had Virtual Weather Station WeatherFlash, I believe, and it was a cool "LIVE" page.  Have a great day!

Offline Vasco

  • Forecaster
  • *****
  • Posts: 372
    • PWS
Re: Ajax-dashboard Modifications
« Reply #11 on: March 19, 2023, 03:49:50 PM »
Well, I really meant the "old" flash in Weather Display.

You mean this bit of nostalgia?
Ecowitt GW1102 (with GW2000) + Weather Display in Windows 10

Offline scudwatcher

  • Billy T. Forecaster Webmaster csraweather.net
  • Senior Contributor
  • ****
  • Posts: 158
  • Amateur Radio KC4SRA csraweather.net
    • CSRA Weather
Re: Ajax-dashboard Modifications
« Reply #12 on: March 19, 2023, 05:38:42 PM »
Yup, brings back a lot of memories learning how to display weather data….

 

anything