Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Macros, Scripts, and Formulas Repository
 PowerHome Messageboard : PowerHome Macros, Scripts, and Formulas Repository
Subject Topic: GetWeather Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: October 25 2008 at 10:49 | IP Logged Quote BeachBum

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 View BeachBum's Profile Search for other posts by BeachBum
 
ibscas
Groupie
Groupie


Joined: October 18 2008
Location: United States
Online Status: Offline
Posts: 46
Posted: October 26 2008 at 16:49 | IP Logged Quote ibscas

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 View ibscas's Profile Search for other posts by ibscas
 
ibscas
Groupie
Groupie


Joined: October 18 2008
Location: United States
Online Status: Offline
Posts: 46
Posted: October 26 2008 at 17:16 | IP Logged Quote ibscas

TonyNo wrote:
Did you create all of the Globals before running the SQL?

CURTEMP, CURWINDCHILL, CURHUMIDITY, and CURFORECAST


I sure did.
Back to Top View ibscas's Profile Search for other posts by ibscas
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: October 26 2008 at 18:28 | IP Logged Quote TonyNo

Which version of PH are you running?
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
ibscas
Groupie
Groupie


Joined: October 18 2008
Location: United States
Online Status: Offline
Posts: 46
Posted: October 27 2008 at 11:03 | IP Logged Quote ibscas

TonyNo wrote:
Which version of PH are you running?


Version 2.
Back to Top View ibscas's Profile Search for other posts by ibscas
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: October 27 2008 at 14:03 | IP Logged Quote TonyNo

Darn. I'll try importing it tonight to see if anything similar happens.
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: October 27 2008 at 14:17 | IP Logged Quote BeachBum

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 View BeachBum's Profile Search for other posts by BeachBum
 
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: October 27 2008 at 14:24 | IP Logged Quote BeachBum

Got it. Make sure you are in Script Editor(SQL) NOT Script Editor(PH Formula). Shift F5.

__________________
Pete - X10 Oldie
Back to Top View BeachBum's Profile Search for other posts by BeachBum
 
demko
Newbie
Newbie


Joined: January 08 2009
Online Status: Offline
Posts: 15
Posted: January 14 2009 at 22:48 | IP Logged Quote demko

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 View demko's Profile Search for other posts by demko
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: January 15 2009 at 07:56 | IP Logged Quote TonyNo

Does your windchill line look like this?

ph_regexdiff(">Windchill</td>~255<b>","</b >","LOCAL1]",1,0)
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: January 15 2009 at 08:41 | IP Logged Quote BeachBum

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 View BeachBum's Profile Search for other posts by BeachBum
 
veropierre
Groupie
Groupie
Avatar

Joined: May 06 2009
Location: United States
Online Status: Offline
Posts: 47
Posted: May 24 2009 at 10:00 | IP Logged Quote veropierre

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 View veropierre's Profile Search for other posts by veropierre Visit veropierre's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: May 24 2009 at 11:57 | IP Logged Quote TonyNo

Are you using the version that you downloaded as a sql file?
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
veropierre
Groupie
Groupie
Avatar

Joined: May 06 2009
Location: United States
Online Status: Offline
Posts: 47
Posted: May 24 2009 at 12:44 | IP Logged Quote veropierre

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 View veropierre's Profile Search for other posts by veropierre Visit veropierre's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: May 24 2009 at 17:10 | IP Logged Quote TonyNo

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 View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
veropierre
Groupie
Groupie
Avatar

Joined: May 06 2009
Location: United States
Online Status: Offline
Posts: 47
Posted: May 26 2009 at 09:35 | IP Logged Quote veropierre

I tried that but it doesn't work.

I can't find regexdiff coorect syntax, can you help?

Thank you


Back to Top View veropierre's Profile Search for other posts by veropierre Visit veropierre's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: May 26 2009 at 11:40 | IP Logged Quote TonyNo

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 View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
veropierre
Groupie
Groupie
Avatar

Joined: May 06 2009
Location: United States
Online Status: Offline
Posts: 47
Posted: May 27 2009 at 09:11 | IP Logged Quote veropierre

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 View veropierre's Profile Search for other posts by veropierre Visit veropierre's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: May 27 2009 at 09:35 | IP Logged Quote TonyNo

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 View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
veropierre
Groupie
Groupie
Avatar

Joined: May 06 2009
Location: United States
Online Status: Offline
Posts: 47
Posted: May 27 2009 at 10:33 | IP Logged Quote veropierre

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 View veropierre's Profile Search for other posts by veropierre Visit veropierre's Homepage
 

<< Prev Page of 3 Next >>
  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