Author |
|
JimmyL Newbie
Joined: March 26 2010 Location: United States
Online Status: Offline Posts: 32
|
Posted: January 30 2011 at 11:57 | IP Logged
|
|
|
I've been using the following statement for the last year to get the current temperature from:
mobile.wunderground.com/cgi-bin/findweather/getForecast?bran d=mobile&query=35661
ph_regexsnap('<tr><td>Temperature</td>~255 <b>\(.+\)</b>°F'," [LOCAL1]",1,0)
It quit working a few days ago. I believe Pete provided my with this program. They probably changed something on the website but I don't know where to start to fix it. Can someone provide the answer?
I have PH announce the temperature, etc. through our Russound whole house stereo system - it's my wife's favorite feature so I've got to get it working again to keep her happy.
Thanks
__________________ Jimmy
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: January 31 2011 at 21:23 | IP Logged
|
|
|
I noticed this, too. Guess I should figure it out. ;)
|
Back to Top |
|
|
nadler Super User
Joined: February 25 2006 Location: United States
Online Status: Offline Posts: 354
|
Posted: January 31 2011 at 22:00 | IP Logged
|
|
|
Same issue here.
This worked for me:
ph_regexsnap('<tr><td>Temperature</td>~255 <b>\(.+\)
</b>°F',"[LOCAL1]",1,0)
Got tired of hearing:
"The temperature is Syntax Error"!
Noel
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: February 01 2011 at 08:11 | IP Logged
|
|
|
That looks to be the same?
|
Back to Top |
|
|
JimmyL Newbie
Joined: March 26 2010 Location: United States
Online Status: Offline Posts: 32
|
Posted: February 01 2011 at 08:50 | IP Logged
|
|
|
Noel - Tried your suggestion but it didn't work for me. Still returns a blank field.
__________________ Jimmy
|
Back to Top |
|
|
nadler Super User
Joined: February 25 2006 Location: United States
Online Status: Offline Posts: 354
|
Posted: February 01 2011 at 10:21 | IP Logged
|
|
|
The forum software converted the code:
Here is what it should be -
ph_regexsnap('<tr><td>Temperature</td>~255 <b>\(.+\)</b>&
deg;F',"[LOCAL1]",1,0)
Take out the space between & and deg - I had to put it in
to get it to post correctly here.
That should do it.
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: February 01 2011 at 11:38 | IP Logged
|
|
|
So Noel, the only reason it quit was because of the different °?
__________________ Pete - X10 Oldie
|
Back to Top |
|
|
nadler Super User
Joined: February 25 2006 Location: United States
Online Status: Offline Posts: 354
|
Posted: February 01 2011 at 17:10 | IP Logged
|
|
|
I think I might have made 1 other change as well. Perhaps
putting quotes around a subsequent local variable, but I'm
not certain.
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: February 01 2011 at 18:11 | IP Logged
|
|
|
Hmm. That worked, thanks!
|
Back to Top |
|
|
JimmyL Newbie
Joined: March 26 2010 Location: United States
Online Status: Offline Posts: 32
|
Posted: February 01 2011 at 18:36 | IP Logged
|
|
|
Works for me too.
Thanks
__________________ Jimmy
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: February 01 2011 at 21:17 | IP Logged
|
|
|
Thanks… The only change I saw was the definition of degree "176:F."
BTW I’m testing a new Weather Alert that uses the new beta weather site since the old one went south as predicted. By the time they get off of beta I should be done. Trying now to make Tornado real alerts.
Edited by BeachBum - February 01 2011 at 21:20
__________________ Pete - X10 Oldie
|
Back to Top |
|
|
reighnman Newbie
Joined: October 04 2010
Online Status: Offline Posts: 26
|
Posted: February 15 2011 at 00:09 | IP Logged
|
|
|
well the same thin has happened to me. temp no lnger works and I have no clue how to fix it. any chance there will be a new complete link. so even us noobs can just copy and paste for success thanks
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: February 15 2011 at 08:12 | IP Logged
|
|
|
Just paste the ph_regexsnap above in place of yours.
|
Back to Top |
|
|
R1zbear Newbie
Joined: March 04 2011 Location: Canada
Online Status: Offline Posts: 1
|
Posted: March 08 2011 at 01:57 | IP Logged
|
|
|
I'm new in here, Hope to enjoy this forum.
__________________ Watch Battle: Los Angeles Movie Online Free
|
Back to Top |
|
|
syonker Senior Member
Joined: March 06 2009 Location: United States
Online Status: Offline Posts: 212
|
Posted: March 13 2011 at 09:40 | IP Logged
|
|
|
Huh....still getting a goose egg on this. Here's the REGXSNAP statement I'm using (from above - note I copied it "as is" and the "& deg;" shows up as a degree symbol...but the line is correct in PH);
ph_regexsnap('<tr><td>Temperature</td>~255 <b>\(.+\)</b>°F',"[LOCAL1]",1,0)
...and here is the section of code from which it *should* be snapping:
<tr><td>Temperature</td>
<td>
<span class="nowrap"><b>33.6</b>°F</span>
/
<span class="nowrap"><b>0.9</b>°C</span>
</td>
</tr>
<tr><td>Windchill</td>
<td>
<span class="nowrap"><b>34</b>°F</span>
/
<span class="nowrap"><b>1</b>°C</span>
</td></tr>
<tr><td>Humidity</td>
What have I boogered up this time...? :)
-S
Edited by syonker - March 13 2011 at 09:43
__________________ "I will consider myself having succeeded when my house becomes sentient and attempts to kill me."
><(((º>`·.¸¸.·´¯`·.¸><(((º>¸.
·´¯`·.¸. , . ><(((º>`·.¸¸.·´¯`·.¸><(((º>
|
Back to Top |
|
|
syonker Senior Member
Joined: March 06 2009 Location: United States
Online Status: Offline Posts: 212
|
Posted: March 13 2011 at 11:45 | IP Logged
|
|
|
Scratch that - for some reason it up and started working....not sure why, but don't care. :)
-S
__________________ "I will consider myself having succeeded when my house becomes sentient and attempts to kill me."
><(((º>`·.¸¸.·´¯`·.¸><(((º>¸.
·´¯`·.¸. , . ><(((º>`·.¸¸.·´¯`·.¸><(((º>
|
Back to Top |
|
|
syonker Senior Member
Joined: March 06 2009 Location: United States
Online Status: Offline Posts: 212
|
Posted: April 16 2011 at 10:25 | IP Logged
|
|
|
Ok, this thing went back to blank nothing dead again, and I've been up and down the forums, through the HTML generated by Weather Underground, and over the ph_regexsnap() function description with a fine-toothed comb. I have put in two other versions of "GET WEATHER" just to see what's up, and still nothing. Now I need a second set of eyes. Here is a snap of the macro:
Any ideas what the obviously simple problem is?
Regards,
-S
__________________ "I will consider myself having succeeded when my house becomes sentient and attempts to kill me."
><(((º>`·.¸¸.·´¯`·.¸><(((º>¸.
·´¯`·.¸. , . ><(((º>`·.¸¸.·´¯`·.¸><(((º>
|
Back to Top |
|
|
syonker Senior Member
Joined: March 06 2009 Location: United States
Online Status: Offline Posts: 212
|
Posted: April 16 2011 at 10:26 | IP Logged
|
|
|
Oh...and I disabled line 70 and 80 for testing in this snap...checked or not, makes no diff.
-S
__________________ "I will consider myself having succeeded when my house becomes sentient and attempts to kill me."
><(((º>`·.¸¸.·´¯`·.¸><(((º>¸.
·´¯`·.¸. , . ><(((º>`·.¸¸.·´¯`·.¸><(((º>
|
Back to Top |
|
|
syonker Senior Member
Joined: March 06 2009 Location: United States
Online Status: Offline Posts: 212
|
Posted: April 19 2011 at 08:19 | IP Logged
|
|
|
Kind of surprised noone has chimed in on this yet...so just pinging the group again. See anything obvious wrong with my GET WEATHER macro in the screen snap above? I'm getting a "blank" in my CURTEM global variable.
-S
__________________ "I will consider myself having succeeded when my house becomes sentient and attempts to kill me."
><(((º>`·.¸¸.·´¯`·.¸><(((º>¸.
·´¯`·.¸. , . ><(((º>`·.¸¸.·´¯`·.¸><(((º>
|
Back to Top |
|
|
shazam Newbie
Joined: February 15 2011
Online Status: Offline Posts: 2
|
Posted: April 19 2011 at 21:49 | IP Logged
|
|
|
syonker,
I am very new to Powerhome, especially any macro attempt to interact with the web, so bear with me. I also get a blank value from the ph_regexsnap. While troubleshooting I took the output of the ph_geturl to the WUM site and stored it in a global variable. When I ran the macro I noticed that the complete html for the result wasn't there. It appeared to be truncated. So, thinking it was just something to do with the screen display of something that long, I wrote the geturl output out to a file like your "skipped" line. Again, this confirmed that the complete html is not there, it appears to be truncated. The "Temperature" line is not in the file. This might be me, and the noobie factor, but check it out. Is there a limit that is getting exceeded? I am using PH 2.14
Take Care,
Shazam
|
Back to Top |
|
|