Author |
|
fasttimes Groupie
Joined: March 12 2006
Online Status: Offline Posts: 63
|
Posted: March 19 2006 at 19:21 | IP Logged
|
|
|
What is the difference between the PLC and the Insteon controller you define under setup?
When you setup a "Insteon DM" controller in setup, you give it an ID. eg ABC
My Powerlinc control has an ID of POWERLINC1. (It was "discovered" for me.
This is confusing because I often only see "ABC" as an option for conrollers, but my PLC is named something else? Do I need to give the PLC the same ID as the "Insteon DM Controller"?
If I want to use a formula to send a command to a group on the PLC, which format do I use?
ph_insteonrawgroup("ABC",1,ion,0)
or
ph_insteonrawgroup("POWERLINC1",1,ion,0).
BTW, what is the purpose of cmd2 in ph_insteonrawgroup? I read the help, but it made little sense.
Edited by fasttimes
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: March 20 2006 at 01:50 | IP Logged
|
|
|
Fasttimes,
Good questions.
Each controller has a unique ID. This is defined under the Controllers section under Setup in the PowerHome Explorer. This corresponds to your "ABC" in your example above.
Every Insteon Device also has a unique ID. This includes the PLC. This is different from the Insteon Controller (the controller actually talks to the SDM which in turn talks to the PLC. From PowerHome's point of view, it just communicates to the SDM) and does not need to be the same as your Insteon controller ID.
When you define an Insteon Device, you also tell it what controller communicates to it. This will be the Insteon Controller ID and not the PLC ID.
You typically have two types of commands...the normal commands and the raw commands. The normal command will look up the controller ID defined to the device. The raw command expects you to supply the ID of the controller.
Sooo, in your example above, the proper syntax would be ph_insteonrawgroup("ABC,1,ion,0).
Currently CMD2 is unused in the ph_insteonrawgroup function. It's only provided if SmartHome makes use of it in a later revision of the protocol.
In the alpha Insteon version of PowerHome, the PLC did not exist in the Insteon devices table. It was later added in order to make the SQL joins to the various tables easier.
Dave.
|
Back to Top |
|
|
|
|