Driver Request: Universal Devices ISY-99i

User avatar
AccessHA
Expert
Expert
Posts: 644
Joined: Sun Feb 13, 2005 8:44 pm
Location: MI
Contact:

Driver Request: Universal Devices ISY-99i

Postby AccessHA » Tue May 06, 2008 12:29 pm

Driver Request: UDI ISY-99i

This is the first product that actually makes Insteon work. This is the device that SH should have built when Insteon was first released. It’s a solid state automation controller designed to manage your Insteon network. Its interface is browser based and allows for complete drag-n-drop setup of all things Insteon.

I, along with many users at accessha.com, would love to see an ML driver for this device. Universal Devices has some of the best support in the industry and I’m sure they would be extremely helpful providing assistance during the development process.

This would also offload all of the link management, scenes, and lighting rules from ML.

Here is a link to their developer forum:

http://forum.universal-devices.com/view ... 193e7a15d0

Contact Michel at UDI and tell them Bryan from accessHA sent you.
Hell-bent on automating everything! I’m too lazy to do anything else.

www.accessHA.com
Access Home Automation
The ultimate Insteon resource on the web.

bjdraw
Senior Member
Senior Member
Posts: 246
Joined: Thu May 24, 2007 4:55 pm
Contact:

Postby bjdraw » Tue May 06, 2008 3:55 pm

I second this!!

I just ordered an ISY-99 after almost giving up on my Insteon network. I love the idea of having a solid state automation controller controlling something as important as lights, but it would be awesome to be able to control the ISY-99 from within ML.

The reasons I bought one instead of using ML plugin.
The link management in MLLighting and the new ML Insteon plug-in have never been successful for me at creating complex groups.
There is no way to just repair a scene with ML (ISY has this).
There is no easy way to replace an Insteon device with ML.
I find the ML Automation rules cumbersome to program.
Never been able to successfully activated an ML Automation rule with secondary Keypadlinc button.

At this point I was going to either throw my $1000 worth of Insteon devices out the window, or buy a $300 ISY; and based on other users impressions I'm optimistic that the ISY can rectify all my Insteon issues.
Ben Drawbaugh
How good can it be, if it isn't HD?

bigDvette
Expert
Expert
Posts: 718
Joined: Thu Oct 12, 2006 12:19 pm
Contact:

Postby bigDvette » Tue May 06, 2008 9:18 pm

I also just ordered one today. I'm frustrated with Insteon links and maintaining button states ...

Initially I plan to keep a PLM on MLServer and "query" using getstatus each time I load a room panel on my controller.

I talked to the guy at Universal Devices and there is a full protocol for talking to the ISY and keeping button status in sync (except some small scene control issues)

I downloaded teh developer kit and they've wrapped everything so the ISY is pretty easy to talk to. It is probably a bit beyon my skills other than just figuring out how to talk to it, but everything happens over the ethernet connection. If you create a plugin and connect, any program that changes the state of a switch will publish that state change to all clients.

The guys at ELK already have a plugin. The guy at Universal Devices said if anyone needed help building a plugin they are willing to help.

bpwwer
Senior Member
Senior Member
Posts: 215
Joined: Fri Jul 07, 2006 10:58 am
Contact:

Postby bpwwer » Wed May 07, 2008 5:12 pm

I'm thinking about ordering one of these. If I do, I'm willing to try and create a simple plug-in using MLScript or windows scripting if I do.
--
Bob

bjdraw
Senior Member
Senior Member
Posts: 246
Joined: Thu May 24, 2007 4:55 pm
Contact:

Postby bjdraw » Fri May 16, 2008 7:55 pm

I discovered this today, but I haven't messed with it yet. Thought someone else may way to before I get a chance.

This snibit of code was online and evidently will send a soap request.

Code: Select all

Dim xmlhttp, strUrl, strRequest, fso, tf
   
   Set xmlhttp = CreateObject("MSXML2.XMLHTTP.4.0")
   Set fso = CreateObject("Scripting.FileSystemObject")
   Set tf = fso.CreateTextFile("c:\xmloutput.txt")
   
   strUrl = "http://isy99/services"


   strRequest = "<?xml version='1.0' encoding='utf-8'?>" & _
      "<soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' " & _
      "xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'>" & _
      "<soap:Body>" & _
      "<GetBooksByTopic xmlns='http://tempuri.org/'>" & _
      "<topicName>History</topicName>" & _
      "<maxQty>1</maxQty>" & _
      "</GetBooksByTopic>" & _
      "</soap:Body>" & _
      "</soap:Envelope>"

   With xmlhttp
      .Open "post", strUrl, False
      .setRequestHeader "content-type", "text/xml; charset=utf-8"
      .setRequestHeader "SOAPAction", "http://tempuri.org/GetBooksByTopic"
      .send strRequest
      If .Status = 200 Then
         tf.writeline .responseXML.xml
      End If
   End With

   tf.close
   Set fso = Nothing
   Set xmlhttp = Nothing


Here is what the soap request is supposed to look like according to the ISY Web Services DK.

To authenticate

Code: Select all

POST /services HTTP/1.1
Host: 192.168.0.208:80
Content-Length: 167
Content-Type: text/xml; charset="utf-8"
SOAPACTION:"urn:udicom:
service:X_Insteon_Lighting_Service:1#Authenticate"
<s:Envelope><s:Body><u:Authenticate xmlns:u="urn:udicom:
service:X_Insteon_Lighting_Service:1"><name>admin</name><id>admin
</id></u:Authenticate></s:Body></s:Envelope>


Turn on device 01.31.CF button 1

Code: Select all

POST /services HTTP/1.1
Host: 192.168.111.105:60160
Content-Length: 210
Content-Type: text/xml; charset="utf-8"
SOAPACTION:"urn:udicom:service:X_Insteon_Lighting_Service:1#UDIService"
  <s:Envelope>
     <s:Body>
        <u:UDIService xmlns:u="urn:udicom:service:X_Insteon_Lighting_Service:1">
      <control>DON</control>
      <action></action>
      <flag>65531</flag>
      <node>1 31 CF 1</node>
   </u:UDIService>
     </s:Body>
</s:Envelope>


When I get a chance I'll try to put these two together.
Ben Drawbaugh

How good can it be, if it isn't HD?

bpwwer
Senior Member
Senior Member
Posts: 215
Joined: Fri Jul 07, 2006 10:58 am
Contact:

Postby bpwwer » Mon May 19, 2008 11:34 am

That looks pretty promising. I've flipped through the ISY documentation haven't tried anything yet.

I spent the weekend getting it all set up (mostly). I think I have all my devices entered, the important scenes created and a couple of programs running. So it should be in a good state to start experimenting.
--

Bob

bigDvette
Expert
Expert
Posts: 718
Joined: Thu Oct 12, 2006 12:19 pm
Contact:

Postby bigDvette » Mon May 19, 2008 1:34 pm

where would you run this in MLServer? MLScript?

I don't think the activation requests would be kept open.

I know if the session is kept open the ISY can push data.

bjdraw
Senior Member
Senior Member
Posts: 246
Joined: Thu May 24, 2007 4:55 pm
Contact:

Postby bjdraw » Mon May 19, 2008 2:39 pm

That's a good question, idealy we'd have two scripts, one to send commands and one to update variables, but you're right, if we can't keep the session opened with MLScript then it wouldn't be very workable.

I was away all weekend and have lots to do today, but I should have time to try it this week.
Ben Drawbaugh

How good can it be, if it isn't HD?

bigDvette
Expert
Expert
Posts: 718
Joined: Thu Oct 12, 2006 12:19 pm
Contact:

Postby bigDvette » Mon May 19, 2008 3:14 pm

I was thinking of pulling out my .net stuff and seeing if I could do this in a little webservice and just use MLScript to get data.

bjdraw
Senior Member
Senior Member
Posts: 246
Joined: Thu May 24, 2007 4:55 pm
Contact:

Postby bjdraw » Tue May 20, 2008 8:19 pm

Made a little progress tonight but still doesn't work.

First you have to know your IP and port which you can get from going to http://universal-devices.com/99i/ and then looking at Help>About and then looking at "My URL" or you can open up a packet sniffer and look for the broadcast UPNP packets.

Next you need to know a few more things so we need to request the UPNP discriptor file. Mine was at
http://192.168.111.60:60160/0/d.xml

Let me know if yours is in a different place.

If you open this is a web page, then you'll see some important details like ULRBase, UD, SCPDURL, controlURL, eventSubURL, __CU and __NU.

But for the authentication test you just need the controlURL which is 'c' so you'll see that as my strURL after the base URL.

Code: Select all

Dim xmlhttp, strUrl, strRequest, fso, tf

Set xmlhttp = CreateObject("MSXML2.XMLHTTP.4.0")
Set fso = CreateObject("Scripting.FileSystemObject")
Set tf = fso.CreateTextFile("D:\Downloads\ISY\xmloutput.txt")
   
strUrl = "http://192.168.111.60:60160/0/c/"

strRequest = "<?xml version='1.0' encoding='utf-8'?>" & vbCRLF & _
   "<s:Envelope>" & vbCRLF & _
   "<s:Body>" & vbCRLF & _
   "<u:Authenticate xmlns:u='urn:udi-com:service:X_Insteon_Lighting_Service:1'>" & vbCRLF & _
   "<name>admin</name>" & vbCRLF & _
   "<id>Password</id>" & vbCRLF & _
   "</u:Authenticate>" & vbCRLF & _
   "</s:Body>" & vbCRLF & _
   "</s:Envelope>" & vbCRLF

strRequest2 = "<?xml version='1.0' encoding='utf-8'?>" & _
   "<s:Envelope>" & _
   "<s:Body>" & _
   "<u:UDIService xmlns:u='urn:udi-com:service:X_Insteon_Lighting_Service:1'>" & _
   "<control>DON</control>" & _
   "<action></action>" & _
   "<flag>65531</flag>" & _
   "<node>1 31 CF 1</node>" & _
   "</u:UDIService>" & _
   "</s:Body>" & _
   "</s:Envelope>"

With xmlhttp
   .Open "post", strUrl, False
   .setRequestHeader "content-type", "text/xml; charset=utf-8"
   .setRequestHeader "SOAPAction", "urn:udi-com:device:X_Insteon_Lighting_Service:1#Authenticate"
   .send strRequest
   If .Status = 200 Then
      tf.writeline .responseXML.xml
   End If

   .Open "post", strUrl, False
   .setRequestHeader "content-type", "text/xml; charset=utf-8"
   .setRequestHeader "SOAPAction", "urn:udi-com:device:X_Insteon_Lighting_Service:1#UDIService"
   .send strRequest2
   If .Status = 200 Then
      tf.writeline .responseXML.xml

   End If
End With

tf.close
Set fso = Nothing
Set xmlhttp = Nothing


The first part of this tries to authenticate and the second attempts to turn on a light. The first includes line breaks after each section and the second sends it all on one line.

The first returns

Code: Select all

HTTP/1.1 402 OK
CONTENT-LENGTH: 0
Connection: Close
CONTENT-TYPE:text/xml
EXT:UCoS, UPnP/1.0, UDI/1.0
Last-Modified: Tue, 20 May 2008 20:58:5 GMT


The second returns

Code: Select all

HTTP/1.1 714 OK
CONTENT-LENGTH: 0
Connection: Close
CONTENT-TYPE:text/xml
EXT:UCoS, UPnP/1.0, UDI/1.0
Last-Modified: Tue, 20 May 2008 20:58:5 GMT


Not sure what these mean, but I can't even see them in the log I try to create, the only way I can capture it is with a packet sniffer.(wireshark) I'm going to post this over at the UDI forum as well to see if anyone can help.
Ben Drawbaugh

How good can it be, if it isn't HD?

bigDvette
Expert
Expert
Posts: 718
Joined: Thu Oct 12, 2006 12:19 pm
Contact:

Postby bigDvette » Tue May 20, 2008 9:06 pm

see if any of this info helps. I think your authentication message is not correct. I think if you are going to simply issue a command and exit you don't need to subscribe. Send a message to support@universal-devices.com and you can get the whole Web Services developer manual. just make sure you put that you know it may change in the body and put ws-sdk in the subject.

Location header info


try typing in - http://your.isy.ip.address/desc

you should get things like urlbase, udn, scpdurl, controlurl, eventsuburl ... you need for the below parts

4.0 Communicating with ISY
To successfully communicate with ISY, the following steps must be taken

1. Find ISY and retrieve its resources by parsing the contents of the
LOCATION header (see section 3)
a. Capture <controlURL> which should be the URL used for all the
subsequent Web Services invocations
b. Capture <eventSubURL> which should be the URL used for
subscribing/unsubscribing from ISY
c. Retrieve <__CU> to figure out what are the permissible
Control/Action values
d. Retrieve <__NU> to figure out what nodes/groups have already been
configured in ISY


2. Authenticate

POST /services HTTP/1.1
Host: 192.168.0.208:80
Content-Length: 167
Content-Type: text/xml; charset="utf-8"
SOAPACTION:"urn:udicom:
service:X_Insteon_Lighting_Service:1#Authenticate"
<s:Envelope><s:Body><u:Authenticate xmlns:u="urn:udicom:
service:X_Insteon_Lighting_Service:1"><name>admin</name><id>admin
</id></u:Authenticate></s:Body></s:Envelope>

3. Subscribe

SUBSCRIBE /eventing HTTP/1.1
Host: 192.168.0.208:80
Content-Length: 129
Content-Type: text/xml; charset="utf-8"
CALLBACK:<REUSE_SOCKET>
NT:upnp:event
TIMEOUT:Second-infinite
SOAPACTION:"urn:udicom:
service:X_Insteon_Lighting_Service:1#Subscribe"
<s:Envelope><s:Body><u:Subscribe xmlns:u="urn:udicom:
service:X_Insteon_Lighting_Service:1"></u:Subscribe></s:Body></s:
Envelope>

Note: you may provide a CALLBACK URL or you can keep this socket open
(REUSE_SOCKET) to receive ISY events
ISY Developer’s Manual : Web Services SDK- INSTEON
Universal Devices Inc.
Page - 20 -

4. Control odes/Scenes in ISY using UDIService
Simply provide the permissible values for <Control>, <Action>, and <Node>.
The <node> element is the address of the node/group to be impacted. The
<flag> element must be 4 if this is impacting a scene/group. Any other value
is considered a node and not a group/scene.

a. Turn Device Hall 2 On

POST /services HTTP/1.1
Host: 192.168.0.208:80
Content-Length: 210
Content-Type: text/xml; charset="utf-8"
SOAPACTION:"urn:udicom:
service:X_Insteon_Lighting_Service:1#UDIService"
<s:Envelope><s:Body><u:UDIService xmlns:u="urn:udicom:
service:X_Insteon_Lighting_Service:1"><control>DON</control><a
ction></action><flag>65531</flag><node>7 B0 A5
1</node></u:UDIService></s:Body></s:Envelope>


b. Turn Device Hall 2 On to 46%

POST /services HTTP/1.1
Host: 192.168.0.208:80
Content-Length: 213
Content-Type: text/xml; charset="utf-8"
SOAPACTION:"urn:udicom:
service:X_Insteon_Lighting_Service:1#UDIService"
<s:Envelope><s:Body><u:UDIService xmlns:u="urn:udicom:
service:X_Insteon_Lighting_Service:1"><control>DON</control><a
ction>117</action><flag>65531</flag><node>7 B0 A5
1</node></u:UDIService></s:Body></s:Envelope>

c. Turn Master Scene On Immediately (Fast On)

POST /services HTTP/1.1
Host: 192.168.0.208:80
Content-Length: 203
Content-Type: text/xml; charset="utf-8"
SOAPACTION:"urn:udicom:
service:X_Insteon_Lighting_Service:1#UDIService"
<s:Envelope><s:Body><u:UDIService xmlns:u="urn:udicom:
service:X_Insteon_Lighting_Service:1"><control>DFON</control><
action></action><flag>4</flag><node>34612</node></u:UDIService></s
:Body></s:Envelope>

bjdraw
Senior Member
Senior Member
Posts: 246
Joined: Thu May 24, 2007 4:55 pm
Contact:

Postby bjdraw » Wed May 21, 2008 8:32 am

It was right, the problem was that I needed to be running firmware version 2.6.1. This changed the contents of my URL so I changed strURL from

strUrl = "http://192.168.111.60:60160/0/c/"
to
strUrl = "http://192.168.111.60/services"

And now I can turn lights on!

Here's the link to the update instructions.
http://forum.universal-devices.com/viewtopic.php?t=930

Now for the fun part, trying to create variables from the subscribed function.
Ben Drawbaugh

How good can it be, if it isn't HD?

bjdraw
Senior Member
Senior Member
Posts: 246
Joined: Thu May 24, 2007 4:55 pm
Contact:

Postby bjdraw » Wed May 21, 2008 9:19 am

To make it easier for others to play, I edited my script so all you have to do is edit the first few variables with your own IP, username, password and light you want to try.

See attached.
You do not have the required permissions to view the files attached to this post.
Ben Drawbaugh

How good can it be, if it isn't HD?

bigDvette
Expert
Expert
Posts: 718
Joined: Thu Oct 12, 2006 12:19 pm
Contact:

Postby bigDvette » Wed May 21, 2008 5:42 pm

I'm made this in to a parameterized script and I have the UDI connect info stored in startup variables. I got this working myself.

I can't see you you get any current status information from the SDK documents I have. There is a ST control message, butwhen I issue it I don't get an XML response message.

bjdraw
Senior Member
Senior Member
Posts: 246
Joined: Thu May 24, 2007 4:55 pm
Contact:

Postby bjdraw » Wed May 21, 2008 5:57 pm

I wrote an ML script that is currently working to turn on scenes and devices.

I still want to add dimming etc.

Also, I just realized that since I already have MLELK and my ELK is connected to my ISY, I can also control the lights and get real time status information via that plug-in, but I'm thinking there still might be a need for a ISY plug-in for Elk.
Ben Drawbaugh

How good can it be, if it isn't HD?


Return to “Insteon”

Who is online

Users browsing this forum: No registered users and 1 guest