New Plugin to Simplify Integration of Custom Devices

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
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
bcall
Posts: 59
Joined: Thu May 17, 2012 4:54 pm

New Plugin to Simplify Integration of Custom Devices

Post by bcall »

The Multi Device Plugin is a new plugin that makes the task of integrating custom devices (like AV Receivers, pool controllers, etc.) into Indigo much easer. If you can write an xml file and about a page of python code you can create a custom plugin for your own device (assuming it meets certain parameters).

All you need to worry about is the logic for creating command strings for your device and parsing feedback strings. The plugin does the rest.

The Multi Device Plugin comes with controllers for 4 built in devices: an Onkyo Receiver, a Russound Multi Zone Receiver, a TiVo premier and an Intellitouch pool controller.

There is a full description of this new plugin, together with tutorials and a quasi-sdk (lists of python methods that should be implemented and helper methods to help you do it, along with the xml and python files for each of the built in devices) available at http://www.bradcall.com/multideviceplugin.

The plugin is inexpensive but not free. It is available in a single device version (if you want to use the functionality of just one of the built in devices), a standard version which includes all of the built in devices, and a pro version which includes all of the built in devices plus the ability to create your own.

If you are interested in any of the built in devices, or if you would be interested in a way to create your own custom devices more easily, take a look at the available documents to get a sense of whether this might be something useful to you.

Also, adding new devices to the plugin is fairly straight forward, so if you have a device you’d like to see added, let me know. The most important part is to get the communication protocol for the device (some manufacturers don’t make that easy). But, if you have it or can get it, let me know and I’ll see what I can do to help.

By the way, just in case you find python a little daunting, here is the entire python file that supports the TiVo within the plugin. The other devices have a bit more in their python files, but not that much more.

Code: Select all

from deviceDrivers.baseDeviceDriver import BaseDeviceDriver

class TivoDeviceDriver(BaseDeviceDriver):

    def preParseFeedback(self, feedback):
    splitFeedback = feedback.split(' ')
    if splitFeedback[0] == 'CH_STATUS':
        channel = int(splitFeedback[1])
        if len(splitFeedback) > 3:
            channel = '%d-%d' % (int(splitFeedback[1]), int(splitFeedback[2]))
        else:
            channel = '%d' % int(splitFeedback[1])
            self.updateDeviceState('tivoPremier', 'channel', channel)
            self.updateLastFeedbackInfo(True, feedback)
            return True
        elif feedback[0] == 'CH_FAILED':
            self.updateLastFeedbackInfo(False, feedback)
            return True
        return False

NOTE: The Multi Device Plugin is currently in BETA. Please be patient!

NOTE ON MOUNTAIN LION: I've seen the recent discussion on Mountain Lion and Indigo. This plugin was built on Lion and Indigo 5. It's compatibility with Mountain Lion will depend upon how Mountain Lion affects Indigo 5 and python 2.5
User avatar
jay (support)
Site Admin
Posts: 19232
Joined: Wed Mar 19, 2008 11:52 am
Location: Austin, Texas
Contact:

Re: New Plugin to Simplify Integration of Custom Devices

Post by jay (support) »

Excellent additions - thanks much!
Jay (Indigo Support)
Twitter | Facebook | LinkedIn
User avatar
matt (support)
Site Admin
Posts: 21542
Joined: Mon Jan 27, 2003 1:17 pm
Location: Texas
Contact:

Re: New Plugin to Simplify Integration of Custom Devices

Post by matt (support) »

Yes, definitely great to see more A/V control available now in Indigo. Thanks!
Image
ckeyes888
Posts: 2438
Joined: Thu Nov 26, 2009 2:41 pm
Location: Kalispell, MT

Re: New Plugin to Simplify Integration of Custom Devices

Post by ckeyes888 »

Anyone know if this plugin can access Pandora stations directly using an Onkyo NR708?

Thanks,

Carl
asw24b
Posts: 222
Joined: Sun Dec 30, 2007 7:45 pm
Location: Los Altos Hills, CA

Re: New Plugin to Simplify Integration of Custom Devices

Post by asw24b »

bcall wrote:The Multi Device Plugin is a new plugin that makes the task of integrating custom devices (like AV Receivers, pool controllers, etc.) into Indigo much easer. If you can write an xml file and about a page of python code you can create a custom plugin for your own device (assuming it meets certain parameters).

All you need to worry about is the logic for creating command strings for your device and parsing feedback strings. The plugin does the rest.

The Multi Device Plugin comes with controllers for 4 built in devices: an Onkyo Receiver, a Russound Multi Zone Receiver, a TiVo premier and an Intellitouch pool controller.

There is a full description of this new plugin, together with tutorials and a quasi-sdk (lists of python methods that should be implemented and helper methods to help you do it, along with the xml and python files for each of the built in devices) available at http://www.bradcall.com/multideviceplugin.

The plugin is inexpensive but not free. It is available in a single device version (if you want to use the functionality of just one of the built in devices), a standard version which includes all of the built in devices, and a pro version which includes all of the built in devices plus the ability to create your own.

If you are interested in any of the built in devices, or if you would be interested in a way to create your own custom devices more easily, take a look at the available documents to get a sense of whether this might be something useful to you.

Also, adding new devices to the plugin is fairly straight forward, so if you have a device you’d like to see added, let me know. The most important part is to get the communication protocol for the device (some manufacturers don’t make that easy). But, if you have it or can get it, let me know and I’ll see what I can do to help.

By the way, just in case you find python a little daunting, here is the entire python file that supports the TiVo within the plugin. The other devices have a bit more in their python files, but not that much more.

Code: Select all

from deviceDrivers.baseDeviceDriver import BaseDeviceDriver

class TivoDeviceDriver(BaseDeviceDriver):

    def preParseFeedback(self, feedback):
    splitFeedback = feedback.split(' ')
    if splitFeedback[0] == 'CH_STATUS':
        channel = int(splitFeedback[1])
        if len(splitFeedback) > 3:
            channel = '%d-%d' % (int(splitFeedback[1]), int(splitFeedback[2]))
        else:
            channel = '%d' % int(splitFeedback[1])
            self.updateDeviceState('tivoPremier', 'channel', channel)
            self.updateLastFeedbackInfo(True, feedback)
            return True
        elif feedback[0] == 'CH_FAILED':
            self.updateLastFeedbackInfo(False, feedback)
            return True
        return False

NOTE: The Multi Device Plugin is currently in BETA. Please be patient!

NOTE ON MOUNTAIN LION: I've seen the recent discussion on Mountain Lion and Indigo. This plugin was built on Lion and Indigo 5. It's compatibility with Mountain Lion will depend upon how Mountain Lion affects Indigo 5 and python 2.5


Is this plug in still being developed ??

Thanks !

Mike
Locked

Return to “Extending Indigo with Plugins and Python”