MrGibbage Super User
Joined: October 23 2006 Location: United States
Online Status: Offline Posts: 513
|
Posted: April 03 2010 at 16:50 | IP Logged
|
|
|
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
|