iRed2 users, UNITE!

Posted on
Mon Aug 30, 2010 2:28 am
tinbert offline
Posts: 18
Joined: Mar 11, 2006
Location: Falkensee, Germany

Re: iRed2 users, UNITE!

To me it looks like the command RemoteControl("Sony/Tuner", "1", "Enter") takes one argument too much and ricks' AppleScript does not handle this. (Maybe I missed an AppleScript trick?)
So it should help to issue two calls RemoteControl("Sony/Tuner", "1") and RemoteControl("Sony/Tuner", "Enter")

You should put a delay 0.1 between both commands, too.

Cheers, Robert (tin:b Software)

tin:b Software - maker of iRed*

Posted on
Mon Aug 30, 2010 8:38 pm
hamw offline
Posts: 1212
Joined: Mar 31, 2008

Re: iRed2 users, UNITE!

Got it all working, thanks for your help. The script I was trying was close but not quite right for my use. Here's the working script:

Code: Select all
-- This script sends commands to iRed
-- See iRed2Indigo script for reverse
using terms from application "IndigoServer"
   
   on RemoteControl(TheRemote, TheDevice, irCode)
      with timeout of 3 seconds
         try
            tell application "iRed2" to perform action Code irCode of Device TheDevice of Remote TheRemote
         on error
            tell application "IndigoServer"
               log "Error - Could not transmit to iRed2 --> Device: " & TheDevice & ", code: " & irCode using type "iRed:"
            end tell
            
         end try
      end timeout
   end RemoteControl
   
end using terms from


The command structure to send the sony tuner a command, for instance "preset 2" then "enter", is
Code: Select all
RemoteControl("Sony Tuner", "Sony/Tuner", "2")
RemoteControl("Sony Tuner", "Sony/Tuner", "Enter")


Much appreciate your advice.

Posted on
Fri Oct 15, 2010 6:26 am
FaTMax offline
Posts: 134
Joined: Feb 01, 2007
Location: Haugesund, Norway

Re: iRed2 users, UNITE!

To further explain what i did, well of some sort, heres a picture:

Image

I cant remember excactly what i did, but it worked none-the-less. I added triggers for every IR code, empty ones. That seemed to do the trick!

Try it and let me know!

Posted on
Mon Oct 18, 2010 3:25 am
tinbert offline
Posts: 18
Joined: Mar 11, 2006
Location: Falkensee, Germany

Re: iRed2 users, UNITE!

FaTMax,
I don't think that your trick with empty triggers is necessary for iRed2 to work.
What I assume: you have copied the (Motorola) IR codes to the triggers, and so they are copied to the "Library" as well. From now on you can access the codes via AppleScript with a shorter line of code, i.e. without the "of Remote 'XXX'" part.

Cheers, Robert

tin:b Software - maker of iRed*

Posted on
Sat Dec 18, 2010 3:57 pm
ckeyes888 offline
Posts: 2417
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: iRed2 users, UNITE!

Hey,

I'm running Hamw's iRed2 attachment script above and using this command as an action in Indigo:

RemoteControl("Panasonic", "TV", "On")

which does not work. I've tried a number of variations but no joy.

The IRtrans sends the signal out just fine from iRed2, just seemingly no connection to Indigo.
This the error in the Event window: iRed: Error - Could not transmit to iRed2 --> Device: TV, code: On

Any help?

Thanks,

Carl

Posted on
Sat Dec 18, 2010 8:38 pm
ckeyes888 offline
Posts: 2417
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: iRed2 users, UNITE!

Been trying variations of this approach as well with no luck:


tell application "iRed2" to perform action Code "On" of Device "TV" of Remote "Panasonic"

Should anyone have a simple "tell" command that may work I'd sure appreciate it!

Carl

Posted on
Mon Dec 20, 2010 3:27 am
tinbert offline
Posts: 18
Joined: Mar 11, 2006
Location: Falkensee, Germany

Re: iRed2 users, UNITE!

There are several examples on my website. Please visit AppleScritping iRed2.

Regards,
Robert

tin:b Software - maker of iRed*

Posted on
Mon Dec 20, 2010 1:32 pm
ckeyes888 offline
Posts: 2417
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: iRed2 users, UNITE!

Thanks Robert, got it all working.

Carl

Posted on
Wed Jan 26, 2011 12:48 pm
ckeyes888 offline
Posts: 2417
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: iRed2 users, UNITE!

Curious if anyone is using an USB IRTrans iRed2 with an external emitter connected to the mini 8 plug?

I just tried one and it would seem that the AppleScript commands I'm sending from Indigo are defaulting
to the internal emitter on the IRTrans. I have iRed set to send commands to the ext emitter which works fine
when sent from within iRed. Is it possible that I have to modify my code I'm sending from Indigo to tell
iRed to use the ext emitter regardless of the iRed setting?

Thanks,

Carl

Posted on
Thu Jan 27, 2011 2:03 am
tinbert offline
Posts: 18
Joined: Mar 11, 2006
Location: Falkensee, Germany

Re: iRed2 users, UNITE!

ckeyes888 wrote:
Curious if anyone is using an USB IRTrans iRed2 with an external emitter connected to the mini 8 plug?

I just tried one and it would seem that the AppleScript commands I'm sending from Indigo are defaulting
to the internal emitter on the IRTrans. I have iRed set to send commands to the ext emitter which works fine
when sent from within iRed. Is it possible that I have to modify my code I'm sending from Indigo to tell
iRed to use the ext emitter regardless of the iRed setting?

Thanks,

Carl


For example:

Code: Select all
tell application "iRed2" to perform action Code "Power" of Device "Sony/Amp" using led "external"


or

Code: Select all
tell application "iRed2" to perform action Code "0" of Device "Dish/Satellite" of Remote "TV" using led "2"


Cheers, Robert

tin:b Software - maker of iRed*

Posted on
Thu Feb 03, 2011 5:15 pm
hamw offline
Posts: 1212
Joined: Mar 31, 2008

Re: iRed2 users, UNITE!

ckeyes888 wrote:
Thanks Robert, got it all working.

Carl


Carl, how did your solution differ from the others? Seems like everyone needs something slightly different?

Robert, how would I modify my above applescript if I wanted iRed to receive codes and then send actions to Indigo? For convenience,, I've programmed IR remotes around the house to send commands to my tuner independently of Indigo/iRed. These remotes emit the same command that iRed sends when an Indigo command is sent. I'd like iRed to receive the command and update the appropriate Indigo variables.

Posted on
Fri Feb 04, 2011 12:52 am
ckeyes888 offline
Posts: 2417
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: iRed2 users, UNITE!

The only problem I was having was not using the remote name I use in iRed correctly.
I was trying: RemoteControl("Panasonic", "TV", "On")
which needed to be: RemoteControl("My Codes", "Panasonic/TV", "On")

All works very nicely now except iRed seems to forget the IR triggers I trained it
to trigger Applecripts for Indigo when I restart iRed.

I setup a Harmony One remote to trigger Indigo to setup my AV stuff.

Carl

Posted on
Tue Feb 08, 2011 9:45 am
tinbert offline
Posts: 18
Joined: Mar 11, 2006
Location: Falkensee, Germany

Re: iRed2 users, UNITE!

hamw wrote:
...
Robert, how would I modify my above applescript if I wanted iRed to receive codes and then send actions to Indigo? For convenience,, I've programmed IR remotes around the house to send commands to my tuner independently of Indigo/iRed. These remotes emit the same command that iRed sends when an Indigo command is sent. I'd like iRed to receive the command and update the appropriate Indigo variables.


If you have IR codes on your iRed2 and the AppleScripts to control Indigo, you only have to put these together in an IR Code Trigger. There are several hints in the manual on how to enable a trigger.
In short: goto main window, open "Trigger" section, select "IR Codes", open Editor drawer, add trigger, drag&drop IR Code, drag&dtop AppleScript, done.

R.

tin:b Software - maker of iRed*

Posted on
Tue Feb 08, 2011 9:50 am
tinbert offline
Posts: 18
Joined: Mar 11, 2006
Location: Falkensee, Germany

Re: iRed2 users, UNITE!

ckeyes888 wrote:
...
All works very nicely now except iRed seems to forget the IR triggers I trained it
to trigger Applecripts for Indigo when I restart iRed.


Wait. The trigger is listed in the triggers list, it works, then you restart iRed and the trigger is vanished? That would be a massive bug, would'nt it? I have no clue why this happens to your iRed. Any details?

R.

tin:b Software - maker of iRed*

Posted on
Wed Feb 09, 2011 12:52 am
ckeyes888 offline
Posts: 2417
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: iRed2 users, UNITE!

The triggers are still there after a restart of iRed it's just that they stop working after a day or two.
I can get them working again if I reset them up. Very odd.

Thanks,

Carl

Who is online

Users browsing this forum: No registered users and 4 guests