USB-UIRT Plugin

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
Sat Aug 06, 2011 9:02 am
jay (support) offline
Site Admin
User avatar
Posts: 18260
Joined: Mar 19, 2008
Location: Austin, Texas

Re: USB-UIRT Plugin

Right - "print" is a standard out redirection function built-in to Python. indigo.server.log() is a method we provide that takes a message string (and some options) and writes it into the Indigo event log. Since it takes a single string as the message, you must construct your message as a single string using either substitution or by appending strings.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon Aug 08, 2011 5:20 pm
Brandt offline
User avatar
Posts: 414
Joined: Dec 24, 2008
Location: Mission Viejo, CA

Re: USB-UIRT Plugin

I'm trying to take what I have so far and turn it into a plugin using the EasyDaq as a template. I'm really struggling here, I guess partly because of my lack of practice with OOP and my unfamiliarity with the Indigo API.

I also need to think this through and am having trouble doing so.

Should there be a device called USB-UIRT kind of like the iTunes plugin with the iTunes Server device?
Or should people be able to create multiple devices like Television of type Plugin->USB-UIRT?
Or maybe both?

In the case where people want to LEARN their remote in order to control an IR device:
When adding an IR type device (such as television) I need to do sort of a programming session, where the user is asked to capture a remote button a few times. Then that remote code (in the form of a list or set) needs to be stored with the device somewhere (variable? xml database?). This remote code should be able to be used later for IR transmission based on direct commands of IR devices, triggers, schedules, or action groups.

In the case where people want to capture a single remote button to control an X10/Insteon device:
When controlling an Insteon device with an IR remote, I wouldn't need to associate the IR codes with any devices, just capture them and store them in general and use them for X10/Insteon transmission based on what code is received from a remote. I would need Indigo to constantly be checking the serial port in which the USB-UIRT is attached to for incoming commands and from there control devices directly, fire off triggers, or action groups.


Any suggestions would be appreciated. I don't have any exposure to any other UIRT devices such as IRTrans or EZUIRT, so I don't know how others do it.

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

Posted on
Tue Aug 09, 2011 8:23 pm
matt (support) offline
Site Admin
User avatar
Posts: 21429
Joined: Jan 27, 2003
Location: Texas

Re: USB-UIRT Plugin

Good questions, and I'm not sure of the right answers. Creating an IR plugin, regardless of hardware, is pretty complex especially if the hardware doesn't have an IR database and requires IR learning.

I'm not sure if I would try to create a mapping of IR receiving device (TV, amp, DVD, etc.) to Device instances. Instead, I would probably have the device be the USB-UIRT itself, then provide a mechanism for learning and storing the sets of all IR codes needed for all devices. I'm then not sure at what level I would store the IR data (device or global plugin). Either way, the plugin API provides an easy way to store indigo.Dict() and indigo.List() objects, where the values can be arbitrary strings (or bools, ints, etc.). So you can encode the learned IR code into a string, then just store it in the plugin (or device if you decide to make it device level) dict and the Indigo Server will take care of storing the values for you.

And if it is only possible (or useful) for a single USB-UIRT to be connected to the Indigo Mac, then you could just skip devices altogether -- just have everything being global at the plugin level. In that case, the user wouldn't create any Devices in Indigo, they would just turn on the plugin and configure it (including teaching it IR codes and assigning those names). Likewise the actions to send IR codes wouldn't be device specific, they would just be plugin actions.

Image

Posted on
Tue Oct 04, 2011 11:24 am
Brandt offline
User avatar
Posts: 414
Joined: Dec 24, 2008
Location: Mission Viejo, CA

Re: USB-UIRT Plugin

This is on hold right now because I hit a major road block that I could not resolve on my own and it was starting to take waaaaay too much of my time.

If anybody would like to join me in development efforts please let me know. I created a repository on GitHub called pyUIRT that I will upload my work to and hopefully can rally together some people.

-Brandt

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

Posted on
Wed Sep 19, 2012 10:20 pm
Brandt offline
User avatar
Posts: 414
Joined: Dec 24, 2008
Location: Mission Viejo, CA

Re: USB-UIRT Plugin

I finally put my work so far in github....please somebody good at python help!

https://github.com/brandtdaniels/pyUIRT

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

Who is online

Users browsing this forum: No registered users and 8 guests