Author |
|
MarkJames Newbie
Joined: November 10 2009 Location: Canada
Online Status: Offline Posts: 18
|
Posted: November 14 2009 at 21:14 | IP Logged
|
|
|
Hi, All,
I'm new to Powerhome - but I've been spending a lot of time with it over the last few days and am getting to appreciate it. I like it so much I didn't wait the 30 days - I bought it after 2. I've learned more about insteon from powerhome than I could ever have otherwise.
Anyways... I'm trying to use my stargate with some legacy x-10 controllers along with insteon. I'm trying to create some triggers so that when a button on an insteon kpl is pressed it turns an x-10 light on.
So... I've got my KPL and my X-10 devices in the database - I create a trigger that has an action type of device control, an action of turning on the x-10 module I want, and this is where I get a bit stuck. What are all the choices in there? Clearly I don't want direct in or direct out - those don't ask me for a group (though I'd like to know what they mean anyways). Insteon group in and Insteon group out make sense to me but I can't get either of those to have the desired result. Then the trigger can be on or fast on. I imagine on is a regular press and fast on is a double tap? I've set the ID value for 3 - which, on a kpl6 should be the top left corner of the 4 scene switches.
So what should the trigger type be? insteon group out? insteon group in? Or am I totally off track?
Once a trigger is in the database is it effective immediately or do I somehow have to refresh?
Lastly - I have yet to figger out how to write macros - that's my next task - but I imagine that's what I'll have to do if I want one insteon press to turn on, say, 3 x-10 devices?
Thanks in advance for the help. Oh.. and thanks for this software. It's a bit hard to get your head wrapped around but once you start to get it it beats houselinc hands down!
|
Back to Top |
|
|
grif091 Super User
Joined: March 26 2008 Location: United States
Online Status: Offline Posts: 1357
|
Posted: November 15 2009 at 01:49 | IP Logged
|
|
|
Insteon Group In is a good Trigger Type to start with. The trigger is fired when Powerhome sees a Group Broadcast command coming from the KPL. Group 3 is button A (upper left small button) in 6 button mode. Same small button is also Group 3 in 8 button mode. For the KPL to send any Insteon message when a button is pressed the button must be linked as a Controller to some responder which in this case is the PLM as the responder. Each button that will cause a Trigger to fire must have its own link back to the PLM. Same is true for other Insteon switches. It is good to have the Trigger invoke a Macro and use the ph_x10("HL2 PLM","D",102,0) command to issue X10 messages. To start with use three lines in the Macro, each issuing its own X10 command. You can chain PH_xxxx statements but to start with put each ph_x10 command on a separate marco line. Use the Help facility to explain the parameters for any ph_xxxxx statement.
Trigger and Macro are active after doing a Save (PF5). No Reinit necessary for Trigger or Macro definitions or changes but Save is needed after a definition or change.
Correct about number of taps and related command.
Use the Control/Powerhome Status option to display the Event Log which shows in real time the Insteon command received, the Trigger being fired and the Macro being invoked.
EDIT: missed a question. Insteon has Direct commands which control a specific device without use of links which is why no Group number, thus Direct In and Direct Out. Direct commands are generally not issued by Insteon devices other than PLCs/PLMs at the request of a software or firmware package.
Insteon Group commands are sent by Insteon devices when a paddle, button, toggle etc is pressed, motion is detected, an I/O Linc detects an Input state change, and so on. Group commands require a link(s) to identify the responder device(s). An Insteon device must have an active Controller Of link before it will send a Group command as the link record has the responder device address.
Edited by grif091 - November 15 2009 at 13:29
__________________ Lee G
|
Back to Top |
|
|
MarkJames Newbie
Joined: November 10 2009 Location: Canada
Online Status: Offline Posts: 18
|
Posted: November 15 2009 at 19:52 | IP Logged
|
|
|
Thanks for the reply,
The ph_x10 command says that n (in your case 102) is...
An integer representing the unitcode portion of the X-10 command. If you are addressing a specific unitcode, use the unitcode number. If this is a standard command, add 100 to the command. An on command is normally 2 so you would encode it as 102. ...........
OK.. So I'm trying to turn K-14 on. So my formula is ph_x10("PLMCTRL1,"K",???,0)
I don't get the unitcode portion. If my unitcode is 14 then I add 100 to it so that's 114 but the on codes is 2 so does it become 116?
And if I want to go backwards - to have an X-10 command turn on a group LED on a KPL then what's the easiest way? I've linked the KPL button I want to a group on the controller and I can use a trigger with an action of Insteon Group ON - that works fine - I was just wondering if there was a more direct approach than that - where I can write directly to the KPL group rather than having to go through the controller. I looked at a few different functions and they all ask for the ID of the controller - but none asked for the group number on that ID.
Mark
|
Back to Top |
|
|
grif091 Super User
Joined: March 26 2008 Location: United States
Online Status: Offline Posts: 1357
|
Posted: November 15 2009 at 22:15 | IP Logged
|
|
|
I could have picked a better x10 example. X10 messages consists of two parts. The first part is House/Unit code, the second part is House/Command code. To send an On command to House code K, Unit code 14 you need two ph_x10 commands.
ph_x10("HL2 PLM","K",14,0) which is House code K Unit code 14
ph_x10("HL2 PLM","K",102,0) which is House code K Command code 2 (ON)
The Macro example I posted before is the House/Command D/ON which is the second part of a two part X10 message.
Powerhome supports various types of Controllers. You have to identify which Controller by ID Powerhome should use to write the X10 messages on the powerline. A PLM can write X10 and Insteon messages. I think there are X10 only controllers (which I am not familiar with) that can write X10 only messages.
There is an Insteon Direct command that can turn On and Off a KPL button LED but I will have to research that. The preferred way is to use what Insteon device hardware uses and that is sending a Group On or Off to the specific KPL button.
You use the PLC/PLM Groups tab to define an ID that represents the Group definition.
__________________ Lee G
|
Back to Top |
|
|
MarkJames Newbie
Joined: November 10 2009 Location: Canada
Online Status: Offline Posts: 18
|
Posted: November 15 2009 at 22:33 | IP Logged
|
|
|
Ahhh - my bad...
I should have realized that I'd be sending K-14 K-ON.
I can't say I understand the next part you posted but I'm going to plod away some more before asking.
Thanks much!
Progress is coming... slow and steady. I've scrapped my Stargate schedule and am rewriting it from the ground up to support insteon. The serialinc that I'm using to interface stargate to insteon is giving me a lot of grief but this, too, shall pass.
Mark
|
Back to Top |
|
|
grif091 Super User
Joined: March 26 2008 Location: United States
Online Status: Offline Posts: 1357
|
Posted: November 15 2009 at 22:53 | IP Logged
|
|
|
Here are three ways to code an X10 message sequence. Seq 20/30 is what we covered before. Seq 40 requires that you define an X10 device and give it an ID which is the ID used in the Macro line. Seq 50/60 may be easier because you can use words rather than command numbers. I picked seq 20/30 initially because I thought it would most closely match what you were already doing with the Stargate.
__________________ Lee G
|
Back to Top |
|
|
grif091 Super User
Joined: March 26 2008 Location: United States
Online Status: Offline Posts: 1357
|
Posted: November 15 2009 at 23:34 | IP Logged
|
|
|
Take a look at ph_insteonrawgroup ( ctlr, group, cmd1, cmd2 ). This does not require the PLC/PLM Group definition. As with X10, there are generally multiple ways to do the same Insteon command in Powerhome.
__________________ Lee G
|
Back to Top |
|
|
MarkJames Newbie
Joined: November 10 2009 Location: Canada
Online Status: Offline Posts: 18
|
Posted: November 15 2009 at 23:36 | IP Logged
|
|
|
Thanks, Lee,
I'm sitting here plodding away. I can't find the screen you captured above - with the sequences. Where is that in ph?
Mark
|
Back to Top |
|
|
grif091 Super User
Joined: March 26 2008 Location: United States
Online Status: Offline Posts: 1357
|
Posted: November 15 2009 at 23:51 | IP Logged
|
|
|
The image with seq 20,30,40,50,60 is a Macro I coded with 5 lines to show more X10 examples. I just cropped the image to include only the functional lines.
Edited by grif091 - November 15 2009 at 23:55
__________________ Lee G
|
Back to Top |
|
|
MarkJames Newbie
Joined: November 10 2009 Location: Canada
Online Status: Offline Posts: 18
|
Posted: November 16 2009 at 01:45 | IP Logged
|
|
|
That worked out great, thanks.
ph_insteonrawgroup does exactly what I need. I created a macro for fireplaceled-on and another for fireplaceled-off. Then set a trigger in powerhome so when it sees the k-14 that stargate sends it sets the led appropriately.
That gave me my first taste of the macro editor too.
Your help is much appreciated!
[20 minutes later]
I realized that I didn't actually need the macro to do this. I simply put the ph_insteonrawgroup(KPL-LIVINGROOM,3,ion,0) as a raw formula in a trigger based on K-14 ON being received. Works like a charm - and the lag between the remote control button press and the light changing is under a second - quite acceptable.
All the same - I'm glad to have found the macro editor. It opens up a lot of possibility.
mark
Edited by MarkJames - November 16 2009 at 02:00
|
Back to Top |
|
|
grif091 Super User
Joined: March 26 2008 Location: United States
Online Status: Offline Posts: 1357
|
Posted: November 16 2009 at 05:00 | IP Logged
|
|
|
There can be some issues trying to execute Insteon commands directly from the Boolean field of a trigger. They are written up in the bug report topic. Dave, author of PH, concluded that what that user was trying to do could not be done from the Boolean field. Glad this combination works.
As you have seen in the X10 examples and with Insteon Group commands, there are multiple ways to accomplish the same task in Powerhome. The Macro experience will not be lost. It is a very powerful function in PH.
__________________ Lee G
|
Back to Top |
|
|