Main > Main Forum
Mounting TV in Cab
<< < (4/5) > >>
bkenobi:
I have an AHK script that runs at login.  Here's the pertinent details.

--- Code: ---  ;Start WinLIRC
  Run, C:\Emu\WinLIRC\winlirc.exe
 
  ;Turn on TV
  Run, c:\emu\winlirc\transmit JVC_AV-27230 PowerOn 9
  sleep, 3000
 
  ;Switch to Video-1
  Run, c:\emu\winlirc\transmit JVC_AV-27230 Video-1 9
  sleep, 1000
--- End code ---
This is not a perfect solution, but it works pretty well.  The problem I have is that sometimes the TV comes on but doesn't change to video1.  Sometimes it doesn't turn on, but that's pretty rare.  If I had a wired method, I would DEFINITELY go that way!

Good luck.
Justin:
Brilliant, thanks!    

By the way, do you know the correct usage/syntaxis for TRANSMIT.EXE?  I have found nothing online.  Obviously you are using it correctly, so can you share with me the instruction on how to properly use it in command line mode?    
"transmit.exe -?"
   does not yield any help....

Thanks!


--- Quote from: bkenobi on October 30, 2011, 03:55:54 pm ---I have an AHK script that runs at login.  Here's the pertinent details.

--- Code: ---  ;Start WinLIRC
  Run, C:\Emu\WinLIRC\winlirc.exe
  
  ;Turn on TV
  Run, c:\emu\winlirc\transmit JVC_AV-27230 PowerOn 9
  sleep, 3000
  
  ;Switch to Video-1
  Run, c:\emu\winlirc\transmit JVC_AV-27230 Video-1 9
  sleep, 1000
--- End code ---
This is not a perfect solution, but it works pretty well.  The problem I have is that sometimes the TV comes on but doesn't change to video1.  Sometimes it doesn't turn on, but that's pretty rare.  If I had a wired method, I would DEFINITELY go that way!

Good luck.

--- End quote ---
bkenobi:
I don't remember where I found the syntax.  I'll see if I can't locate something in my backups.  I forgot to include an important part, though.  You will also need a config file for transmit.exe to know what command to use.

JVC_AV-27230.cf

--- Code: ---#
# this config file was automatically generated
# using WinLIRC 0.6.5 (LIRC 0.6.1pre3) on Fri Sep 22 17:33:39 2006
#
# contributed by
#
# brand:             JVC_AV-27230
# model:             
# supported devices:
#

begin remote

  name  JVC_AV-27230
  bits            8
  flags SPACE_ENC|NO_HEAD_REP|CONST_LENGTH
  eps            30
  aeps          100

  header       8000  4000
  one           600   1600
  zero          600  550
  ptrail        600
  pre_data_bits   8
  pre_data       0xC0
  gap          40000
  toggle_bit      0


      begin codes
          PowerOn                  0x00000000000000B8
          PowerOff                 0x0000000000000058
          Video-1                  0x0000000000000088
      end codes

end remote



--- End code ---
bkenobi:
Ok, I found it hidden within the README file.   :cheers:


--- Code: ---WinLIRC

Please see

        http://winlirc.sourceforge.net

for information regarding this program.


transmit.exe was written by Scott Baily <baily@users.sourceforge.net>

usage: transmit remotename codename reps
reps is an optional number of times to repeat the code (default=0).

It is public domain, since the code is trivial.
Mainly it is an example of how to send commands to winLIRC
from your application.

transmit.cpp is the source code for transmit.exe
It uses only windows API functions so you should be able to
compile it with any win32 C++ compiler.  Just be should to include
the appropriate header file (#include <windows.h>).

To compile transmit.exe with MS VC++, create a "simple win32 application"
then use this code as the main program.


If you're not interested in modifying the program the only interesting files are:

winlirc.exe

transmit.exe (optional) commandline program to tell winlirc to transmit a code

*.cf (configuration files for remotes)

--- End code ---

So, the syntax is:

transmit remotename codename rep

You have to give the .cf file name which is the definition for the remote you are using for your TV.  The codename is what you have defined in the begin codes...end codes section.  Rep is the number of times you want the code sent.  Since IR isn't perfect, it's typical to repeat the code a few times.  I think the max is 9 times.
Justin:
Thanks you, are a gentleman and a scholar :)

Well, I just checked and my particular TV is not yet deciphered on the LIRC site.  I looked all over the web for remote codes for my TV, and nothing came back.  I obviously need the raw hex codes from what I can see.   I will see what I can figure out.  This is very good info thank you!
Navigation
Message Index
Next page
Previous page

Go to full version