• Welcome to TodayPlus Boards v2.
 

Hours of Daylight

Started by dgmele, April 25, 2005, 01:13:42 PM

Previous topic - Next topic

uk_skinner

Quote from: eemondGot bored this W/E, tired of looking at negative numbers. Took UK's lead and ran with it.

http://weather.yahoo.com/forecast/USMA0056.html

has a Sunrise/Sunset.

Modified my Weather Feed:

http://todayplus.jhollin1138.com/rss/forecast_yahoo_txt.php?Citycode=USMA0056&Language=US

to add 3 new attributes (this.swSunrise, this.swSunset and this.swDayLength).

Wrote another small Suntime.EXE (after UK's TpRegistyWind) to extract from the city1.txt and create a TP Registry text entry:

City1Sunrise, City1Sunset and City1DayLength.

Skin code changes from/to

//suntime,%var9%,sunrise,official,38,31,HH:mm,Rise:     ,,l
text,38,31,Rise:,l
text104,31,%City%var9%Sunrise%,r

//suntime,%var9%,sunset,official,38,41,HH:mm,Set:      ,,l
text,38,41,Set:,l
text104,41,%City%var9%Sunset%,r

suntime,%var9%,daylength,official,38,51,HH:mm,Length: ,,l
text,38,51,Visibility:,l
text104,51,%City%var9%DayLength%,r

Maybe UK will have time to modify some of the other Weather Feeds.

Regards,
eemond

No problem..  I will take a look and modify the script. :D

uk_skinner

Ok, I modified the weather.php based on eemond's idea.  A little bit difference though.  The time format is AM/PM format.

http://www.tpfans.com/rss/weather.php?Citycode=USMD0347&Language=US

function makeWeatherObj() {




this.swSunrise = "5:54 AM";


this.swSunset = "8:17 PM";


this.swDayLength = "14:23";

this.swCity = "Rockville";

this.swSubDiv = "MD";

this.swCountry = "United States";

this.swRegion = "North America";

this.swTemp = "66";

this.swTempCel = Math.round(5/9)*(this.swTemp-32);

this.swCIcon = "28";

this.swWindS = "1";

this.swWindD = "W";

this.swBaro = "30.12";

this.swHumid = "46";

this.swReal = "66";

this.swUV = "3";

this.swVis = "9.0";

this.swLastUp = "May 17 03:45 p.m. ET";

this.swConText = "Mostly Cloudy";

                       this.swFore = "3|4|5|6|7|05/17/2005|05/18/2005|05/19/2005|05/20/2005|05/21/2005|30|30|39|28|26|4|4|29|3|1|66|74|70|66|71|0|20|30|20|20|29|29|11|27|27|4|4|13|3|3|52|53|54|50|54|";



this.swAcid = "USMD0347";
}

Timmy

Toshiba e750BT, WM 2003, Today Plus 0.11.0, WISbar Adv, Agenda Fusion, Pocket Slides, TomTom

Broesel

Quote from: TimmyIt's working!!!
http://www.tpfans.com/rss/weather.php?Citycode=NLXX0015&Language=NL

Timmy

Yes, it's working, but for European users it would be nice to get not
AM/PM but 24 hours showing .....  any chance, uk ?

Regards Broesel

uk_skinner

Quote from: Broesel
Quote from: TimmyIt's working!!!
http://www.tpfans.com/rss/weather.php?Citycode=NLXX0015&Language=NL

Timmy

Yes, it's working, but for European users it would be nice to get not
AM/PM but 24 hours showing .....  any chance, uk ?

Regards Broesel

Ok, I will work on it.

Edit: Done. :wink:

Broesel

Quote from: uk_skinner

Ok, I will work on it.

Edit: Done. :wink:

Cool , thanks again, would you mail me the script ?  :roll:

Regards Broesel

uk_skinner

Quote from: Broesel
Quote from: uk_skinner

Ok, I will work on it.

Edit: Done. :wink:

Cool , thanks again, would you mail me the script ?  :roll:

Regards Broesel

Will do, tonight...

dgmele

I'm unsure as to how to apply the information given in this thread on achieving hours of daylight.

Here's what I did:

Added UK's URL (changing to my location--USCA0997) as rss.
Placed Suntime.exe in My Documents/TodayPlus folder and tried to execute.

The results:

No info on weather in the rss window.
No addition in the registry for Text for City1....

I am using my own skin, not Hammerskin, if that might make a difference.

What am I doing wrong?

ZapMe1

Quote from: dgmeleI'm unsure as to how to apply the information given in this thread on achieving hours of daylight.

Here's what I did:

Added UK's URL (changing to my location--USCA0977) as rss.
Placed Suntime.exe in My Documents/TodayPlus folder and tried to execute.

The results:

No info on weather in the rss window.
No addition in the registry for Text for City1....

I am using my own skin, not Hammerskin, if that might make a difference.

What am I doing wrong?
There are a few things you need to do:

1) Add code into your skin to have SunTime.exe run when the weather update takes place, or to run when you tap a manual sync..

2) Change the code in your skin for Sunrise, Sunset, & Day Length, like eemond's example on the first page of this thread !

3) Clear your "buffer" folder, and download fresh information !!  (Good to do every once in awhile !)

Good Luck !!  Check back if you're still having problems !!  :D
ZapMe1

"The most knowledgable person in the world is not the one who possesses the most knowledge, but the one who surrounds themselves with the greatest number of knowledgable people"

dgmele

I don't know what code to add to make Suntime.exe run automatically. Help.
I added the necessary code to my skin ala Eemond (but have nothing as yet to appear).
I cleared the buffer.

City1 text does not include the 3 new parameters that Eemond has added. I suspect that it has to do with modifying the weather feed. How do I do that (apparently not by adding an rss feed as I did, which does include the 3 new parameters)?

Broesel

Quote from: dgmeleI don't know what code to add to make Suntime.exe run automatically. Help.
I added the necessary code to my skin ala Eemond (but have nothing as yet to appear).
I cleared the buffer.

City1 text does not include the 3 new parameters that Eemond has added. I suspect that it has to do with modifying the weather feed. How do I do that (apparently not by adding an rss feed as I did, which does include the 3 new parameters)?

What you have to do:

Download the extended weatherfeed with radar.exe. Save the files
as cityx.txt (replace the cityx.txt from msnbc.com) in your buffer-folder !

Run the radar.exe and the suntime.exe with the TpExedelay.exe from this
thread: http://forums.jhollin1138.com/viewtopic.php?t=1744

Then the suntime.exe reads the extended cityx.txt and writes the values
you need in the registry.

Hope that helps
Broesel

dgmele

Thanks, Broesel. I got the weather feed to work via Radar.exe and the registry data entered via Suntime.exe. I can't get TpExeDelay.exe to work so that I am doing everything manually until I figure out that problem.

ZapMe1

dgmele,

If you are looking to "Auto-Update", you may want to try the option in the following thread !
http://forums.jhollin1138.com/viewtopic.php?t=1717

I also modified the AutoImgDL02.exe file to run TPexeDelay.exe !!
I'm attaching the file if you want to try it !!  If you do, let me know if it works ok !!

Good luck !!  :D

Edit: The AutoImgDL02.exe will look in \My Documents folder for TPexeDelay.exe..  If another storage location is preferred, let me know, and I can change it !!

** Attachment Deleted **
ZapMe1

"The most knowledgable person in the world is not the one who possesses the most knowledge, but the one who surrounds themselves with the greatest number of knowledgable people"

dgmele

Thanks, ZapMe1.

I'd like to try your suggestion, but I can't get TpExeDelay to work.

When manually executing TpExeDelay.exe, I get the error message "Process. Not Found"

The TpExeDelay.txt file reads:

\My Documents\Radar\Radar.exe
\My Documents\Radar\Suntime.exe

TpExeDelay.txt and TpExeDelay.exe are in \My Documents.

Any suggestions?

Broesel

Quote from: dgmeleWhen manually executing TpExeDelay.exe, I get the error message "Process. Not Found"

Yes, the TpExeDelay looks for the process, that downloads the weather
and rss. The way you have to do is as following:

1. Create a shortcut to the TpExeDelay.exe with the config.exe (f.ex.
   under apps-7 (or any other, but remember the number of the shortcut !)
   We'll take the first shortcut under apps-7 for this example (apps-7-1)

2. Find your refresh-button in the skin. Example:
   imagebutton,152,30,refresh_button.png,t,0,7,,-1

3. Create a second button-command for this button to call the TpExeDelay
   so it looks like the following code:

    imagebutton,152,30,refresh_button.png,t,0,7,,-1
   button,152,30,14,8,-1,0,%apps-7-1

If you now hit the refresh-button, the TpExeDelay starts, looks for the
download-process and starts the programs you defined in the TpExeDelay.txt
after the regular download has finished.

Hope, that could make it clear ...
Regards Broesel