Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: Multiple Functions from Trigger Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
hotcoffee76
Newbie
Newbie


Joined: December 04 2009
Location: Canada
Online Status: Offline
Posts: 12
Posted: August 29 2010 at 10:52 | IP Logged Quote hotcoffee76

Hi,

I am just getting started with PH (finally). I have 6 x-10 light switches and would like to turn all of them on from a single trigger event. Doing this for one was easy.

What is the best way to handle all 6? Can the ph formulas handle this, or do I need to write a script?

Thanks.
Back to Top View hotcoffee76's Profile Search for other posts by hotcoffee76
 
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: August 29 2010 at 11:00 | IP Logged Quote BeachBum

Just create a macro that turns each on and call that macro from whatever trigger you create. Or you could use formulas in the trigger that would turn on each. There are no groups in X-10.

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


Joined: December 04 2009
Location: Canada
Online Status: Offline
Posts: 12
Posted: August 29 2010 at 19:16 | IP Logged Quote hotcoffee76

How would the formula look to do more than one ph_xxx function call?

On the subject of macros, I tried using the script runner to write a javascript function to make 6 calls to ph_x10btn for the 6 devices, with some delay in between, and i could not get it to run. I know javascript, and vb script, but am not clear on how to apply this into an executable script within powerhome. Can someone please point me in the right direction for this?

Thanks!
Back to Top View hotcoffee76's Profile Search for other posts by hotcoffee76
 
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: August 29 2010 at 19:55 | IP Logged Quote BeachBum

Everything I do with PH is done from within so I can’t help you on script. But again what I would do is create a macro that does X10 ons for the devices I want on. If you were doing it from the trigger itself then you would do multiple PH_X10BTN using a plus sign between them followed by a plus 1.

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


Joined: December 04 2009
Location: Canada
Online Status: Offline
Posts: 12
Posted: August 29 2010 at 22:03 | IP Logged Quote hotcoffee76

Thanks. It was easy to get this to work with the macros.

In your description of the single formula approach, "you would do multiple PH_X10BTN using a plus sign between them followed by a plus 1.", what is the +1 for, and is it needed between each command?

Thanks for taking the time for all of these questions.
Back to Top View hotcoffee76's Profile Search for other posts by hotcoffee76
 
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: August 29 2010 at 23:12 | IP Logged Quote BeachBum

In the Boolean field of a trigger 1 would satisfy it and 0 will not. Without the 1 it will default to 0. It should be the final in the string.

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

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