View unanswered posts | View active topics It is currently Sat May 18, 2013 10:37 am



Reply to topic  [ 45 posts ]  Go to page: 1, 2, 3  Next
 Automogator - Perl client for Indigo (and more) 
Author Message

Joined: Mar 19, 2008
Posts: 496
Location: Saratoga, CA
Post Automogator - Perl client for Indigo (and more)
Hi everyone,

As I hinted before, I have been working on some software libraries which make it possible to interface Indigo with a variety of other systems, such as alarm panels, AV equipment, etc. Today I have put together a first release of these tools, collectively dubbed "Automogator".

http://www.seanadams.com/ha/automogator

The focus of this initial release is the Indigo component, which includes complete (as documented, anyway) support for the Indigo control protocol. This means you can create a program which communicates bidirectionally with Indigo, responding instantaneously to any events of interest.

The other components in this release (Aprilaire, Cat2000, Elk, NEC, Pentair) all work, but are in various stages of completion and may lack documentation or examples. If you are interested in getting any of these particular devices work with Indigo I can provide example code by request.

At the risk of stating the obvious, this software is presently geared towards the experienced perl developer - it is not a packaged solution for any particular application. It is possible that I might adapt this to the forthcoming Indigo plugin architecture (improving ease of use)... depending on what form that eventually takes.

Sean


Thu Mar 04, 2010 3:26 pm
Profile
User avatar

Joined: Nov 18, 2008
Posts: 1720
Location: Berkeley, CA
Post Re: Automogator - Perl client for Indigo (and more)
Sean: How does the aotomogator (and what does that name mean?) interface to Indigo?


Thu Mar 04, 2010 8:56 pm
Profile

Joined: Mar 19, 2008
Posts: 496
Location: Saratoga, CA
Post Re: Automogator - Perl client for Indigo (and more)
berkinet wrote:Sean: How does the aotomogator (and what does that name mean?) interface to Indigo?


It's just a ridiculous name I came up with. It's talking to indigo on port 1176, which is a persistent TCP connection on which XML-structured data is exchanged back and forth. This is the same protocol used by the Indigo GUI client to communicate with the Indigo server.


Thu Mar 04, 2010 9:51 pm
Profile

Joined: Jul 09, 2009
Posts: 270
Location: SW Florida
Post Re: Automogator - Perl client for Indigo (and more)
seanadams wrote:Hi everyone,
http://www.seanadams.com/ha/automogator

Wow!
Thanks for leading the way.
Hope to see some of this reach the point and click crowd, eventually.
(Sounds like Matt and Jay are opening the doors to these types of possibilities in Indigo 5.)


Fri Mar 05, 2010 5:08 pm
Profile

Joined: Sep 16, 2009
Posts: 95
Post Re: Automogator - Perl client for Indigo (and more)
Good work!

I got it working in about 20 minutes, so it is pretty close to point and click.

-Chris


Fri Mar 05, 2010 7:25 pm
Profile

Joined: Mar 19, 2008
Posts: 496
Location: Saratoga, CA
Post Re: Automogator - Perl client for Indigo (and more)
chrisla23 wrote:Good work!

I got it working in about 20 minutes, so it is pretty close to point and click.

-Chris


Cool... but indigo_example.pl just a demo (see comments in that script). Is there one of the other components that you have a use for?


Fri Mar 05, 2010 7:45 pm
Profile
User avatar

Joined: Nov 18, 2008
Posts: 1720
Location: Berkeley, CA
Post Re: Automogator - Perl client for Indigo (and more)
One of my interests is controlling my DENON AVR - it supports an ascii based protocol over a two-way telnet or rs-232 interface. I think you mentioned you are controlling an audio system. Would that be appropriate to use as a model for this type of application, and if so, could you post the POE module and an example wrapper script.


Fri Mar 05, 2010 7:52 pm
Profile

Joined: Mar 19, 2008
Posts: 496
Location: Saratoga, CA
Post Re: Automogator - Perl client for Indigo (and more)
berkinet wrote:One of my interests is controlling my DENON AVR - it supports an ascii based protocol over a two-way telnet or rs-232 interface. I think you mentioned you are controlling an audio system. Would that be appropriate to use as a model for this type of application, and if so, could you post the POE module and an example wrapper script.


Yes - I have done this for Rotel (three Rotel products, actually) but it still needs a little work. It will be very similar to what you want to do with the Denon.


Fri Mar 05, 2010 9:13 pm
Profile

Joined: Sep 16, 2009
Posts: 95
Post Re: Automogator - Perl client for Indigo (and more)
> Cool... but indigo_example.pl just a demo (see comments in that script). Is there one of the other components that you have a use for?

One idea that comes to mind is keeping Inidgo in Sync with my SNMP controllable APC PDUs for my server rack. It already has the Indigo side of the state information, that would just need to be glued to an SNMP trap handler.

Also the power meter and Spa integration looks interesting.


Mon Mar 08, 2010 7:07 pm
Profile
User avatar

Joined: Sep 07, 2010
Posts: 228
Location: Toronto, Canada
Post Re: Automogator - Perl client for Indigo (and more)
Hi Sean,

I just wanted to thank you for automogator! I've been using it for a few months now and it's been working flawlessly. I've programmed quite a bit of perl before but never POE. It was a bit of a learning curve but it was worth it.

I made one addition to the code, I added a 'ReplacedDevice' callback to the Indigo module so it would notify my modules of changes in device states. Next I'd like to add the ability for it to save the 'FolderID' of variables. Currently when I change a variable that's been organized into a sub-folder it will dump out into the root once it's been touched by automogator.

I've written two modules so far. One interfaces to some RS485 boards I've got scattered throughout the house for basic I/O, and the other interfaces to a DSC alarm IT-100 interface board. Next I'm going to write a cacti module so certain device states can be easily passed to cacti for graphing. This way I could see a timeline of all my device usage throughout the day. If I associate a wattage with each device I could then plot some rudimentary power consumption graphs too.

I've currently got cacti graphing temperatures in each room of the house. I used digitemp with some maxim DS18B20 temperature sensors mounted to the phone jacks in each room. I used the unused telephone wires in each jack to create the one wire network which the sensors use to communicate with the computer. I'll also be using automogator to pull this data into indigo variables so it can better determine how to heat and cool the house. If anyone's interested in more details let me know and I'd be happy to share.

Thanks again Sean!

Travis


Tue Sep 07, 2010 8:03 am
Profile WWW

Joined: Mar 19, 2008
Posts: 496
Location: Saratoga, CA
Post Re: Automogator - Perl client for Indigo (and more)
Excellent. I guess I should set up github so we can work together - in the mean time see if you can merge the 20100809 build which includes folder support and implicit creation of variables on modification. I have also added support for control page creation, which I used to great effect for setting up multi-room audio controls. The example is indigo_vaux.pl - problem discussed in another thread although I hadn't posted a follow-up yet.


Tue Sep 07, 2010 8:58 am
Profile
User avatar

Joined: Sep 07, 2010
Posts: 228
Location: Toronto, Canada
Post Re: Automogator - Perl client for Indigo (and more)
I guess I should have updated to the latest code before writing that post. :oops:

I rolled my changes into the latest Indigo.pm which can be downloaded here:
http://www.frightideas.com/hobbies/Indigo.pm

The only changes made were the addition of a ReplacedDevice callback which works exactly the same as the ReplacedVariable callback. I added it so I could monitor changes of Indigo devices. I have an 8 output rs485 board I use to control sprinklers, as well as a few other outputs that are spread around. I created x10 devices in Indigo to represent these and then monitor the state changes with automogator.

This can sometimes be accomplished by representing the device as an Indigo variable that automogator watches. But Indigo's internal sprinkler controller cannot be used with a variable, and variables also are not represented on Indigo's dynamically-created web pages as lights or switches. In those cases I prefer to use a device to represent them.

I'll clean up my code for the DSC IT-100 alarm module and pass it on so you can include it with automogator. For now I'll included a picture of the control page that represents it. The virtual LCD shows the actual LCD messages sent by the alarm.

Image

Travis


Tue Sep 07, 2010 10:14 am
Profile WWW

Joined: Jan 14, 2007
Posts: 56
Post Re: Automogator - Perl client for Indigo (and more)
Installed POE (cpan -i POE). Ran your indigo_example.pl and it could not locate your Indigo.pm. What am I missing?


Mon Sep 20, 2010 9:34 am
Profile

Joined: Mar 19, 2008
Posts: 496
Location: Saratoga, CA
Post Re: Automogator - Perl client for Indigo (and more)
Sorry I was being sloppy with my include paths. Try running it from one directory level up.

cd ..
examples/indigo_example.pl


Mon Sep 20, 2010 9:43 am
Profile

Joined: Jan 14, 2007
Posts: 56
Post Re: Automogator - Perl client for Indigo (and more)
I did not download the rest of the files, just two, Indigo.pm and indigo_example.pl and both are in same directory in which I ran "perl indigo_example.pl".


Mon Sep 20, 2010 10:27 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 45 posts ]  Go to page: 1, 2, 3  Next

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.   Template designed by STSoftware.