Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Bug Reports
 PowerHome Messageboard : PowerHome Bug Reports
Subject Topic: ph_setglobal_s Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
smarty
Super User
Super User
Avatar

Joined: May 21 2006
Location: United States
Online Status: Offline
Posts: 728
Posted: October 27 2008 at 15:02 | IP Logged Quote smarty

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

Joined: May 21 2006
Location: United States
Online Status: Offline
Posts: 728
Posted: December 15 2008 at 15:12 | IP Logged Quote smarty

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


Joined: February 25 2006
Location: United States
Online Status: Offline
Posts: 354
Posted: December 15 2008 at 15:22 | IP Logged Quote nadler

Try this and see if it works - just a thought:

ph_setglobal_s("ELK ARM STATUS",ph_getvar_s(2,5))


Back to Top View nadler's Profile Search for other posts by nadler
 
smarty
Super User
Super User
Avatar

Joined: May 21 2006
Location: United States
Online Status: Offline
Posts: 728
Posted: December 15 2008 at 21:17 | IP Logged Quote smarty

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

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  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