WXforum.net

Web Weather => Weather Website PHP/AJAX scripting => Topic started by: BristolRILiveWx on October 31, 2018, 11:42:59 AM

Title: Saratoga Template not seeing Solar & UV
Post by: BristolRILiveWx on October 31, 2018, 11:42:59 AM
So recently my WD Software experience a major crash, with help it’s back up and running, however it seems the main page dashboard is not seeing any of my solar or UV data, but according to my testtags, the data is there. Any idea as to why it’s not seeing it?


Sent from my iPhone using Tapatalk
Title: Re: Saratoga Template not seeing Solar & UV
Post by: BristolRILiveWx on October 31, 2018, 11:43:40 AM
http://rudmanradar.ddns.net:8888/ (http://rudmanradar.ddns.net:8888/)


Sent from my iPhone using Tapatalk
Title: Re: Saratoga Template not seeing Solar & UV
Post by: Jasiu on October 31, 2018, 07:41:22 PM
A guess based on looking at your settings and the source via:

Code: [Select]
http://rudmanradar.ddns.net:8888/ajax-dashboard6.php?sce=view
For both the UV and Solar portions of the display, the variable $dayornight is referenced. For UV, it is:

Code: [Select]
<?php if (($haveUV) && ($dayornight == 'Day')) {  //  Have a UV sensor .. show realtime data & not night ?>

  (display one <tr>)

<?php } else {  //  don't have UV sensor .. show UV forecast instead  ?>

  (display another <tr>)

<?php // End UV ?>

For Solar, it is:

Code: [Select]
<?php if ($haveSolar) {  // Have a Solar Sensor  show current values  ?>
<?php if ($dayornight == 'Night') { ?>

  (display one <tr>)

<?php // End Of Solar Night ?>
<?php if ($dayornight == 'Day') { ?>

  (display another <tr>)

<?php ?>
<?php } else { // don't have solar  show info instead  ?>

  (display a third <tr>)

<?php // end $haveSolar  ?>

The resultant display seems to be what would be rendered if $haveSolar is true and $dayornight isn't set to either of the values 'Day' or 'Night'. I'm not sure where the latter variable is supposed to be set but I didn't see it in the dashboard file or the settings file

You might consider adding a temporary debug line to the dashboard file, just before that solar section, to see what the value is; e.g.:

Code: [Select]
echo"<!-- dayornight: $dayornight -->\n";

You can then check that out via view-source of the index page.
Title: Re: Saratoga Template not seeing Solar & UV
Post by: BristolRILiveWx on November 03, 2018, 01:52:34 PM
A guess based on looking at your settings and the source via:

Code: [Select]
http://rudmanradar.ddns.net:8888/ajax-dashboard6.php?sce=view
For both the UV and Solar portions of the display, the variable $dayornight is referenced. For UV, it is:

Code: [Select]
<?php if (($haveUV) && ($dayornight == 'Day')) {  //  Have a UV sensor .. show realtime data & not night ?>

  (display one <tr>)

<?php } else {  //  don't have UV sensor .. show UV forecast instead  ?>

  (display another <tr>)

<?php // End UV ?>

For Solar, it is:

Code: [Select]
<?php if ($haveSolar) {  // Have a Solar Sensor  show current values  ?>
<?php if ($dayornight == 'Night') { ?>

  (display one <tr>)

<?php // End Of Solar Night ?>
<?php if ($dayornight == 'Day') { ?>

  (display another <tr>)

<?php ?>
<?php } else { // don't have solar  show info instead  ?>

  (display a third <tr>)

<?php // end $haveSolar  ?>

The resultant display seems to be what would be rendered if $haveSolar is true and $dayornight isn't set to either of the values 'Day' or 'Night'. I'm not sure where the latter variable is supposed to be set but I didn't see it in the dashboard file or the settings file

You might consider adding a temporary debug line to the dashboard file, just before that solar section, to see what the value is; e.g.:

Code: [Select]
echo"<!-- dayornight: $dayornight -->\n";

You can then check that out via view-source of the index page.

just getting the chance to read your post, however nothing changed as far as my website goes, so I'm not sure why it would be doing that in the script?
Title: Re: Saratoga Template not seeing Solar & UV
Post by: BristolRILiveWx on November 09, 2018, 02:40:26 PM
A guess based on looking at your settings and the source via:

Code: [Select]
http://rudmanradar.ddns.net:8888/ajax-dashboard6.php?sce=view
For both the UV and Solar portions of the display, the variable $dayornight is referenced. For UV, it is:

Code: [Select]
<?php if (($haveUV) && ($dayornight == 'Day')) {  //  Have a UV sensor .. show realtime data & not night ?>

  (display one <tr>)

<?php } else {  //  don't have UV sensor .. show UV forecast instead  ?>

  (display another <tr>)

<?php // End UV ?>

For Solar, it is:

Code: [Select]
<?php if ($haveSolar) {  // Have a Solar Sensor  show current values  ?>
<?php if ($dayornight == 'Night') { ?>

  (display one <tr>)

<?php // End Of Solar Night ?>
<?php if ($dayornight == 'Day') { ?>

  (display another <tr>)

<?php ?>
<?php } else { // don't have solar  show info instead  ?>

  (display a third <tr>)

<?php // end $haveSolar  ?>

The resultant display seems to be what would be rendered if $haveSolar is true and $dayornight isn't set to either of the values 'Day' or 'Night'. I'm not sure where the latter variable is supposed to be set but I didn't see it in the dashboard file or the settings file

You might consider adding a temporary debug line to the dashboard file, just before that solar section, to see what the value is; e.g.:

Code: [Select]
echo"<!-- dayornight: $dayornight -->\n";

You can then check that out via view-source of the index page.

just getting the chance to read your post, however nothing changed as far as my website goes, so I'm not sure why it would be doing that in the script?

So I was browsing my site, and it looks like WD is not sending Solar Max, Solar kWh, UV, Humidity, and ET values. I can see that on the following pages

http://rudmanradar.ddns.net:8888/wxuvdetail.php (http://rudmanradar.ddns.net:8888/wxuvdetail.php)

http://rudmanradar.ddns.net:8888/wxhumiditydetail.php? (http://rudmanradar.ddns.net:8888/wxhumiditydetail.php?)


Sent from my iPhone using Tapatalk