Author |
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: October 25 2008 at 10:49 | IP Logged
|
|
|
This may be a dumb question, but you are in SQL mode within the Multi-Editor? And you are doing an Execute Script?
__________________ Pete - X10 Oldie
|
Back to Top |
|
|
ibscas Groupie
Joined: October 18 2008 Location: United States
Online Status: Offline Posts: 46
|
Posted: October 26 2008 at 16:49 | IP Logged
|
|
|
I am, but it's not a big deal, I think I've decided to write my own entire web interface, so no biggie :)
|
Back to Top |
|
|
ibscas Groupie
Joined: October 18 2008 Location: United States
Online Status: Offline Posts: 46
|
Posted: October 26 2008 at 17:16 | IP Logged
|
|
|
TonyNo wrote:
Did you create all of the Globals before running the SQL?
CURTEMP, CURWINDCHILL, CURHUMIDITY, and CURFORECAST |
|
|
I sure did.
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: October 26 2008 at 18:28 | IP Logged
|
|
|
Which version of PH are you running?
|
Back to Top |
|
|
ibscas Groupie
Joined: October 18 2008 Location: United States
Online Status: Offline Posts: 46
|
Posted: October 27 2008 at 11:03 | IP Logged
|
|
|
TonyNo wrote:
Which version of PH are you running? |
|
|
Version 2.
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: October 27 2008 at 14:03 | IP Logged
|
|
|
Darn. I'll try importing it tonight to see if anything similar happens.
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: October 27 2008 at 14:17 | IP Logged
|
|
|
Tony, I deleted my old Getweather and downloaded it again and loaded it in with no problem all the way to execution on my V2 test system.
__________________ Pete - X10 Oldie
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: October 27 2008 at 14:24 | IP Logged
|
|
|
Got it. Make sure you are in Script Editor(SQL) NOT Script Editor(PH Formula). Shift F5.
__________________ Pete - X10 Oldie
|
Back to Top |
|
|
demko Newbie
Joined: January 08 2009
Online Status: Offline Posts: 15
|
Posted: January 14 2009 at 22:48 | IP Logged
|
|
|
hmmmm... everything's working except for that the windchill isn't getting set for me. when I look at the website it is there though. http://mobile.wunderground.com/cgi-bin/findweather/getForeca st?brand=mobile&query=15227
any ideas?
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: January 15 2009 at 07:56 | IP Logged
|
|
|
Does your windchill line look like this?
ph_regexdiff(">Windchill</td>~255<b>","</b >","LOCAL1]",1,0)
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: January 15 2009 at 08:41 | IP Logged
|
|
|
If you find a colon : after windchill in the statement that Tony is referring to then you will have to remove it in the proceeding Jump statement also.
__________________ Pete - X10 Oldie
|
Back to Top |
|
|
veropierre Groupie
Joined: May 06 2009 Location: United States
Online Status: Offline Posts: 47
|
Posted: May 24 2009 at 10:00 | IP Logged
|
|
|
Great script!
I'm trying to get wind speed and all my temptatives came with a nice "!"... I wish to use that variable to delay my watering.
Any thoughts?
Thank you
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: May 24 2009 at 11:57 | IP Logged
|
|
|
Are you using the version that you downloaded as a sql file?
|
Back to Top |
|
|
veropierre Groupie
Joined: May 06 2009 Location: United States
Online Status: Offline Posts: 47
|
Posted: May 24 2009 at 12:44 | IP Logged
|
|
|
TonyNo wrote:
Are you using the version that you downloaded as a sql file? |
|
|
Yes and it works well, I'm trying to add wind... without much success :)
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: May 24 2009 at 17:10 | IP Logged
|
|
|
Right now, the wind line is, "ESE at 7.0 mph / 11.3 km/h". For just the speed, try a regexdiff with...
'<td>Wind~255<span class="nowrap"><b>', '</b>'
Edited by TonyNo - May 24 2009 at 17:11
|
Back to Top |
|
|
veropierre Groupie
Joined: May 06 2009 Location: United States
Online Status: Offline Posts: 47
|
Posted: May 26 2009 at 09:35 | IP Logged
|
|
|
I tried that but it doesn't work.
I can't find regexdiff coorect syntax, can you help?
Thank you
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: May 26 2009 at 11:40 | IP Logged
|
|
|
The formula would look like the other ones in the macro. Like this...
ph_regexdiff(
'<td>Wind~255<span class="nowrap"><b>', '</b>', "[LOCAL1]", 1, 0)
Edited by TonyNo - May 26 2009 at 11:45
|
Back to Top |
|
|
veropierre Groupie
Joined: May 06 2009 Location: United States
Online Status: Offline Posts: 47
|
Posted: May 27 2009 at 09:11 | IP Logged
|
|
|
Thank you Tony, I got it... and it works.
I was also able to get 24hours rain from the http://www.crh.noaa.gov/product.php?site=MPX&product=RTP&iss uedby=MPX page and the weather condition (Rain, overcast...) I will be able using conditions not to run the sprinklers if it's raining, too much wind or if we got more than 1" of rain in the last 7 days.
For the rain value, I get the value but followed by a 'square', I looked at the page and it's a < br >. I can't figure out how to remove it and then make that variable a number and not a text string...
Any idea?
Edited by veropierre - May 27 2009 at 09:16
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: May 27 2009 at 09:35 | IP Logged
|
|
|
What I do for that is this...
ph_replaceall( "[LOCALx]", "~r~n", "" )
To get a number from a string, use this function...
number( string )
|
Back to Top |
|
|
veropierre Groupie
Joined: May 06 2009 Location: United States
Online Status: Offline Posts: 47
|
Posted: May 27 2009 at 10:33 | IP Logged
|
|
|
Tony,
I tried these ones: ph_replaceall( "[LOCALx]", "~r~n", "" ), I even tried ph_replaceall( "[LOCALx]", "~n", "" ) and ph_replaceall( "[LOCALx]", "~r", "" ) just in case but in all 3 cases the [LOCALx] returned empty...
For yesterday, I got 0.00"square" or "" I gave up when my eyes couldn't stay open.
|
Back to Top |
|
|