| Author |  | 
      
        | syonker Senior Member
 
  
  
 Joined: March 06 2009
 Location: United States
 Online Status: Offline
 Posts: 212
 | 
          Hi Dave,
           | Posted: April 19 2015 at 09:27 | IP Logged |   |  
           | 
 |  
 For the record I had the same problem and needed to change all of my
 calls from "ph_geturl1('HTTPS://<url>',1,20)" to
 "ph_getitcurl('HTTPS://<url>',20)" as well.
 
 The information below is meant to help with debugging if you find it
 useful...
 
 I tried using "ph_geturl1('HTTPS://<url>',3,20) as Skip mentioned above
 and while behavior improved, PowerHome still froze up every time one
 of these lines executed and stayed hung until the next TIMED EVENT
 kicked off (I have a one-minute zone check that clued me in on this
 peculiarity).
 
 In addition, I am setup with the "best practice" of trimming the event log
 database regularly to keep it from continually growing and consuming
 hard drive space by running "ph_trimeventlog(2)".  However, because I
 had an enormous database before converting to PowerHome version
 2.1.5c (as you may remember from another post), just as due diligence
 I went to the database directory and checked the file size.  While the
 pwrhome database was small and happy, the phlogs database was
 1.6GB.  When I installed v2.1.5c, I renamed the PowerHome directory
 for 2.1.4 entirely and did a fresh install.  Then I copied a backup of my
 last *good* database into the databases directory and ran the upgrade
 tool.  That database was the *only* file I copied, so the enormous
 phlogs database *had* to have been written within the past two days (I
 installed 2.1.5c more than two days ago).  The only thing I can figure is
 that possibly the "hang up" is some sort of infinite loop or recursion that
 gets invoked and is writing out log entries until some sort of interrupt
 from a timed or posted event occurs?
 
 If this is useful, great...if not, kindly disregard it.
 
 I LOVE the responsiveness of 2.1.5c...it seems *much* quicker...or is it
 just me enjoying the "shiny new toy"...?
 
 -S
 
 Edited by syonker - April 19 2015 at 09:29
 
 __________________
 "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
 | 
          Hi Dave!
           | Posted: April 21 2015 at 11:20 | IP Logged |   |  
           | 
 |  
 Ok, I have some more information on this and how I
 have a temporary workaround in place to avert it - at
 least I *hope_ I don't see it again.
   
 Hopefully this is useful information for you...
 
 Ok, I noticed that inputs to PowerHome via PHCA
 (Skip's Uber Android Control App) wasn't working, so I
 looked at my (dedicated Win7) PowerHome ESXi VM.  I
 usuallyt leave the "PowerHome Status" page up, which
 it was.  I was surprised to find it posting the
 following line...
 
 
   
 ...in rapid succession at the bottom of the page (I
 could see the flickering of the posts, and the
 continual counting of the timestamp by second rolling
 by - probably 30-50 a second or so).
 
 The only place this gets set is in a macro I have
 called "GET_WEATHER_VIA_API" which uses the Weather
 Underground API (it's great by the way) to return data
 from a nearby digital weather station.  Within the
 context of the "CURFORECAST" global variable, the API
 intermittently provides a forecast, but not always.
 The idea in the macro is to provide the current
 condition as the "CURFORECAST" if there is nothing in
 the string about the *actual* forecast, so it gets the
 current condition and saves it to "CURCONDITION" and
 then in the next line copies it over to "CURFORECAST"
 so it's pre-populated if there is no "nowcast" field
 found in the API return later in the macro.  Below is
 the entire macro with the two offending lines
 highlighted for quick reference...
 
 
   
 You may note that the line that copies CURCONDITION to
 CURFORECAST is actually "Skipped" in this particular
 macro.  For whatever reason, *that* is the change that
 has averted the infinite looping/recursion, or
 *whatever* it was causing the hang-up on setting the
 global variable.
 
 I subsequently checked the "phlogs.db" file and found
 it to be enormous again (even though I *cleared* it
 manually within the last two days, and with the
 regular 2:00am trimming that occurs for data more than
 2 days out).  If it is of any value to you, I dropped
 it out there as well and you can download it from
 here:
 http://
 www.yjprod.com/image/HAI/phlogs.db
 
 If this is something *I* am doing wrong (which turns
 out to be about 97.34% of the time these days - just
 ask my wife
  ), please puh-leeze tell me what that is?
 
 Thanks,
 
 
 -S
 
 Edited by syonker - April 21 2015 at 11:30
 
 __________________
 "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
 | 
          Nope...I was wrong.  Now it is hung up on the same thing but with the
           | Posted: April 21 2015 at 20:32 | IP Logged |   |  
           | 
 |  CURFORECAST line in its place...must be something with the long
 string returned from the Ali and/or parsing it?  Not sure...gonna keep
 playing around.
 
 -S
 
 __________________
 "I will consider myself having succeeded when my house becomes sentient and attempts to kill me."
 
 ><(((º>`·.¸¸.·´¯`·.¸><(((º>¸.
 
 ·´¯`·.¸. , . ><(((º>`·.¸¸.·´¯`·.¸><(((º>
 | 
       
        | Back to Top |       | 
       
       
        |  | 
        | dhoward Admin Group
 
  
  
 Joined: June 29 2001
 Location: United States
 Online Status: Offline
 Posts: 4447
 | 
          Steve,
           | Posted: April 22 2015 at 07:18 | IP Logged |   |  
           | 
 |  
 Keep me posted on your testing. Im currently in South Korea for a couple of months so forgive any delay in checking in.
 
 I have identified the problem with the ph_geturl1 function and have already worked out a fix that will be available in the next release. There was a change in the Catalyst control that is less than happy with some of my code that is causing the issue.
 
 Concerning various hangs and processing issues...make sure you download and unzip the PH "Fix" file (available in the 2.1.5c thread). I believe its at fix 5. It just unzips and overwrites existing files and it will still show the version as 2.1.5c but it has a number of fixes that corrects some errors with code hanging and causing problems similar to what you describe.
 
 Hope this helps,
 
 Dave.
 
 | 
       
        | Back to Top |       | 
       
       
        |  | 
        | syonker Senior Member
 
  
  
 Joined: March 06 2009
 Location: United States
 Online Status: Offline
 Posts: 212
 | 
          Hiya Dave,
           | Posted: April 24 2015 at 07:48 | IP Logged |   |  
           | 
 |  
 South Korea - how cool!  I know it's not a comparison of
 any kind to modern South Korea, but by odd coincidence my
 wife and I have been re-watching M*A*S*H since it came on
 Netflix recently.
  Anyway, hoping it is a great experience.
 
 Ok, back on topic...yeah, I put in Fix5, and for whatever
 reason it still does get this weird "recycle" of the
 "Global Variable CURFORECAST changed from to"
 loop/interrupt (I say interrupt because the timestamp
 keeps incrementing, and occasionally, something else flys
 by, so it looks like it's just mashing the execution
 queue with this command or something and getting way
 behind in the process).
 
 As I said before, I'm sure it's something I might be
 doing wrong (possibly a misused command with respect to
 2.1.5c or something), but not sure exactly what; however,
 it's not a *critical* problem.  I just shutdown the
 weather query for a while - it will become more important
 once irrigation season begins.   I plan to play with and
 tweak it out in the mean time to see if I can find any
 workarounds that allow me to run with it turned on.  I
 will also see if I can get a smaller log file
 demonstrating the error that is easier to download.
   
 -Spencer
 
 Edited by syonker - April 24 2015 at 07:51
 
 __________________
 "I will consider myself having succeeded when my house becomes sentient and attempts to kill me."
 
 ><(((º>`·.¸¸.·´¯`·.¸><(((º>¸.
 
 ·´¯`·.¸. , . ><(((º>`·.¸¸.·´¯`·.¸><(((º>
 | 
       
        | Back to Top |       | 
       
       
        |  | 
        | dhoward Admin Group
 
  
  
 Joined: June 29 2001
 Location: United States
 Online Status: Offline
 Posts: 4447
 | 
          Spencer,
           | Posted: April 26 2015 at 06:20 | IP Logged |   |  
           | 
 |  
 Very odd. Looking at the macro, I don't really see
 anything wrong right off hand. I would probably use
 the ph_getglobal function instead of variable
 substitution but don't see anything out of place. The
 one thing I would check is if you've got global
 variable change triggers on the CURFORECAST and
 CURCONDITION globals.
 
 If you can get it to a state where you can reliably
 reproduce it, you can zip and email me your database
 and I can then trace what may be going on.
 
 Let me know,
 
 Dave.
 
 | 
       
        | Back to Top |       | 
       
       
        |  | 
        | npavkov Groupie
 
  
 
 Joined: February 29 2004
 Location: United States
 Online Status: Offline
 Posts: 91
 | 
          what do you mean by
           | Posted: August 03 2015 at 13:48 | IP Logged |   |  
           | 
 |  (side note)
 Also after upgrade make sure you have all the global
 variable copied and working, I had a problem with variable
 which had data length of more than 255 character.
 
 
 I am having the issue with the var lengths also. How do you copy the vars over?
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | npavkov Groupie
 
  
 
 Joined: February 29 2004
 Location: United States
 Online Status: Offline
 Posts: 91
 | 
          I have been trying to rebuild my ph system and have been unable to get a valid weather macro to run correctly, without execution queue problems, AFTER I upgraded to 215c. Are there still issues with 215c execution queque and variable processing??
           | Posted: August 04 2015 at 09:44 | IP Logged |   |  
           | 
 |  Any ideas guys??
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | syonker Senior Member
 
  
  
 Joined: March 06 2009
 Location: United States
 Online Status: Offline
 Posts: 212
 | 
          Npavkov,
           | Posted: August 07 2015 at 06:55 | IP Logged |   |  
           | 
 |  
 Just wondering if your problem with the weather script is the same as
 mine...?  I still have mine overridden because summer is pretty easy
 (fans on, cooling cycle, water lawn, etc.). It when it starts to get
 transitional this autumn it will be valuable to have it working again.
 When I get time I wanted to work on figuring out what's going on. If
 you do indeed have the same issue we might ping Dave to see if he
 ever got a chance to look at the logs and goodies I sent him a while
 back to play with while we explore workarounds.
 
 Edited by syonker - August 07 2015 at 06:56
 
 __________________
 "I will consider myself having succeeded when my house becomes sentient and attempts to kill me."
 
 ><(((º>`·.¸¸.·´¯`·.¸><(((º>¸.
 
 ·´¯`·.¸. , . ><(((º>`·.¸¸.·´¯`·.¸><(((º>
 | 
       
        | Back to Top |       | 
       
       
        |  | 
        | dhoward Admin Group
 
  
  
 Joined: June 29 2001
 Location: United States
 Online Status: Offline
 Posts: 4447
 | 
          Nick,
           | Posted: August 12 2015 at 19:27 | IP Logged |   |  
           | 
 |  
 It may be a problem with the ph_geturl1 vs
 ph_getitcurl function. The ph_geturl1 function
 currently has some issues. Consequently, Im hoping to
 release ph215c fix6 soon to resolve it (along with
 some others).
 
 Another thing you may want to look into is the
 PowerHome URL Scraper plugin. Its default setup (as
 well as a couple of forum posts detailing it) for
 weather scraping. The great thing about the plugin is
 that it runs in a separate thread so won't load down
 your PowerHome processing when the weather macro is
 processed.
 
 Dave.
 
 | 
       
        | Back to Top |       | 
       
       
        |  | 
        | gg102 Senior Member
 
  
 
 Joined: January 29 2013
 Location: United States
 Online Status: Offline
 Posts: 246
 | 
          Dave,
           | Posted: August 12 2015 at 19:47 | IP Logged |   |  
           | 
 |  
 It's good to have all the new updates, but PLEASE update the rev a number, and not a x.x.x fix 6.
 
 I have several versions of 2.1.5x and it's very confusing.
 
 Please make it at least 2.16.
 
 Just my input....
 
 
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | BeachBum Super User
 
  
  
 Joined: April 11 2007
 Location: United States
 Online Status: Offline
 Posts: 1880
 | 
          OK I was going to stay out of this but I am running 2.1.5c and get_weather with no problems as described here. I am different as I use ph_geturl(  "mobile.wunderground.com/cgi-bin/findweather/getForecast?bra nd=mobile&query=32561") to get the weather. My 2 cents worth.
           | Posted: August 12 2015 at 20:23 | IP Logged |   |  
           | 
 |  
 __________________
 Pete - X10 Oldie
 | 
       
        | Back to Top |     | 
       
       
        |  |