PDA

View Full Version : a seperate programe to send a girder ir code



scag
August 6th, 2006, 02:53 PM
have have searched through the forums for; command line, payload string, event strings but i just dont understand. I am very sorry..

I am trying Girder V4 with a USB-UIRT device.
I have created a .gml file called Matsui (this is the make of the freeview box i need to change the channel number)
I have created a 'group' called controls
I have created 10 'USB-UIRT Actions' (Button 1, Button 2... Button 0)
in each action i have learnt the equivalent button on the remote control. I can press F5 to test and they all do change the channel on the Matsui freeview box.

I need via a seperate programe (this maybe a DOS batch file or a VB6 programe) to send the USB-UIRT Actions

the help pages refer to the event.exe and gives this example. also other forum posts refer to event.exe but i am lost what each of the parameters mean...

"C:\Program Files\Promixis\Girder\event.exe" MyEvent
"C:\Program Files\Promixis\Girder\event.exe" MyEvent 1000 "Parameter One"
"C:\Program Files\Promixis\Girder\event.exe" MyEvent 18 -verbose
"C:\Program Files\Promixis\Girder\event.exe" MyEvent 18 one two three -verbose

Please could someone breakdown this example so that i can understand and equate it to my example?????

I do hope this makes sense
Many thanks
Mike :o)

Rob H
August 6th, 2006, 03:46 PM
If you open a command window in the Girder directory, then just type
event and you'll get the built-in help for the Event command.

scag
August 7th, 2006, 04:49 AM
Hello Rah99
please forgive me to what must seem such a simple thing to yourself but the penny just has not dropt for me with using girder!!!

You say...

If you open a command window in the Girder directory, then just type

event

and you'll get the built-in help for the Event command.

which you get this....

Girder 4 Event Client 1.0a
Copyright 2002,2003,2004,2005 (c) Promixis, LLC

-[Usage]------------------------------------------------------------------------

event <eventstring> [device=18] [payload1] [payload2] [payload3] [-verbose]

-[Example]----------------------------------------------------------------------

To simply send an event without any windows opening do this:

event hello

Press [enter] to exit.


Ok for each of the 10 USB-UIRT Actions if i add an event (lets name them KEY1, KEY2.. KEY0) and in each event i learn the remote. is it that <eventstring> that i include in the event.exe parameter e.g.
event 1700008280CD device=75
or
event KEY1 device=75
I have tried many variations but have no response from the USB-UIRT but when using the -verbose it says "Event sent successfully."

What would the payload's be???

Once again please forgive me for what must seem as being thick but the examples do not explain themselves, or thats what it seems to me. Sorry!
Many thanks
Mike :o)

Rob H
August 7th, 2006, 06:25 AM
The simplest thing would be to just call the events key1, key2 etc.

Open the logger window in Girder and send the key1 event using event.exe - it should appear in the logger window. You can drag it from there to the action that has your learned IR code. The next time you send the key1 event it should transmit the IR code.

I wouldn't worry about the payloads for the moment, lets just get this bit working.

scag
August 7th, 2006, 07:36 AM
ooops duplication of next post

Many thanks
Mike :o)

scag
August 7th, 2006, 07:43 AM
ah ha!!!!

I did this

Open the logger window in Girder and send the key1 event using event.exe - it should appear in the logger window. You can drag it from there to the action that has your learned IR code. The next time you send the key1 event it should transmit the IR code.

I ended up with two events named "key1" for the Button1 USB-UIRT Action.
When i looked at the differences between the two events (the one i created and the one copied over from the logger window)
My event i had the fields as such...

Event Device: Predefined Events (all remotes)
Event String: 1700008280CD
The event that was copied from the logger window contained...

Event Device: Girder Events
Event String: key1

Knowing the required inputs in each event i manually created an event for each Action ... and ... it worked!!!!

The logger window shows...

Time Date Source Details Payloads
13:18:22:750 8/7/2006 TaskSwitch girder.exe
13:18:17:843 8/7/2006 Button 6 IR Command Sent.Matsui.gml:\Controls\Button 6
13:18:17:656 8/7/2006 Girder key6
13:18:12:562 8/7/2006 TaskSwitch cmd.exe
13:18:12:484 8/7/2006 TaskSwitch girder.exe

I will do more testing before i write it into my VB6 programe. I use Digiguide and have a Hauppauge PVR USB2 connected to a freeview box. My add-in (PVRecord V3) communicates between the software and hardware now using USB-UIRT & Girder.
If you think i still am doing something wrong please do advise

Many thanks
Mike :o)

PS
how can girder send two or maybe three events eg key1 & key1 = 11 or key1 & key2 & key5 = 125?? this is so i then can change the channel to 11 or 125 for example.
can this be done in girder or must i create (for example) a DOS batch file with...
event key1
event key1
or
event key1
event key2
event key5

scag
August 7th, 2006, 08:05 AM
ok
I created two USB-UIRT Actions. The first named Button 12a and it had the learned IR for the remote button 1. The second named Button 12b (for clarity) and it had the learned IR for the remote button 2. The second Action needs a delay (200ms).

For each Action i added an event with the event string of key12.
useing event.exe

event key12

my freeview box changes channel to number 12!!!!!!!
I gather this process would work for three digits.
This seams a very complicated method especially if i want to encourage other people who may be using my PVRecord, Girder and USB-UIRT.
Is there a more simpler method using girder? Another way is just set up in girder the 10 buttons (as i first did) and my software joins up the numbers when needed?????

Many thanks
Mike :o)

Rob H
August 7th, 2006, 08:41 AM
Now we're getting on to payloads :)

You'd change your event call to something like


event channel 123

Then you'd have a script action with the following script :-


for digit in string.gfind(pld1, '(%d)') do
gir.TriggerEvent('Key'..digit, 18)
end

For the example given above this will trigger the events Key1, Key2 and Key3 in order.

You will probably find that this will fail if you have repeated digits e.g. for channel 111, so you will need to introduce a delay. The easiest way to do this is to create a macro and add a delay to it (drag a Flow control/Wait from the actions tree, and set the delay to around 200 ms - don't check the checkbox). Make 10 copies of this macro, and drag the USB-UIRT actions into each macro, then drag the event so that it is attached to the macro rather than the action. You may also want to rename the macros so that it's more obvious what they do.

I hope that makes sense.

scag
August 8th, 2006, 03:35 PM
Hello

ok (boy what a big learning curve)
In my group 'controls' i have added a scripting action. This is the first option in the action tree, yes??

I add what you said to add...

for digit in string.gfind(pld1, '(%d)') do
gir.TriggerEvent('Key'..digit, 18)
end
... and name this action 'channel'.

From the command line i type (as you said)...

event channel 123
but nothing!!!!

logger window shows...

Time Date Source Details Payloads
21:30:06:312 8/8/2006 TaskSwitch girder.exe
21:30:03:765 8/8/2006 channel
21:30:01:578 8/8/2006 TaskSwitch cmd.exe

The event screen via -verbose shows...

Girder 4 Event Client 1.0a
Copyright 2002,2003,2004,2005 (c) Promixis, LLC

-[Options]---------------------------------------

EventString: channel
Device : 123

-[Result]----------------------------------------

Event sent successfully.

Press [enter] to exit.


Have i missed something?? I know you go on to explaining to add a delay but i wanted to get this part working first.
Many thanks
Mike :o)

Rob H
August 8th, 2006, 03:58 PM
Good so far, but you need to drag the channel event from the logger onto that script action

scag
August 8th, 2006, 05:17 PM
ok
to cut the story short i had problems.

first i did not realise that the code you gave (i cut&paste) the k was a capital and my events are named with a lower case k.

second i have it working (ish) but its the event line that is wrong
and the channel event was wrong

the channel event should contain the fields as such...
Event Device: Raw: USB-UIRT driver
Event String: channel

the event line should be
event channel 75 123

75 is the USB-UIRT device number. 123 is the channel number.

I think this does work now, but as you said does have problems without a delay. I can not 'drag the USB-UIRT actions into each macro'. I get the cursor icon (circle with a diagonal line) in it?????

I did try increasing the wait value (to 200ms) in each USB-UIRT Action, but did not work
Many thanks
Mike :o)

Rob H
August 9th, 2006, 08:31 AM
You don't need to use device number 75 for an event sent from event.exe - I'd just stick to the default (device 18, girder itself).

I'm not sure why you're having problems with dragging the USB-UIRT actions to the macro, you'll certainly get the cursor you describe when you start dragging, but once you've moved the mouse over the macro it should change to a pointer with a box.

scag
August 10th, 2006, 12:12 PM
Hi Rah

I have it working (in theory) now. The reason for the problems was my learning curve. I had used Macro Events (shift+F6) where now i understand it should have been Macro Groups (shift+F3)

So what i have now is....
Matsui.gml
Control (group)
L channel (script)
L channel (event)
L MacroBtn1 (Macro group for button 1)
L key1 (event)
L wait (flowcontrol wait action)
L Button 1 (USB-UIRT Action)
L MacroBtn2 (Macro group for button 2)
L key2 (event)
L wait (flowcontrol wait action)
L Button 2 (USB-UIRT Action)
etc for button 3,4,5,6...0

Also i am using device 18 in the event statement.

The problem now is getting the freeview box (STB) to change to a channel of 2 or 3 digits. I might be lucky sometimes to get a 2 digit to be sent to the STB but mostly one 1 digit out of the 2 digits sent only get recorded. It would be the second e.g. 12 sent, 2 would be shown on the STB.

I wonder is this anything to do with the remote control having two IR code per button. Also when the USB-UIRT Action learns the remote to send I get an inconsistant number of different codes e.g.
button one
1 - 0000 0072 0000 000C 0020 0021 0040 0021 0020 0041 0040 0021 0020 0021 0020 0021 0020 0021 0020 0021 0020 0021 0020 0021 0020 0041 0020 0CAC
2 - 0000 0072 0000 000C 0020 0021 0040 0021 0020 0041 0040 0021 0020 0021 0020 0021 0020 0021 0020 0021 0020 0021 0020 0021 0020 0041 0020 0CAD
3 - 0000 0072 0000 000C 0020 0021 0040 0021 0020 0041 0040 0021 0020 0021 0020 0021 0020 0021 0020 0021 0020 0021 0020 0021 0020 0041 0020 0CAC
4 - 0000 0072 0000 000C 0020 0021 0020 0021 0040 0041 0040 0021 0020 0021 0020 0021 0020 0021 0020 0021 0020 0021 0020 0021 0020 0041 0020 0CAE

button two
1 - 0000 0072 0000 000B 0020 0021 0020 0021 0040 0041 0040 0021 0020 0021 0020 0021 0020 0021 0020 0021 0020 0021 0020 0041 0040 0CCF
2 - 0000 0072 0000 000B 0020 0021 0040 0021 0020 0041 0040 0021 0020 0021 0020 0021 0020 0021 0020 0021 0020 0021 0020 0041 0040 0CCF
3 - 0000 0072 0000 000B 0020 0021 0020 0021 0040 0041 0040 0021 0020 0021 0020 0021 0020 0021 0020 0021 0020 0021 0020 0041 0040 0CCE
4 - 0000 0072 0000 000B 0020 0021 0020 0021 0040 0041 0040 0021 0020 0021 0020 0021 0020 0021 0020 0021 0020 0021 0020 0041 0040 0CCE

button zero
1 - 0000 0072 0000 000C 0020 0021 0040 0021 0020 0041 0040 0021 0020 0021 0020 0021 0020 0021 0020 0021 0020 0021 0020 0021 0020 0021 0020 0CCB
2 - 0000 0072 0000 000C 0020 0021 0040 0021 0020 0041 0040 0021 0020 0021 0020 0021 0020 0021 0020 0021 0020 0021 0020 0021 0020 0021 0020 0CCF
3 - 0000 0072 0000 000C 0020 0021 0020 0021 0040 0041 0040 0021 0020 0021 0020 0021 0020 0021 0020 0021 0020 0021 0020 0021 0020 0021 0020 0CD0
4 - 0000 0072 0000 000C 0020 0021 0040 0021 0020 0041 0040 0021 0020 0021 0020 0021 0020 0021 0020 0021 0020 0021 0020 0021 0020 0021 0020 0CCF

Does the STB require a rotational IR signal received for each button???
Any ideas???
Many thanks
Mike :o)

PS on a side note/question have you or anyone else know of an 'IR 13 amp plug'?? The ones i know off are not IR but RF!!! As i wish to have my USB-UIRT turn on devices so that they do not need to be on standby mode.

Rob H
August 10th, 2006, 03:46 PM
Oh, that doesn't sound good - I hate remotes like that.

Not sure what to suggest as a solution. What model STB is it?

scag
August 11th, 2006, 09:06 AM
Hi Rah (Sorry, Hi Rob!)

I have a MATSUI Freeview DTR1 STB

Any ideas???
Mike :o

Rob H
August 11th, 2006, 10:35 AM
To be honest I'd probably recommend replacing the Freeview box!

Before you do that, I'd suggest that you put new batteries in the remote and try learning the commands again to see if you can get a consistent result.