LinuxMCE Forums

General => Developers => Topic started by: ddamron on December 12, 2007, 09:08:35 pm

Title: How do I determine Group Membership in DCE?
Post by: ddamron on December 12, 2007, 09:08:35 pm
I've got my EZBridge interface working quite well now.  I'd like to add some smarts to it.

When you associate a device to a group, how can you programatically get that information in Ruby?

I'd like to program the group memberships right out to the devices themselves.

EG:  Office Light is in group Basement Lights

I want to take the group BASEMENT LIGHTS and create an insteon group for said devices.

Thanks,

Dan
Title: Re: How do I determine Group Membership in DCE?
Post by: PeteK on December 12, 2007, 09:54:04 pm
I'm quite curious myself.  I've added a command

920 | Add Insteon Device to Group

The number may change as the Pluto guys are checking it into their CVS server.  My thinking is that groups should be arranged between lights that will likely be controlled simultaneously.  I'm thinking the easiest way is going to be to assign Insteon group numbers to scenarios that contain INSTEON lights.  There is a scenario generated for each room with lights for an all on/all off.  Of course, user-generated scenarios will have group numbers as well.

You have to have a desired on level and ramp rate at group assignment, so issuing this command at group creation seems to be the best way to go.
Title: Re: How do I determine Group Membership in DCE?
Post by: ddamron on December 12, 2007, 11:16:26 pm
Yep, I'm on the same page..

BTW, I've been working on two projects kinda at the same time...
the EZBridge, and the PLM (serial)

The EZBridge can now work around problems like multiple commands, PLMEchoError, PLMTimeout, etc, and it quite stable.  Ready for Beta now, unless I can figure out these groups, then I can add more smarts.

The PLM side is ready for alpha, but I'm delayed on bug testing due to I haven't put a RS232 pigtail in my Engine yet...

All done in Ruby.

Title: Re: How do I determine Group Membership in DCE?
Post by: PeteK on December 12, 2007, 11:24:49 pm
So how is group enrollement done with the EZ-bridge?  How about with the PLM?  With the PLC, you have to manually read bytes on the remote devices' EEPROM to find an open record, then write the record in manually.
Title: Re: How do I determine Group Membership in DCE?
Post by: ddamron on December 12, 2007, 11:34:24 pm
Yep, Same with the PLM..  have to use peek and poke.
the PLM is i1 and as such, only has flat memory model, with no i2 support.  bummer.  Ahh well...

The EZBridge has groups built into it.. (third party groups... same as sending each device)

I'll use the same routines for both units.

I just posted my code for the EZBridge... check it out, lemme know what you think.