Author |
|
moniputer Groupie
Joined: October 27 2006 Location: United States
Online Status: Offline Posts: 44
|
Posted: March 16 2009 at 00:06 | IP Logged
|
|
|
I am receiving IR codes from a USBUIRt and call a macro from a trigger.
Does the IR code or the button defined get passed to the macro?
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: March 16 2009 at 08:26 | IP Logged
|
|
|
You define the button to PH and the code is recorded in the data field. When setting the IR Device you tell it how many buttons you want. In a macro you specify what button(s) to execute.
__________________ Pete - X10 Oldie
|
Back to Top |
|
|
moniputer Groupie
Joined: October 27 2006 Location: United States
Online Status: Offline Posts: 44
|
Posted: March 16 2009 at 10:40 | IP Logged
|
|
|
Thanks BeachBum.
I have that part done now I am looking for the code/button that was received from a remote. I want to trigger a macro on any IR input and have the macro take action based upon which button was pressed.
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: March 16 2009 at 11:14 | IP Logged
|
|
|
Yep, should be available. The IR device ID will be in the [TEMP7] variable. If the trigger is defined with the specific IR code in the "Trigger ID Number" field, then this IR Keynumber (Key # / 10 in the IR Details screen) will be in the [TEMP8] var. IF the Trigger ID Number is "Any", then the Key # / 10 will be in [TEMP4].
Dave.
|
Back to Top |
|
|
grif091 Super User
Joined: March 26 2008 Location: United States
Online Status: Offline Posts: 1357
|
Posted: March 16 2009 at 11:17 | IP Logged
|
|
|
Add this as a User Message line in your macro. For a trigger that is fired from an Insteon In which invokes a Macro, variables TEMP1-10 have the information about what caused the trigger to fire, device ID, button number, command, etc. Don't know what the variables will have for an IR trigger but they may have what you need.
"Variables: TEMP1=" + ph_getvar_s(2,1) + " TEMP2=" + ph_getvar_s(2,2) + " TEMP3=" + ph_getvar_s(2,3) + " TEMP4=" + ph_getvar_s(2,4) + " TEMP5=" + ph_getvar_s(2,5) + " TEMP6=" + ph_getvar_s(2,6) + " TEMP7=" + ph_getvar_s(2,7) + " TEMP8=" + ph_getvar_s(2,8) + " TEMP9=" + ph_getvar_s(2,9) + " TEMP10=" + ph_getvar_s(2,10)
Sorry Dave, we overlapped.
Edited by grif091 - March 16 2009 at 11:19
__________________ Lee G
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: March 16 2009 at 12:03 | IP Logged
|
|
|
Since all my IR goes out I tried to test the above scenario. I set the trigger for IR in, Device, (Any), (Any),1 and then pressed 1 on the remote the trigger didn’t fire. This should be elementary, so what am I missing?
__________________ Pete - X10 Oldie
|
Back to Top |
|
|
grif091 Super User
Joined: March 26 2008 Location: United States
Online Status: Offline Posts: 1357
|
Posted: March 16 2009 at 12:13 | IP Logged
|
|
|
Pete, do you see an IR event in the Event Log? Would think this would be a prerequisite for a trigger to fire based on the type of event.
__________________ Lee G
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: March 16 2009 at 13:20 | IP Logged
|
|
|
Sure don’t Lee and I don’t know of any other traces to check. The outgoing works fine so I assumed the inbound would also work. The USB_UIRT receives the signal as it has been previously recorded with no problem.
__________________ Pete - X10 Oldie
|
Back to Top |
|
|
grif091 Super User
Joined: March 26 2008 Location: United States
Online Status: Offline Posts: 1357
|
Posted: March 16 2009 at 14:13 | IP Logged
|
|
|
Unless it is a missing IR In check box that is preventing the inbound IR from being traced in the Event Log, the issue must be between the IR controller and PowerHome rather than the trigger itself. Trigger is not firing because PH is not seeing the event. Unfortunately I have no IR stuff under PH to draw on for comparison.
EDIT: There have been discussions under Smarthome forum about an XP driver update that was causing some issues with USB based PLMs. Did Microsoft install any driver updates lately.
Edited by grif091 - March 16 2009 at 14:16
__________________ Lee G
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: March 16 2009 at 14:38 | IP Logged
|
|
|
You'll also want to check that you've stored "incoming" IR codes under your IR devices. By default, the USB-Uirt does not store or respond to incoming codes unless you've checked "Enable Remote Control" under the Settings window of the USB-Uirt controller.
HTH,
Dave.
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: March 16 2009 at 14:48 | IP Logged
|
|
|
Well I was in the middle of writing a long description at the same time playing with the “Remote Control” when you posted… Thanks Dave now I can go forward. I knew it was something simple.
__________________ Pete - X10 Oldie
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: March 16 2009 at 15:04 | IP Logged
|
|
|
I guess I spoke too soon, The Event Log is showing the signal coming in but the Trigger is not firing. Trigger values are IR in, DEVICE, (Any), Received, 1. Controller settings are Type-UIRT Raw, Enable Remote Control, Record T/O 10000, Remote Control T/O 200, Repeat 4. Did a ReInit.
__________________ Pete - X10 Oldie
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: March 16 2009 at 15:40 | IP Logged
|
|
|
Pete,
Do you have values under the "Incoming Code" column under the IR device details? Now that you've got incoming events firing, does the incoming code in the log match any of the "Incoming codes"?
Dave.
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: March 16 2009 at 15:52 | IP Logged
|
|
|
Well that’s real interesting. I took one of those codes and stuck it in. How would one find these codes other than pulling them from the Log?
__________________ Pete - X10 Oldie
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: March 16 2009 at 17:00 | IP Logged
|
|
|
The codes are generated automatically during the IR learn process "but" only if you had "Enable Remote Control" checked when you learned the codes.
If you're wanting to start making use of IR In triggers on multiple codes, you're probably best just relearning the IR codes for the device. If you just want a few, then you could copy/paste from the log or just re-learn the ones you're interested in.
Dave.
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: March 16 2009 at 17:07 | IP Logged
|
|
|
Thanks for the input Dave. During the whole process I was trying to figure out what tied the triggering together.
__________________ Pete - X10 Oldie
|
Back to Top |
|
|
moniputer Groupie
Joined: October 27 2006 Location: United States
Online Status: Offline Posts: 44
|
Posted: March 16 2009 at 21:38 | IP Logged
|
|
|
Thanks guys! Everything is working now.
Dave - Is the Remote Key Description available?
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: March 21 2009 at 22:57 | IP Logged
|
|
|
Hmmm...its not...but it will be in the next version...very easy to add it.
In the meantime, you should be able to get it with the following formula:
ph_sql_s("select key_desc from ir where id = '[TEMP7]' and key_number = [TEMP4]")
[TEMP4] may need to be changed to [TEMP8] depending upon the form of trigger you use.
Dave.
|
Back to Top |
|
|