Dangerous Prototypes

Dangerous Prototypes => USB Infrared Toy => Topic started by: Schmurtz on December 22, 2015, 04:05:30 pm

Title: My IRToy Experience for my Home Theatre (Windows)
Post by: Schmurtz on December 22, 2015, 04:05:30 pm
My Objectives were to power on my logitech z-5500 speakers and my projector in only one key on my RF remote.

In first it wasn't easy to make  all the button of my RF remote work. I use low level USB analyse with Auto IT, I've made a post about it here : forum.kodi.tv/showthread.php?tid=247121

Then I tried to make a batch script to use my IRtoy, it wasn't easy too....
The steps :

1 - My IR Toy V2 stuck with orange light is ON all the time, I give a solution on this forum here (http://http://dangerousprototypes.com/forum/viewtopic.php?f=29&t=6576)
2 - First step record and replay the IR codes that I need.
I tried to use WinLirc, This tutorial (http://http://dangerousprototypes.com/docs/USB_IR_Toy:_Configure_WinLIRC) is good for it.
It was OK with the remote of logitech z-5500 speakers but Impossible with the samsung projector's remote : when Winlirc is recording samsung buttons it always displays "something went wrong".
As it was impossible to control my samsung projector with Winlirc I use the IRToyRecPlay tool to record and replay the buttons. Without problem.
Funny thing : IRToyRecPlay tool don't work with my logitech z-5500 speakers... So :
3 - Automate these records in a script ... Not easy because IRTOY.exe is not really documented, I found what I need in sources here (http://https://github.com/myshen/IRToyRecPlay/blob/master/main.c) :( !
Quote
-p f NAME - a nnn
* Plays as above, except does NOT wait for any key to be pressed, instead
* delays nnn miliseconds between sending each file.
* 500 is recommended as a starting delay.

Please find my batch script below :

Code: [Select]
::liberate COM port
taskkill /F /IM "Winlirc.exe"
timeout 1
::check if IRtoy COM is found
mode | findstr "COM[0-9]:"
if %errorlevel%==1 Goto NoCOM
cd  "IR ToysoftwareIRToyRecPlaywindows"
irtoy.exe -d COM3 -p -f samsungOn.bin -a 500
timeout 1
start "" "WinLIRCwinlirc.exe"
timeout 4
cd "WinLIRC"
::command line to run a WinLirc code :
Transmit.exe logitech_z5500 Power 0
:NoCOM

I hope it will be useful for some people ;)

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.01052052896session_write_close ( )...(null):0
20.01082184488ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01082185264Database_MySQL->query( ).../DatabaseHandler.php:119
40.05712324000Database_MySQL->error( ).../Db-mysql.class.php:273