Author |
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: March 23 2006 at 16:55 | IP Logged
|
|
|
Carl,
Quote:
BUT, when I want to creat a macro from within PH, and I choose Insteon Raw Group, the only choice is the PLC. |
|
|
Thats what Im trying to illustrate. A device can ONLY control it's groups. Since the PLC is the only device hooked up to the PowerHome computer, the Insteon Raw Group command can only control the PLC groups.
Even though PowerHome is aware of all the groups in all devices, then Insteon protocol does not allow this to take place. This is an Insteon limitation and not a PowerHome limitation .
It may help to understand if I explain the protocol a little. Basically every command contains the address of the issuer. The PLC cannot "spoof" another devices address either (if it could, then you could do what you want, but again, this is an Insteon limitation). So if we were to send a command to turn on group 5 from the PLC (say, address 01.02.03), the command would look like:
01 02 03 00 00 05 CF 11 00
A standard length Insteon message is only 9 bytes, no more, no less. The first three bytes are the address of the sending device, in this case the PLC. The next three bytes are either the address of the receiving device in the case of direct commands or a group number in the case of group broadcast commands. In the example above, we can see that it's 00 00 05. The next byte is the flags byte that determines the type of message and the number of hops. The next byte (11) is the actual command to send to the group. The last byte is for additional data which is not used in a group broadcast command.
So you can see, since the PLC MUST send the message with it's address, there is no way for another device to receive that message and perform a different groups action. A receiving device will see that this is a group broadcast message, will look at the senders address (01.02.03) and the group number (5), and then start searching through it's link database starting at the top and moving down until it either finds a match for 01.02.03,5 or hits the end of the link database. If it finds a match, it looks at the actual command and in the case of On (11) goes to the link records level using the link records ramprate.
The big limiter here is that the PLC is NOT capable of spoofing another devices address which is what would be needed to control another devices groups.
Now what I have requested of SmartHome, is several new Insteon commands (255 total, probably only about 20 in current use so a lot left over) that would allow the PLC (or another device) to trigger another device to send a group command. This would still work within the boundaries and limitations of the Insteon protocol. My idea would be to have a new "Group On", "Group Off", "Group FastOn", and "Group FastOff" commands (you could implement more if needed). This basic set would only require allocating four more additional commands out the 255 total. If we were to just randomly choose some command numbers for the above such as B1, B2, B3, and B4, then a "triggered group" FASTON command for a KPL with address 0A.0B.0C using group 5 would look like:
01 02 03 0A 0B 0C 0F B3 05
Plenty of room in the standard Insteon message structure to handle this. The first 3 bytes are the address of the PLC, the next 3 the address of the KPL, the flag, the command (our fictional B3 = Group FastOn) and the KPL group number to trigger (5). This is a direct command and when the KPL saw it, it would know to send a FASTON group 5 command.
Anyways, to sum it up, PowerHome can only control the PLC groups (Insteon limitation, not PowerHome) and it would be nice if SmartLabs could extend the protocol so that we could do this type of thing.
To answer you last question...to clone KPL button 1 to the PLC. Open the PowerHome Explorer and navigate to Devices->Insteon->Groups->By Controller. Right-click and select "Create/Edit/Clone". Select the PLC as the Group Master and whatever PLC group number you want to assign (1 to 254). In the "Clone from Master" field, select the ID of the KPL. Choose "1" for the "Clone from Group". You'll be asked if you want to "Include the Clone Master as a Responder in the new group". Since this is button 1 (the main KPL load), I would say "Yes". This will copy all of the existing responders for the KPL into a new group for the PLC. If you included the Clone Master as a responder, the only thing you'll need to do is touchup the level and ramprate for the clone master (the other responders would have been copied with their existing ramprate and level). Press the "Save Group" button and thats it. It'll take a couple of minutes and you should have a new PLC group.
HTH,
Dave.
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: March 23 2006 at 17:03 | IP Logged
|
|
|
Mike,
You said it better than me . I started typing my message two hours ago and kept getting interupted before I could finish it. Anyways, I appreciate you getting the message across.
Carl,
All is working the way it needs to. When sending a "Group" command, you don't need parameters (such as the level) for an "On" command. Group commands use the level and ramprate for each device that was programmed for the group so the "Sendkeys/TTS/Formula" field doesnt need to be available.
HTH,
Dave.
|
Back to Top |
|
|
QuickCarl Groupie
Joined: February 13 2006 Location: United States
Online Status: Offline Posts: 60
|
Posted: March 23 2006 at 17:21 | IP Logged
|
|
|
Dave, I know that I am looking really dense now, and I'm sorry for making you spend so much time on me. I understand what you are saying [I think] but if I want to send a command to a group of lights that are linked together, that have been linked to my KPL button 2 for instance...
I have cloned that group to PLC group 3 (for argument's sake) how do I send any commands from the macro that will turn it on to a level that is say 33% of on.
Since I have params in the 'insteon' command for individual lights, I can send a 17,85 and be all set in terms of turning a light on to 33%... the advantage of havaing groups I would think is that it makes communicating the same thing a a LOT of lights much easier... link 80 lights to a KPL button 2 and press one button till it reaches 33%, viola!... Now can I not just clone that group and send a command to turn the group (cloned into the PCL) to 33%?
Edited by QuickCarl - March 23 2006 at 17:24
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: March 23 2006 at 20:37 | IP Logged
|
|
|
Group commands do not support a "level" as part of the command because groups are created with each light having a specific level and ramprate. Each and every "Group Controller/Group Number" is a unique specific entity.
So if you have a KPL with 3 lights linked to button 2, they may look like this:
0A.0B.01 75% level 27 ramprate
0A.0B.02 100% level 31 ramprate
0A.0B.03 55% level 29 ramprate
When you press the KPL (0A.0B.0C) button 2, it will send the following command:
0A 0B 0C 00 00 02 CF 11 00
which is a group broadcast to group 2. When device 0A.0B.01 receives this command, it will go to 75% level at a 27 ramprate. At the same time 0A.0B.02 will go to 100% level at a 31 ramprate and 0A.0B.03 will go to 55% at ramprate 29. This cannot be changed (you cant send a "different" command to make the group all come on at a different level).
Now you can dim or brighten a group or start a manual change and stop a manual change but when you just turn the group "On", the predefined levels are what the group goes to.
If you "clone" the group where the PLC is the controller, you are essentially creating a whole new set of records in each responder device with all the same values except for the "from" address which will now be the PLC. So when you send an "on" command from the PLC, the group will only go to the preprogrammed levels that were assigned when the group was created.
In your sample above where you say you press the KPL button 2 until the lights reach 33%, what you are actually doing is sending a "Start Manual Change" command which causes the lights to start brightening. When you let up on the button, a "Stop Manual Change" command is issued. You can send this command using PowerHome, however, PowerHome will not know at what level to stop. When you do it manually, you have a visual indication of when you'd like to stop the brightening. The Insteon protocol does not provide for a way to get feedback when doing a manual change so the best you could do is "time" how long it takes to get the desired brightness and program that within PowerHome. So you would send the "Start Manual Change" command, delay for a specified amount of time and then send a "Stop Manual Change" command.
Dave.
|
Back to Top |
|
|
QuickCarl Groupie
Joined: February 13 2006 Location: United States
Online Status: Offline Posts: 60
|
Posted: March 24 2006 at 07:42 | IP Logged
|
|
|
Ah ha, now I think I've got it. Seems like there ought to be an extension to the protocol then doesn't it. I liked the idea that you had for sending a group command. Seems like something like that could be used to send the brightness level to a group of lights as well.
Ramp rates and on levels can be set for two instances, local and remote, yes? So that when you send a remote command to the light it reacts with the remote on level and ramp rate, but that doesn't change no matter what the remote controller is, correct? Which means that I could set the ramp rate to 31 and the on level to 255 for local and have the lights go all the way on as rapidly as possible when controlling them from their switches, right? But if a remote level and ramp rate are set, then when controlled by any controller (such as PH using the PLC or the 4020, then they will only go to the remote on level that was set for each individual switch, correct?
So here are a few more questions:
1) Is there a way to set the remote ramp rate and on level for the devices in PH?
2) Does a remote on level respond only to the "On" command, and does the "Fast On" command go to full brightness?
3) If trying to kludge together a solution using the start and stop manual change, does the first start manual change brighten or dim?
4) Or does it dim if the light is on, and brighten if the light is off?
5) Is there a second command parm that goes with it?
6) If I was trying to introduce a "delay" to simulate the pressing of the button for a couple of seconds to get the brightness to a desired level, how would I do that?
Dave your explanations have been fantastic and very helpful. I love PH and did purchase it. Very worthwhile piece of software. I hope that SmartHome listens to you about some protocol extensions.
Would those be able to be downloaded to the devices? Or would they just have to change the SDM?
Thanks for all your help. -Carl
|
Back to Top |
|
|
UpstateMike Senior Member
Joined: February 18 2006 Location: United States
Online Status: Offline Posts: 142
|
Posted: March 24 2006 at 08:26 | IP Logged
|
|
|
Carl-
Don't forget that groups and scenes are interchangeable with Insteon. If you have a group of 5 devices that you want to control at a couple of different levels, the short simple answer is to define additional groups in the PLC with different settings (scenes).
Group 1 could be the 5 devices coming on at 100%. Group 2 could be the same 5 devices set to 33% and so on. With 254 groups in the PLC it should not be a problem to define the same set of devices several times as groups with different levels.
The other advantage is that you can define a different ramp rate per device per group. For example: I have a group that turns my 5 Living room lamps on to 100% but at different ramp rates so they come on in a kind of cacade effect. I have another group that turns them on at 40% but all at the same ramp rate so they fade up in unison. I can send a Group 1 On to use the cascade effect to bring them up but use group 2 off if I want them to fade down together.
|
Back to Top |
|
|
QuickCarl Groupie
Joined: February 13 2006 Location: United States
Online Status: Offline Posts: 60
|
Posted: March 24 2006 at 08:33 | IP Logged
|
|
|
Mike, that is a good idea, and I can see how in PH I would jsut clone the group from Group 1 in the PLC to group 2 and group 3, giving me the opportunity to have 3 differently acting 'scenes' for the same set of lights...
Question is, how do I set up different on levels and ramp rates in those different groups?
|
Back to Top |
|
|
UpstateMike Senior Member
Joined: February 18 2006 Location: United States
Online Status: Offline Posts: 142
|
Posted: March 24 2006 at 08:48 | IP Logged
|
|
|
Once you clone the groups just edit the devices in the new groups with whatever levels and ramp rates you want using Create/Edit/Clone.
Lets say you have a group in keypad button 1 that turns on lamp 1 and lamp 2 to level 254 at ramp rate 31. You clone that group to PLC slot 1 and clone it again to PLC slot 2.
Now you can do a Create/Edit/Clon on PLC slot 2 and change lamp 1 and lamp 2 to level 85 and ramp rate 27 for example. PLC slot 1 now turns the lamps on quickly to full brightness. PLC slot 2 now turns the same lamps on slowly to a dimmed level.
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: March 24 2006 at 13:07 | IP Logged
|
|
|
Carl,
To set the levels and ramprates for your individual groups, just scroll all the way to the right in the "Responders" section of the Create/Edit/Clone window. I think that is the part you're missing.
To answer your other questions...
Quote:
Does a remote on level respond only to the "On" command, and does the "Fast On" command go to full brightness? |
|
|
An "On" command will use the group defined levels and ramprates. A "FastOn" ignores these values and the members go to full on at the fastest ramprate.
Quote:
3) If trying to kludge together a solution using the start and stop manual change, does the first start manual change brighten or dim?
4) Or does it dim if the light is on, and brighten if the light is off?
5) Is there a second command parm that goes with it? |
|
|
You've caught a bug here. The "Insteon Raw Group" macro command should open the "Sendkeys/TTS/Formula" field if the command is a "Start Manual Change" (this is the only command that would be using the CMD2 parameter). A value of 1 for CMD2 means to brighten, a value of 0 means dim. I'll get this fixed in the next version. You can work around this by using the ph_insteonrawgroup function. Just change your macro command from "Insteon Raw Group" to formula, immediate, and set the Sendkeys/TTS/Formula field to: ph_insteonrawgroup("YOURPLCID",yourplcgroupnumber,23,1). The 23 is the command number for "Start Manual Change" and the 1 is for brighten. "Stop Manual Change" is command number 24.
To do it up with 2 seconds of brightening, then use the following formula. For clarity sake, Im going to assume your PLC ID is "PLCID", the group you are changing is group 5 and you want to brighten for 2 seconds and then stop.
ph_insteonrawgroup("PLCID",5,23,1) + ph_delay(2000) + ph_insteonrawgroup("PLCID",5,24,0)
Dave.
|
Back to Top |
|
|
QuickCarl Groupie
Joined: February 13 2006 Location: United States
Online Status: Offline Posts: 60
|
Posted: March 24 2006 at 16:08 | IP Logged
|
|
|
Awesome, now by George, I've got it! Just open the PH Explorer, go to devices by group, under desired ramprate and desired on level in the group you want, enter the appropriate levels.
Seems though, that a large installation and a creative person would run out of groups.
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: March 24 2006 at 18:46 | IP Logged
|
|
|
Carl,
Thats my thinking as well. I could see the number of available groups easily being exhausted. If SmartLabs extended the protocol just a little, I think a lot of "redundant" groups could be eliminated.
The other option I thought of would be a "second" PLC. This would buy you another 254 groups. However, at this time, you can only have 1 instance of the SDM running at a time and that SDM instance can only connect to a single PLC. It seems that some simple changes to the SDM would allow multiple instances to run concurrently each with it's own settings identifying which controller to use.
Dave.
Edited by dhoward - March 24 2006 at 18:47
|
Back to Top |
|
|
|
|