View Full Version : Simple Ocelot Device Manager

Todd Reed
October 27th, 2006, 09:37 PM
I think I talked to Mike about this before...

For the Ocelot plugin, I would love to be able to enter and store a list of devices, "by name" to choose from. Possibilities include IR commands, Relays and the associated Module number, and variables and timers.

I have reviewed the G5 Alpha Device Manager, but there is no info on how to write the "provider" interface as of yet.

Usage example:
Send "Vol-Up IR" to "Stereo (SECU16IR)", "Bedroom (Zone 2)"
Turn on "Spa Pumps (Relay4)" on "Spa (SECU16 unit #2)"

For personal use, I thought about just editing the pick list inside the UI designer, but for others... The W800 UI page is very similar, but I can't follow that yet!

Any ideas, or samples to look at?

Todd Reed
November 2nd, 2006, 10:28 AM
Okay, let's get specific...

On startup, open a comma delimited text file and read it into a lua table

Then access that table inside the treescript... using a lua variable.

Any examples??

November 2nd, 2006, 11:23 AM

You won't need to do any UI stuff for naming etc BUT you may need it to control what devices to add to the DM. Does the ocelot plugin have a list of devices it knows about?

The Provider is used to create devices and to control communication between the plugin and the devicemanger.

The X10 stuff is covered already.

Todd Reed
November 2nd, 2006, 12:02 PM

I want to add devices by name, just like the cool X10 UI, but for Ocelot specific things. IR by name, Relays, etc...

So, another config page that would "Add" a named device...

IR01 = Volume Up
IR02 = Volume Down
Relay01 = Spa Pump
Relay02 = Filter Pump

I could hard code it into the serial plugin for my own use, (like HC and UC assignments) but the above method would be best for all other users!

Also, I thought about reading a user editable text file into variable table...


November 3rd, 2006, 09:34 AM

A new part of G5 is the ComponentManager. It provides many of the facilities you need - ie. a way to store data in a lua table.