Jump to content

interacting with misterhouse


cslee

Recommended Posts

Posted

Hi,

I want to get ISY to interact with misterhouse. mistehouse is a perl based scripting home automation program. I want misterhouse to be able to "over the network" control the insteon devices. How can I do this?

Posted

Are you looking for information on how to interact with the ISY via Perl or looking for someone to write the interface?

 

I started playing around with the ISY using Perl but didn't do much before switching over to .net. I do have the Perl code to discover the ISY on the network though as a starting place if you want it.

Posted

I want to write my own code but any help will be great. I just want to get status of devices and turn then on/off/dim etc...

Posted

cslee,

 

Ok, I can help get you started. You (or the moderator) may want to move this over to the developers section. You'll find a lot more information over there.

 

I did some initial code using Perl on Linux. The ISY uses web services and SOAP for communications. Finding the ISY is pretty easy. Here's the Perl code for that. This just sits in a loop getting the multicast packets. You would want to look at the data and when you have the right packet, break out of the loop.

 

use IO::Socket::Multicast;

print "Attempt to find ISY via multicast broadcast\n";

use constant GROUP => '239.255.255.250';
use constant PORT  => '1900';

my $sock = IO::Socket::Multicast->new(LocalPort=>PORT,ReuseAddr=>1);
$sock->mcast_add(GROUP) || die "Couldn't set group: $!\n";

while (1) {
     my $data;
     next unless $sock->recv($data,1024);
     print $data;
}

 

The main information you get from the packet is the URL to use to contact the ISY.

 

I did some experiments using SOAP::Lite and did manage to get some calls to work, but I never really understood how everything needs to be set up to get SOAP::Lite working right with the ISY. If you want to pursue this, I can post the code I have.

 

It might be easier to look at the thread in the developer section on with de-mystifying in the title. It talks about using telnet to test the communications and this could be translated into simple socket level commands in Perl. You'd need to build the proper XML strings to send and parse the return.

 

The ISY sends notifications of state changes to an open, listening socket. It doesn't have a direct command to get the status of an individual device. In most cases this means creating a thread to handle that.

 

I've heard of MisterHouse, but never played with it. Does it use Windows/Linux/Both? I'm just curious.

Posted

Hi cslee,

 

I am certain Perl supports Web Services (e.g. http://www.soaplite.com/ ) and, as such, all you have to do is to import our WSDK (http://forum.universal-devices.com/viewtopic.php?t=1446) to your Perl project and simply use the services as provided.

 

With kind regards,

Michel

 

 

I read paul lutus page http://vps.arachnoid.com/home_automatio ... rface.html

with great interest... If only I can do that with perl in misterhouse..

 

Michel, any tips on how to turn on/off devices using perl ?

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

  • Forum Statistics

    • Total Topics
      37.1k
    • Total Posts
      372k
×
×
  • Create New...