Is there a way of having TodayPlus show hours of daylight? Perhaps a formula involving sunrise and sunset times?
Quote from: dgmeleIs there a way of having TodayPlus show hours of daylight? Perhaps a formula involving sunrise and sunset times?
dgmele:
One possible way is to use an exe to obtain the sunrise and sunset time from weather.com and do the calculation, then write it into regsitry key. Then use the skin code to call it out. The exe can be triggered using TpExeDelay.
I think there is a way to calculate the sunrise and sunset based on the latitude/longtitude and timezone. If some can provide me the information, a small exe can be developed. But again, it needs to be in registry key in order to be used by TP.
Quote from: dgmeleIs there a way of having TodayPlus show hours of daylight? Perhaps a formula involving sunrise and sunset times?
There is a command :
suntime,0,daylength,official,x,y,HH:mm,,,l
It is the difference between sunrise and sunset in hours ...
Take a look in the reference to look the parameters.
Regards Broesel
broesel:
For some reason, you will get "negative" number for certain location. That was the problem I believed.
Quote from: uk_skinnerbroesel:
For some reason, you will get "negative" number for certain location. That was the problem I believed.
This is correct. I get a negative number for Fort Worth but it works for Columbus, OH or Vancouver, BC.
Quote from: uk_skinnerbroesel:
For some reason, you will get "negative" number for certain location. That was the problem I believed.
Yes, I know that, you get negative values for some cities not in your timezone,
because the time from other timezones is shown in local time ...
Regards Broesel
Quote from: BroeselQuote from: uk_skinnerbroesel:
For some reason, you will get "negative" number for certain location. That was the problem I believed.
Yes, I know that, you get negative values for some cities not in your timezone,
because the time from other timezones is shown in local time ...
Regards Broesel
In dgmele's case, the number is negative even it is the local time zone.
Quote from: uk_skinner
In dgmele's case, the number is negative even it is the local time zone.
Well, mybe there is a bug in the command, but most time the lat / lon
values are not correct. Did you try with the values from dgmele ?
Regards Broesel
Yes, I did try once. I remember it was Vancover.
Quote from: uk_skinnerYes, I did try once. I remember it was Vancover.
Yes, you're right, just tested with vancouver and got negative values :cry:
So the command daylength is not usable for some locations ...
Regards Broesel
Quote from: BroeselQuote from: uk_skinnerYes, I did try once. I remember it was Vancover.
Yes, you're right, just tested with vancouver and got negative values :cry:
So the command daylength is not usable for some locations ...
Regards Broesel
I'm in Fort Worth and use that for the local and it's also a negative number. But it does work from me with a positive number for my other locations. I've had a couple of folks, UK and ZapMe1 included, test out the Fort Worth lat and long and it does the same for them. So, I think you are right... it's broke. :lol: Where's SRS when we need him? :cry:
Got 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
Very nice work Ed, Thank You !!!!!
I too was getting tired of negative numbers, and I know Geezer was also !! His "old eyes" couldn't take it anymore !! :wink:
Nice Idea ed,
will give it a try, when I get home :D
Regards Broesel
Yes, Thank you VERY much Ed! I really am tired of seeing the negative numbers.
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
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";
}
It's working!!!
http://www.tpfans.com/rss/weather.php?Citycode=NLXX0015&Language=NL
Timmy
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
Quote from: BroeselQuote 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:
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
Quote from: BroeselQuote 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...
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?
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
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)?
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
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.
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 **
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?
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
Thanks once again, Broesel. It works!
Now, to try ZapMe1's autoupdate routine so that I don't have to tap.
ZapMe1,
I would prefer to have AutoImgDL02.exe point to \Program Files\TodayPlus\TpExeDelay.exe.
Thanks.
QuoteZapMe1,
I would prefer to have AutoImgDL02.exe point to \Program Files\TodayPlus\TpExeDelay.exe.
Thanks.
No problem.. I'll modify the file when I get home from work today !! :)
Quote\My Documents\Radar\Radar.exe
\My Documents\Radar\Suntime.exe
dgmele,
Ok, here is what we have !
1. TPexeDelay will look for the "Process", which is TP updating weather / rss, and will run when the process is complete.. For this reason, TPexeDelay can only be used with a "Manual Update Sync" !! If you already added the code to your skin, then this should work fine for you !!
2. If you want to use the Auto-Update process as I described above, then you need to run Radar.exe & Suntime.exe by themselves !! You quoted above that you had these 2-files in \my documents\radar.. I setup a new "AutoImgDL02_dgmele.exe", that will run Radar.exe & Suntime.exe when an internet connection is enabled, and used with PHM AutoPlay as described in the thread above... I also added a 25 sec delay to the start of the AutoImgDL02_dgmele.exe, to give your device the needed time to acknowledge & load the internet settings !!
I hope that wasn't all too confusing !! :knownot:
Good Luck.. Let me know if it all works for you !!! :D
ZapMe1,
Thank you so much.
Unfortunately, I discovered after your generous expenditure of time and effort that since my PPC is connected to my computer via ActiveSync while I am connected to the internet and since my update time is indeterminate PHM AutoPlay will not serve my purpose.
I'll just have to manually tap refresh unless or until someone comes up with an alternative. Not too much of a hassle, since it really is only necessary to do once a day—sunrise, sunset, and daylength data do not change until 12 AM.
I have downloaded the file you made, however, and may find it useful in some other way.
My apologies—and thanks again.
No Problem !! :D
It may come in handy sometime ....
ZapMe - this all sounds terrific, but it's also Greek to me.
When you launch the new Uniskin qvga, will all of these extra programs and updates be included in it? That would make it much simpler for those like me with limited skinning ability.
Thanks,
Dori
Quote from: pcweenieZapMe - this all sounds terrific, but it's also Greek to me.
When you launch the new Uniskin qvga, will all of these extra programs and updates be included in it? That would make it much simpler for those like me with limited skinning ability.
Thanks,
Dori
Hi pcweenie,
Uniskin 2.0 VGA has all of the current additions and .exe's that we've added over time.. The QVGA version will also have all the same.. I'm getting there, a little bit at a time !! :wink:
I have worked through some problems I was having getting suntime.exe to run. Now my cityx.txt is getting the three new fields, the registry is properly updating and my screen shows the three new titles of Rise:, Set: and Visibility:, but the values do not show.
Any ideas?
Hi MJ,
Have you made the changes in the skin code just as eemond has shown in the middle of the first page of this thread ??
ZapMe1,
I should have been more clear in my initial explination, but yes I did that part. That led to the three headings showing up, there are just no values. I have double checked the code to verify, but yes it is there just like in the post.
MJ
MJ,
If you are seeing the values in the city.txt, and the registry, it sounds like you should be there !!
Try to 're-load' the plugin, and see if that works.. If not, then maybe you could post your skin code, and I can take a look !! :D
Tried a reload, still did not do it. Here is the section of my code from the skin:
//===================================
//SUN DEATAILS
//===================================
image,3,31,sun.png,t
//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
It you need to see the whole skin let me know. I will upload the whole file.
MJ,
Ok, the first thing I see is that you are missing "commas" !! I corrected this below.. That may have caused it not to display !! Try to add them, and let me know what happens !!
//===================================
//SUN DEATAILS
//===================================
image,3,31,sun.png,t
//suntime,%var9%,sunrise,official,38,31,HH:mm,Rise: ,,l
text,38,31,Rise:,l
text,104,31,%City%var9%Sunrise%,r
//suntime,%var9%,sunset,official,38,41,HH:mm,Set: ,,l
text,38,41,Set:,l
text,104,41,%City%var9%Sunset%,r
//suntime,%var9%,daylength,official,38,51,HH:mm,Length: ,,l
text,38,51,Visibility:,l
text,104,51,%City%var9%DayLength%,r
Thanks, that did it. The commas were not in the post on page one of this thread. Maybe I missed reading that update. I jsut copied and pasted originally from that post.
Good !! :approve:
Glad you got it working !! :wink:
What is the best way to get sunrise.exe to run upon an update in hammerskin? I added it to my apps 7. But I am guessing I need to revise the skin code, but I could not tell for sure where to do this.
I have radar.exe in apps 7 already and it runs at update, but sunrise.exe seems to need something more.
Thanks,
MJ
Quote from: MJWhat is the best way to get sunrise.exe to run upon an update in hammerskin? I added it to my apps 7. But I am guessing I need to revise the skin code, but I could not tell for sure where to do this.
I have radar.exe in apps 7 already and it runs at update, but sunrise.exe seems to need something more.
uk_skinner has written an application, that looks for the process, that
updates TodayPlus with weather and rss. After that it starts applications,
that you can define in a txt-file. It is called TpExeDelay.exe and you can
find it here: http://forums.jhollin1138.com/viewtopic.php?t=1744&highlight=tpexedelay
You can define your radar.exe there and the suntime.exe, so it updates,
when you click the refresh-button.
Regards Broesel
Broesel,
I tried that over the weekend and could not get it to work. I cleared out my apps 7 and have only TpExeDelay.exe in there. I have put those two exe's in the TpExeDelay.txt file and placed it in the same directory as TpExeDelay.exe, which happnes to be the same as where the TP exe is. But it gives me an error Could Not Open TpExeDelay.txt.
I have recopied the file into the directory again just to be safe and it still gives me the same error message. Any thoughts?
MJ
Quote from: MJBroesel,
I tried that over the weekend and could not get it to work. I cleared out my apps 7 and have only TpExeDelay.exe in there. I have put those two exe's in the TpExeDelay.txt file and placed it in the same directory as TpExeDelay.exe, which happnes to be the same as where the TP exe is. But it gives me an error Could Not Open TpExeDelay.txt.
I have recopied the file into the directory again just to be safe and it still gives me the same error message. Any thoughts?
MJ
The TpExeDelay.txt has to be placed in "\My Documents\" as you can read
in the other thread. Put it there and try again ...
Regards Broesel
Broesel,
I was in that thread a bunch this weekend when I was getting it to run the first time. I missed that part when reinstalling to work with hammerskin. I think my mind thought I had done all those steps. Sorry about that and thanks for pointing it out.
Mark