Jump to content

Can I run a program based on receiving a network message using Networking Module?


blueman2

Recommended Posts

Posted (edited)

The documentation on the networking module is rather sparse.  Does anyone know if the module allows you to trigger a program based on receiving a network command from another device (in my case, an IP camera program called iSpy which can send messages via http)?   

Edited by blueman2
Posted (edited)

Sure. Use the REST API.

 

Create your program, then go to the Summary view (Programs tab, then Summary tab). Look for the ID of your program (right-most column).

 

To run a program with ID 002e, on a controller at IP address 1.2.3.4, for example:

 

    http: //userid:password@1.2.3.4/rest/programs/002e/run

 

(Remove the space after the colon, I put it there to keep the forum from truncating the URL...)

 

I have  a strange application for this. I use the ISY to maintain a variable with the on/off state of my cable box. Because my cable box is a stupid one that only has a "toggle" power function. (You can't command it specifically "on" or "off"...) The cable box is controlled by an IP-connected IR emitter. I use Roomie Remote (iPhone/iPad AV remote app) and it can send HTTP messages. And, so, to have Roomie Remote turn the cable box on or off, it runs a program on the ISY, and the program on the ISY turns the cable box on or off...

Edited by jtara92101
Posted

Neat!!  And I guess I do not even need the networking module in this case, right?  

 

Thanks.  And you have just made me think about about a half dozen other uses for this cool trick.  

 

 Blueman2

 

 

Sure. Use the REST API.

 

Create your program, then go to the Summary view (Programs tab, then Summary tab). Look for the ID of your program (right-most column).

 

To run a program with ID 002e, on a controller at IP address 1.2.3.4, for example:

 

    http: //userid:password@1.2.3.4/rest/programs/002e/run

 

(Remove the space after the colon, I put it there to keep the forum from truncating the URL...)

 

 

Posted

Correct, REST API doesn't need the network module.

 

However, my example above does, because my program has to access an IR emitter using HTTP. (I don't use the ISY IR option. I have a Global Cache' iTach IP2IR that has emitters on the A/V equipment (at least those components that don't have their own IP control).

 

So, really, just using the ISY as an intermediary between IP devices.

 

I also switch surround speakers between two rooms using an A/B speaker switch on one of the IR channels of the IP2IR. (wired, actually, but uses IR protocol). This speakers are switched based on Insteon lighting scenes. ("TV" or "Dine" scenes - screen can be swiveled between living room and dining room). In this case, if I want to use Roomie, it just changes the lighting scene, and then the speaker switch follows.

Guest
This topic is now closed to further replies.

×
×
  • Create New...