Author |
|
smarty Super User
Joined: May 21 2006 Location: United States
Online Status: Offline Posts: 728
|
Posted: October 27 2008 at 15:02 | IP Logged
|
|
|
Possible bug or user error:
When I use the "ph_setglobal_s" or "ph_setglobal_a" in a formula line of a PH macro, the global variable that I am trying to set does not get set.
My global variable {pick your name} has already been defined in the GV list. When this line of the macro fires, the event log says something like:
__________________ Elk - Insteon - BlueIris - DMC1 - PowerHome - XLobby - HA_Bridge w/Dots - Brultech
|
Back to Top |
|
|
smarty Super User
Joined: May 21 2006 Location: United States
Online Status: Offline Posts: 728
|
Posted: December 15 2008 at 15:12 | IP Logged
|
|
|
Any thoughts from anyone on this issue yet?
My code looks something like:
ph_setglobal_s("{ELK ARM STATUS}","[TEMP5]")
-The formula verifies to a "1" value (so the formula seems ok).
-{ELK ARM STATUS} has been pre-defined in my GV list.
-My event log is similiar to my earlier post; where the GV name {ELK ARM STATUS} does NOT show up in the event log.
user error???
__________________ Elk - Insteon - BlueIris - DMC1 - PowerHome - XLobby - HA_Bridge w/Dots - Brultech
|
Back to Top |
|
|
nadler Super User
Joined: February 25 2006 Location: United States
Online Status: Offline Posts: 354
|
Posted: December 15 2008 at 15:22 | IP Logged
|
|
|
Try this and see if it works - just a thought:
ph_setglobal_s("ELK ARM STATUS",ph_getvar_s(2,5))
|
Back to Top |
|
|
smarty Super User
Joined: May 21 2006 Location: United States
Online Status: Offline Posts: 728
|
Posted: December 15 2008 at 21:17 | IP Logged
|
|
|
OK, it was a USER ERROR. The {} brackets around the GV where causing the problem.
Thanks NAdler!
__________________ Elk - Insteon - BlueIris - DMC1 - PowerHome - XLobby - HA_Bridge w/Dots - Brultech
|
Back to Top |
|
|