Want to learn

Forum rules

This is a legacy forum which is locked for new topics. New topics should be started in one of the other forums under Extending Indigo

Posted on
Thu May 26, 2011 2:28 pm
Brandt offline
User avatar
Posts: 414
Joined: Dec 24, 2008
Location: Mission Viejo, CA

Want to learn

I would really love to be able to develop a plugin or two for Indigo, but I don't know where to get started.

I have no Python experience, but I do have experiences in other languages.

I read through the plugin documentation in the wiki, but it didn't really point the way to a good starting point to learn how to do this.

Could anybody point me in the right direction to learn how to do this from the beginning?

Thanks!

Indigo 7 w/ Dual-Band 2413U PLM
macOS High Sierra 10.13.x
2011 iMac 3.4 GHz Intel Core i7

Posted on
Thu May 26, 2011 11:57 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Want to learn

Once you've done some basic online tutorials for Python, I would start by duplicating one of the existing plugins. Note you'll need to update its info.plist to give it a unique plugin name and ID so that it doesn't interfere with the original plugin.

Image

Posted on
Fri May 27, 2011 10:40 am
Brandt offline
User avatar
Posts: 414
Joined: Dec 24, 2008
Location: Mission Viejo, CA

Re: Want to learn

ok I'll try that...looks like the growl plugin is less complicated than the iTunes plugin to start playing with

Indigo 7 w/ Dual-Band 2413U PLM
macOS High Sierra 10.13.x
2011 iMac 3.4 GHz Intel Core i7

Posted on
Thu Jun 02, 2011 11:55 am
Brandt offline
User avatar
Posts: 414
Joined: Dec 24, 2008
Location: Mission Viejo, CA

Re: Want to learn

I ended up copying the EasyDAQ plugin because it is hardware ,and I'm trying to learn by creating an RCS thermostat plugin, but maybe I'm a little over my head here. I was able to create a Devices.xml for it, now looking at plugin.py, but I don't really understand what I have to do to communicate with X10 hardware so that may take some time...

I noticed in devices.xml you can define it as dimmer, relay, or custom....there is no thermostat device type? Is it possible to create a UI for it like we see with the Venstar?

Is there a List class type to list all the X10 house codes?

Indigo 7 w/ Dual-Band 2413U PLM
macOS High Sierra 10.13.x
2011 iMac 3.4 GHz Intel Core i7

Posted on
Thu Jun 02, 2011 6:58 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Want to learn

Currently the most completely implemented plugin device type is the custom, where the plugin must provide all of the state information and action UI for the device. This is what EasyDAQ and the iTunes plugin use.

We are also planning on, but haven't yet implemented, support for creating plugin overridden relay and dimmable type devices. Once complete those plugin devices will work with the built-in UI of the Indigo client (main window) as well as Indigo Touch and the Web pages. When the user controls those devices, Indigo Server will send the action information to the plugin so that it can send the command to the hardware and update the state information. But again, note we haven't finished implementing this yet.

I'd also like to provide plugin overrides for the thermostat and sprinkler type. I'm not sure when exactly that will be finished, however. First we are going to get dimmable and relays overrides working.

So your options at this point are to wait until we provide the ability for a plugin to create its own custom override of the thermostat object, in which case you'll get the UI for free, or you can go the 100% custom route, in which case you have to define all of the states and the action UI. Note by action UI, I'm referring to the action panel UI and not the controls inside Indigo Touch or on the Web pages. How the UI on those latter two will be defined/presented it still being ironed out.

Image

Posted on
Sat Jun 11, 2011 2:43 am
jcrides offline
Posts: 26
Joined: Oct 23, 2010
Location: Concord, CA

Re: Want to learn

I'm curious when you think you might have the overrides for dimmer and relay devices done. I've been trying to use a dimmer type for the UPB plugin I'm working on but it wasn't working like I expected. Then I stumbled across this thread and now I know why that is.

I'm using 5.0.0 b5 in case it's supposed to be working in that version and I'm doing something wrong (which wouldn't surprise me too much :) ).

Posted on
Sat Jun 11, 2011 8:50 am
jay (support) offline
Site Admin
User avatar
Posts: 18225
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Want to learn

No later than GM - unfortunately I can't be more specific than that. Keep an eye on the beta announcements.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Tue Jul 05, 2011 11:35 pm
Brandt offline
User avatar
Posts: 414
Joined: Dec 24, 2008
Location: Mission Viejo, CA

Re: Want to learn

Is it possible to create my own custom popup UI like you do with the irrigation controllers and with the venstar thermostat?

Indigo 7 w/ Dual-Band 2413U PLM
macOS High Sierra 10.13.x
2011 iMac 3.4 GHz Intel Core i7

Posted on
Wed Jul 06, 2011 6:32 am
jay (support) offline
Site Admin
User avatar
Posts: 18225
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Want to learn

Not at the moment, and probably not for v1 of the API. We're still thinking about how custom control UIs will work.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Tue Jul 12, 2011 5:46 pm
Brandt offline
User avatar
Posts: 414
Joined: Dec 24, 2008
Location: Mission Viejo, CA

Re: Want to learn

Is it possible to send preset dim commands, or watch for them with the plugin api?

Indigo 7 w/ Dual-Band 2413U PLM
macOS High Sierra 10.13.x
2011 iMac 3.4 GHz Intel Core i7

Posted on
Tue Jul 12, 2011 6:17 pm
jay (support) offline
Site Admin
User avatar
Posts: 18225
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Want to learn

Not currently - but the plan is to support everything that can be done via AppleScript in the IOM by GM for 5.0 (both of those can be done in AppleScript). Of course, plans can change, but I suspect we'll get that in before final.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Tue Jul 12, 2011 10:34 pm
Brandt offline
User avatar
Posts: 414
Joined: Dec 24, 2008
Location: Mission Viejo, CA

Re: Want to learn

ugh I keep striking out. At this point I would like to make an RCS Thermostat Plugin, which communicates using preset dims. I would also like to make a USB-UIRT Plugin, but have to figure out how to communicate with it since I don't think I could do it with raw Python, I may try to get LIRC compiled for Mac.

Indigo 7 w/ Dual-Band 2413U PLM
macOS High Sierra 10.13.x
2011 iMac 3.4 GHz Intel Core i7

Posted on
Thu Jul 14, 2011 12:30 pm
jay (support) offline
Site Admin
User avatar
Posts: 18225
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Want to learn

Seems like you should be able to communicate with the USB-UIRT directly from python - since it's USB there are generally two ways to communicate with it: 1) using the USB HID drivers built-in to the OS or 2) if it's using one of the standard serial-to-USB bridge chips (FTDI, Prolific, etc) then you should be able to use the various virtual comm port drivers to talk to it via standard serial commands.

Communicating via the HID driver would probably require you to use pyobjc to access the HID APIs, which I've never tried, but seems like it should work. I think it's much more likely that it uses one of the standard bridge chips so using standard PySerial should work. But I've never looked at it so I don't know.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Thu Jul 14, 2011 12:48 pm
Brandt offline
User avatar
Posts: 414
Joined: Dec 24, 2008
Location: Mission Viejo, CA

Re: Want to learn

The developer of the USB-UIRT has a .dll and an .so for linux that he provides, but he hasn't gotten anything 100% developed for mac users as nobody experienced enough in mac development has offered. He only has a semi completed library for mac. It uses an FTDI chip, and he has a document describing the protocol to communicate with the device. I just don't feel up to the task, because I am not that experience in Python or Mac development. I've only done some iOS development, and I used to build and program robots using C on the ATMega MCU's....

Indigo 7 w/ Dual-Band 2413U PLM
macOS High Sierra 10.13.x
2011 iMac 3.4 GHz Intel Core i7

Posted on
Thu Jul 14, 2011 1:02 pm
jay (support) offline
Site Admin
User avatar
Posts: 18225
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Want to learn

So, he's got a serial protocol and the FTDI bridge chip in the device. Cool - for anyone that wants to tackle the serial protocol all the parts are available.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 6 guests