Sunrise/Sunset script

I should have warned you that my version of the script is set up for use in the menubar only. The float:right style of the white text has put it at the far right of your page where white on white is obviously invisible. Do you not plan to use it in the menubar? Put it in your menubar as posted, and it should be just fine.

Okay, thanks, I got both percentage numbers showing in the pie showing on the test page. Didn’t want to do move it beyond the test page until I figured out how to get the minutes more sunshine showing other than 0.

I often see “0 min Longer”, just give it a day or two and see what happens with that tag.

  • Jim

If you lived in higher latitudes you would see larger day-to-day differences :slight_smile: I show 2 min. longer daylight today.

I don’t think that’s the issue, tiggrweather is farther south than Stillwater OK and the tag is showing 1 minute, so I suspect there may be a problem with the Stillwater $changeinday tag. IIRC the WD change in day is driven by the solar max calculation, and not the rise/set times, so if solar isn’t set up (I see Stillwater has zero for the solar readings) it may not work.

OK. Thanks, Niko. #-o

While there’s a lot to look over, I’ve tried looking for likely looking settings for that in some of the saratoga files, but couldn’t find anything.

From Brian in another thread:

If the control panel means setting.php, it looks ok to me:

Station location: latitude, longitude, cityname

$SITE[‘latitude’] = ‘36.125153’; //North=positive, South=negative decimal degrees
$SITE[‘longitude’] = ‘-97.047323’; //East=positive, West=negative decimal degrees
$SITE[‘cityname’] = ‘Stillwater’;
$SITE[‘tz’] = ‘America/Chicago’; //NOTE: this MUST be set correctly

If helpful, this is how the code looks like on the page:

       <td class="data1" style="text-align: center;"><?php langtrans('Daylight'); ?>:

			  <?php echo "<img src=\"${imagesDir}sun.jpg\" width=\"50\" height=\"48\" alt=\"Possible hours of Daylight\" />" ?>

			  <?php echo $hoursofpossibledaylight; ?>


			  <?php
			  if (substr_count($changeinday, '-') == 0)
			     echo ("+" . "$changeinday");
                              else
                                 echo "$changeinday";
			  ?>
<?php langtrans('Minutes'); ?>
		   </td>

It refers to Control Panel in the WD program.

Okay, I went to the appropriate place in the control panel, messed around some there and apparently have it working now. Thanks.

Jerry,

‘Borrowed’ your code. Made everything a bit larger, then had to fix the alignment, but looks good (I think).

Thank you!

You’re welcome, John. I’m glad you were able to get it working for you. :slight_smile:

Your screenshot is the sun/moon coordinates screen, not the solar sensor setup screen, please post the one from Control Panel, Solar Sensor, it will look something like this (image from the FAQ):

Okay, here it is. It’s switched off, because I don’t have a solar sensor.

Well, I tried turning on the above switch. Now the daylight gain always says +00.00. Little wonder, I don’t have a solar sensor. So, I may decide to give up on it and see if I can remove it, so it won’t look dumb.

Did you enter the lat/long etc on that page?

It does work, see this recent thread.

you need to have the lat/long set up correctly in the max solar setup
(does not matter if you do not have a solar sensor)
as that is used for day length

May have spoken too soon, Jerry. It always seems to indicate ‘10 hrs 57 min of daylight today’ and ‘Which is 2 min longer than yesterday’. Haven’t seen anything different. Checked control panel and testtags (2?).

Thoughts appreciated.

Your testtags.php file is where this data is found. Given your latitude the numbers seem about right to me vs. mine today (10 hrs 37 min. 2 min longer than Yesterday). Give it a couple more days and see what happens. When I first set it up for some reason I had a day with 0 minutes difference than yesterday. But in all WD produces these numbers quite reliably I think, and I’ve seen a gradual lengthening of daylight each day as is appropriate for our season here in the NH.