PDA

View Full Version : So lost! (DM Providers devices oh my!)



storii
January 11th, 2012, 12:15 PM
Hi everyone,

I'm a Girder (and LUA) newbie and am so lost and could use a couple of pointers on where to get started.

Right now my focus is on controlling a couple dozen lutron shades. I have a IP shade control box; I can control them "manually" using telnet. I started in Girder by creating a transport to control the shades via TCP/IP. I've set up a script action that can use the transport to open and close the shades. I thought I had the hard part behind me.

Now I'm trying to get the shades to show up in the device manager. I've been hunting through the forums and have seen the recent post "How-to-Create-Devices-in-Device-manager". I want to make sure I take the correct approach so that as I move forward and integrate other systems I'm doing things the right way. I've seen several other posts where people have created providers and devices; that feels like the more robust solution.

I've seen providers people have made for the casablanca/pioneer plasma/parasound/etc and I've want to reverse engineer them to figure out how they tick. Without the hardware I don't expect to get them working, but I was hoping I could at least get one of them installed and giving me errors or something.

As I understand it, I need a device class to talk with my transport, and a provider class to interface the device with the DM, yes? Or am I off base? I've tried to put other's code in place and try to get it loaded, but the piece I seem to be missing is where to instantiate the device itself (what creates/loads the device/provider so that it shows up in the DM??) Do I need to create the device/provider similarly to the way the "basic device container.gml" in the other thread does it? Or is there some way I instantiate the instance of my device like the transport manager allows me to instantiate my transport?

I'm thoroughly confused. Am I making any sense? Any help would be *greatly* appreciated!

Thank you!
Tori

Mike C
January 12th, 2012, 02:50 PM
Hi Tori,

The concept of a common interface and standardizing device types lead to the device manger. At that time, to interface all existing plugins/components, the concept was of a provider sitting between the original plugin and the device manager.

The best way to do this now is for your software to directly create its own devices without need to write the extra code behind a provider.

So, once your component is up and running your can instantiate your own devices. If you show some code, I will help.

storii
January 12th, 2012, 06:45 PM
Thank you Mike, I appreciate it. I'll skip the whole provider thing.