Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: Basic - Beginner Questions Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
Gadgets
Senior Member
Senior Member
Avatar

Joined: January 28 2008
Location: Canada
Online Status: Offline
Posts: 178
Posted: February 05 2008 at 22:53 | IP Logged Quote Gadgets

Now I have finally gotten some things to work correctly in PH, I have some basic questions that will help me be quicker at getting things to happen.. maybe.   

These are do be assumed all devices have been added (and based on X10):

What order to things have to be done in? Like Triggers, can they directly control a device, or do they have to go through a macro?
If I want an event to be triggered by an incoming X10 signal, what are the steps to do so

Do macros have to be made for all devices so they can be controlled?

How do you connect more then one formula together? for example lets say I want these two things to happen for the same event:

ph_devicecontrol(commands here) then ph_tts(string here) can I do this sort of thing, and if so how?

ph_devicecontrol(commands here) + ph_tts(string here) is that the correct way of doing things??

__________________
Friends, don't let friends install Norton Products
Back to Top View Gadgets's Profile Search for other posts by Gadgets Visit Gadgets's Homepage
 
theowl
Groupie
Groupie
Avatar

Joined: February 24 2006
Location: United States
Online Status: Offline
Posts: 59
Posted: February 06 2008 at 00:31 | IP Logged Quote theowl

To me, the order depends on how much you want to do for the event. For example, if I want to hit a button (K2-ON) and just have a phrase spoken ("Oh NO! The BOSS is home!"), I can do all that with-in a trigger by setting it up to fire on K2-ON and setting action as a raw formula ph_tts("oh no. the boss is home.").

If I wanted to add a light-on to that, I could still do the raw formula but use + ph_device....
(So, it's + to join two things)

However, my greetings system uses a trigger and macro since it's so much more complex. First, it has to check if door1 and door2 opened within 60 seconds of each other. Which door opened first so PH can figure out the direction the person is traveling. If they are coming in, play the greeting, turn the lights on, read off any announcements.

So much to do that I had to put it in a macro that is called by the trigger.

I also have a macro to remind me to do stuff which is called from a timed event. The same macro is also called by a trigger if I enter the room where I need to do the job (ie: Take out the garbage can trigger if I walk in the kitchen AND at 10am on Monday).

Hope that helps
Back to Top View theowl's Profile Search for other posts by theowl
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: February 06 2008 at 07:20 | IP Logged Quote TonyNo

You may also want to check out an old-ish tutorial that I did.

Tutorial
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: February 06 2008 at 14:03 | IP Logged Quote dhoward

Brian,

Triggers don't have to directly call macros. They can call a raw formula or device control string as well.

Laying out your Home Automation plan takes practice and will usually change quite a bit over time. What I try to do is come up with all of the "actions" or tasks that I would like to have performed. If these tasks are more involved than just simply announcing a TTS or turning on a light (ie, multiple steps that I may like to have performed as a result of several different "triggering" actions), I will generally create a macro. I usually try to do this first, but sometimes it comes after.

Once Ive gotten my "actions" or macros fairly well defined, then I'll determine what "triggers" will cause the actions to fire. Sometimes, the trigger is a Control Center button press, in which case this is setup in the Control Center section instead of the Triggers screen. Sometimes, the action is based upon time (as the primary factor) and this is done with a timed event.

If you're working with raw formulas (and functions), then you've got it. Just add them together with a '+' sign and you're good to go. Check out the wiki "Formula" and "Variable Substitution" sections (they go hand in hand) for a little more in depth on this.

Hope this helps,

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
Gadgets
Senior Member
Senior Member
Avatar

Joined: January 28 2008
Location: Canada
Online Status: Offline
Posts: 178
Posted: February 07 2008 at 22:46 | IP Logged Quote Gadgets

dhoward wrote:
Brian,

Triggers don't have to directly call macros. They can call a raw formula or device control string as well.

Laying out your Home Automation plan takes practice and will usually change quite a bit over time. What I try to do is come up with all of the "actions" or tasks that I would like to have performed. If these tasks are more involved than just simply announcing a TTS or turning on a light (ie, multiple steps that I may like to have performed as a result of several different "triggering" actions), I will generally create a macro. I usually try to do this first, but sometimes it comes after.

Once Ive gotten my "actions" or macros fairly well defined, then I'll determine what "triggers" will cause the actions to fire. Sometimes, the trigger is a Control Center button press, in which case this is setup in the Control Center section instead of the Triggers screen. Sometimes, the action is based upon time (as the primary factor) and this is done with a timed event.

If you're working with raw formulas (and functions), then you've got it. Just add them together with a '+' sign and you're good to go. Check out the wiki "Formula" and "Variable Substitution" sections (they go hand in hand) for a little more in depth on this.

Hope this helps,

Dave.


Yes absolutely it helped. And it confirms some of what I thought, and clears up others.. thank you!


__________________
Friends, don't let friends install Norton Products
Back to Top View Gadgets's Profile Search for other posts by Gadgets Visit Gadgets's Homepage
 

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