No announcement yet.

IR Scripts

  • Filter
  • Time
  • Show
Clear All
new posts

    IR Scripts

    I posted this question in a Forum which gets no attention. I hope this Forum is more appropriate. I purchased a USB-UIRT and have installed the plug-in for HS. Everything seems to work fine. I currently own a Pronto that is operating very well for me. I was thinking about purchasing some inexpensive universal remotes and programming them with codes for devices which I do not own (i.e. I own Sony TVs, I would program the universals with Mitsubishi TV codes). HS would grab the Mitsubishi code and then execute an appropriate macro using Sony codes. Has anyone tried this? Does it work? Is it slow? Is there a simple way to insert a pause into a macro or would I just chain two events?

    yes, but i wouldnt recommend it for anything else than larger events, not for channel surfing etc. because the info has to go through so many steps it is slow..

    universal remote > usbuirt > hs event with ir trigger & ir send > usbuirt > tv





      Thank you for your reply.

      As I was leaving for lunch I realized that I could generate pauses with VBScript, but after reading your reply, thought that a VBScript solution may be too slow. How do others put a pause in? (By way of example, I turn on the stereo, and want the stereo input to be the DVD player, but I have to wait until the stereo has fully turned on.) Do most folks do this with hs.waitsec (or whatever the syntax is) or stringing many non-real IR commands?

      In advance, thank you.



        Hi Tim,
        I've got the same setup here at my place and works great and has done more than just about anything else to raise my WAF. To watch digital cable you have to turn the TV on, set it to the right input, turn on the audio system, and set it to the right input. Not exactly the best way to make your wife happy. Now, she hits a button on the digital cable remote that doesn't really do anything which triggers an event in HS that does all of that stuff for us. It lets us use regular remotes that we already own to perform complex events that would normally be much more complicated.
        A couple pieces of advice for you for this project. Use hs.waitsecs x commands for pauses between commands if you need to. Also, try to get discrete IR commands for your equipment. What's discrete mean? Most remote controls have "power" buttons that turn your TV off if its on or on if its off. With discrete codes, you have an off command and an on command. If you run an event that sets everything up for you to watch a DVD (which, among other things turns your TV on) and then run a script to watch digital cable (which would normally turn your TV on) when it goes to turn your TV on it'll just turn it off when it sends the "power" command. Search to find codes for your equipment. Make sure you get power and input codes. If you can't find them, create a virtual device for your component as well as an event that is IR triggered by your power or input button and will switch that state that looks kind of like this.
        if hs.IsOn("R4") then hs.ExecX10 "R4","off" else hs.ExecX10 "R4","on"
        Just substitute R4 with whatever virtual device you create.
        Anyways, hope this helps and let me know if you have any more questions.


          Discretes and Virtual Devices


          Thank you for the advice. I have been using discretes for about four years with my Pronto. All of my equipment in the basement and all my TVs have discretes. I do have an older stereo that probably only has a toggle that I was going to put down in the basement. The virtual device set up you described will work nicely with it. Thank you for the advice on how to deal with it.

          I got my RF remote to fire off a macro to my DVD to play a specific movie last night. What a thrill as I start to realize some of the things that can be done.


            Hi Tim,
            Glad to hear things are going well for you. I thought I'd throw out one more idea for you that I've found to work pretty well here at my place. Have your pause and play buttons do stuff as well. What I mean is that, for example, when you hit the pause button on your DVD player have the lights in your viewing area come up and then go back down when you hit play. Play around with ideas like that and I think you'll be pretty happy.


              I do something very similar, but I use a dedicated PC which controls the home theater and talks to Homeseer to get certain control things done (e.g. Lighting, HVAC).

              The main input device in the theater is a Philips iPronto. The house has a dedicated IR network with receivers scattered around the house (generally built into the volume controls for whole house music). I picked up several credit card sized remotes which I leave scattered about.

              I only use one protocol on the iPronto and the remotes (which means the whole house), the NEC protocol. I did this beacuse there is a $50 receiver that completely decodes that one protocol that has been around for about 5 years. USB UIRT would do a similar thing. The NEC protocol has built in error checking (single bit error detection) and is simple to understand. the receiver I use provides the HEX values of the customer (device) code and the key code. On the non learnable credit card remoes, there is always several sets of NEC protocol since it is so common. I don't care which one it is as long as I don't use that device code currently (there are 2**16 possible device codes in the extended protocol and 2**8 in the full error checking version). I just try different code numbers until the PC recognizes one and tells me what it is. I then map all of the keys (button vs key code sent0.

              I can build Pronto IR sequences, Slinke IR sequences, etc for almost any device to enable me to control the device. I will not buy a device that does not have a discrete on/off code. USB UIRT accepts Pronto formatted IR sequences for transmission.

              Using Homeseer to handle the same task as my PC in the theater does is just a matter of writing scripts. On my PC there is a little mini language which I use. It reads tabled commands based upon what it saw as sent IR. The mini language allow for delays, looping, conditional testing, subroutines, variables, etc. Home seer scripting could do exactly the same thing either through hard code or build ing an interpreter to read tabled commands.

              I have been thinking about writing a plugin that would read the little mini language and execute the "IR scripts" based upon what IR command it saw or was called with. If there is interest I will think more seiously about it. All the code is basically done, It just needs to be ported. The theater PC is a little IBM laptop at 400 MHZ with 128 meg of RAM and it is geneally Idle so I am not worried about CPU load on homeseer, especially under 2.0