Jump to content

HowTo: make discrete power commands for a power toggle


jtara92101

Recommended Posts

Some IR-controlled devices (notoriously, Scientific-Atlanta cable boxes) only have a power toggle. They do not have "discrete" on and off commands. This wrecks havoc when using activity-based remotes. (I'm using Roomie Remote on my iPad).

 

Remote control solutions that use a central server can keep track of this on the server for multiple remotes. Single remote solutions can/could track power state, assuming they are the only remote used, but often don't or don't in all circumstances. I've seen solutions involving a little server running on a PC, but when you have an isy99, that seems overkill, doesn't it?

 

My configuration: iTach ip2IR (Ethernet to IR adapter) with an emitter on my Scientific-Atlanta 8240HDC cable box. isy99 also on my Ethernet. Roomie Remote on my iPad. Network Module installed on the isy99.

 

First, I created a network resource to toggle the 8240 power, 8240HDC.Toggle: TCP, (host address), Port 4998, Timeout 500mSec, C Escaped. The body is my IR command to the IP2IR:

 

sendir,1:2,1,58000,1,1,192,192,48,145,48,145,48,48,48,145,48,145,48,145,48,145,48,145,48,48,48,48,

48,48,48,48,48,48,48,145,48,48,48,48,48,48,48,48,48,48,48,145,48,145,48,145,48,2146\r\n

 

This sends the power toggle code for the 8240. Of course, you should substitute this with the correct code if you have a different device.

 

Then, I set-up three disabled programs. They have to be disabled, you only want them to run when they are explicitly executed.

 

8240.On? is an empty program. It's used to keep track of the state of the cable box. It's poorly documented, but running the "then" of a program sets it's state to true, running the "else" sets it's state to false. So, you can use an empty program to track an on/off state.

 

8240.On

 

If 
 Program '8240.On?' is False
Then
 Run Program '8240.On? (Then Path)
 Resource '8240HDC.Toggle'
Else
 - No Actions

 

8240.Off

 

If
 Program '8240.On? is True
Then
 Run Program '8240.On? (Else Path)
 Resource '8240HDC.Toggle'
Else
 - No Actions

 

Now you have discrete On/Off commands for the cable box! 8240On first checks to see if the cable box is already on (state of 8240On? is true). If it is, it does nothing. If it's off, then it sends a toggle. 8240Off does vice-versa.

 

To integrate this into my remote (Roomie Remote on iPad) I used URL commands in the remote:

 

http://userid:password@10.0.1.5/rest/pr ... 002e/runIf (for on)

 

(substitute your ISY address for 10.0.1.5)

 

You first have to lookup the hex codes for the programs using:

 

http://10.0.1.5/rest/programs

 

In my case 002e is 8240.On, and 002f is 8240.Off.

 

http://10.0.1.5

 

Edit: the 8240.On and 8240.Off programs MUST be in the root folder of your programs, or they will not be seen by the REST interface!

Link to comment

Archived

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


  • Recently Browsing

    • No registered users viewing this page.
  • Forum Statistics

    • Total Topics
      36.9k
    • Total Posts
      370.3k
×
×
  • Create New...