Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome and Elk
 PowerHome Messageboard : PowerHome and Elk
Subject Topic: My Weather Program Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
MrGibbage
Super User
Super User
Avatar

Joined: October 23 2006
Location: United States
Online Status: Offline
Posts: 513
Posted: April 03 2010 at 16:50 | IP Logged Quote MrGibbage

This just displays the temperature in the keypad display. Set a timer to run it once an hour and you should be good to go. And of course, modify the xml file so it
points to the area of your location.

Also, it will look for a global variable... in this case "KCPK_TEMP_F". You may want to change that and create it before you run it as well.

I hope someone finds it useful!

insert into macroheader values ('KP_DISPLAY_TEXT','Display Text on Keypads',0,0,1);
insert into macrodetail values ('KP_DISPLAY_TEXT',1,38,'',0,'ph_setvar_s(3,31,ph_geturl("ht tp://www.weather.gov/xml/current_obs/KCPK.xml"))',0,'');
insert into macrodetail values ('KP_DISPLAY_TEXT',2,10,'KCPK_TEMP_F',NULL,'ph_replaceall(mi d(ph_getvar_s(3,31),pos(ph_getvar_s(3,31),"<temp_f>")+ 8,5),"<"," ")',0,'');
insert into macrodetail values ('KP_DISPLAY_TEXT',3,10,'KCPK_TEMP_F',NULL,'ph_replaceall(ph _getglobal_s("KCPK_TEMP_F"),"/"," ")',0,'');
insert into macrodetail values ('KP_DISPLAY_TEXT',4,10,'KCPK_TEMP_F',NULL,'ph_replaceall(ph _getglobal_s("KCPK_TEMP_F"),"t"," ")',0,'');
insert into macrodetail values ('KP_DISPLAY_TEXT',5,38,'',0,'ph_ctlrsq("ELK",231,"Curr Temp: {KCPK_TEMP_F}^234567890123456",8,100)',0,'');

Edited by MrGibbage - April 03 2010 at 16:53
Back to Top View MrGibbage's Profile Search for other posts by MrGibbage
 
MrGibbage
Super User
Super User
Avatar

Joined: October 23 2006
Location: United States
Online Status: Offline
Posts: 513
Posted: April 03 2010 at 16:55 | IP Logged Quote MrGibbage

hmmm... I see some erroneous spaces in there that I can't
seem to edit out.
mid(ph_getvar.....
and ph_getglobal (twice)

I think the rest is OK
Back to Top View MrGibbage's Profile Search for other posts by MrGibbage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum