Page 2 of 3
Re: How to remotely turn off the TV?
Posted: Thu Aug 30, 2012 11:22 am
by oga83
Tcpdumping the official app gave me "." while someone else had ".."
At this point, I don't know which one is better to use
Anyway, it works in both cases.
Re: How to remotely turn off the TV?
Posted: Thu Aug 30, 2012 11:36 am
by rol
Thanks for the precision.
I have already a nice remote, that emulates all functions of the hardware remote, plus some other ones. It is sometimes difficult to find the right key for a particular button, and your program was invaluable to check the codes. Great and useful job!
BTW, I've noticed that the keys of the macros of your program are sent either one at a time (with the "," separator), or immediately, all keys after each other (with "+"). What's the reason to treat the keys as separate "packs" or as a group (other than the slight speed penalty of the first method)?
Re: How to remotely turn off the TV?
Posted: Thu Aug 30, 2012 11:43 am
by oga83
...because some special functions require separate sessions for each key.
The most famous is KEY_INFO,KEY_FACTORY
Of course, for other functions, it's faster to use the same session (for example, KEY_1+KEY_5 to set channel "15" )
Re: How to remotely turn off the TV?
Posted: Thu Aug 30, 2012 11:54 am
by rol
OK, understood.
BTW, is it always safe to send several keys (in the same session or not), or is it sometimes necessary to insert pauses? I guess that the TV executes the key function before getting the other commands from its TCP port. Right? (I would like to make a macro to go to the Smart Hub, then send cursor keys to navigate to the PVR manager app, and open it automatically. But going to the Smart Hub takes sometimes a very long time, and I wonder if the TV will loose the keys.)
[EDIT] Oops, sorry! I can check that easily with your program!
Re: How to remotely turn off the TV?
Posted: Thu Aug 30, 2012 12:02 pm
by oga83
In fact you should check the answer of your unit when you connect or send a key
Re: How to remotely turn off the TV?
Posted: Thu Aug 30, 2012 12:12 pm
by rol
Not sure how to do it. I just need to read the socket?
Re: How to remotely turn off the TV?
Posted: Thu Aug 30, 2012 12:23 pm
by oga83
You should at least wait for the answer
I didn't work on the meaning of the returned data...
Re: How to remotely turn off the TV?
Posted: Thu Aug 30, 2012 12:36 pm
by rol
Well, I open the socket in blocking mode, so I guess the write function returns only when the answer has been received. But I'm not sure. It's the first time I use sockets in a program, and the Tcl doc is not clear on how to check for errors. Anyway, don't worry. I'll find the solution myself. I don't want to abuse of your patience.
Re: How to remotely turn off the TV?
Posted: Wed Sep 26, 2012 11:47 am
by rol
With your help, I've finally finished to write and test my remote controller. I've started a new thread
here.
Thanks again!
Re: How to remotely turn off the TV?
Posted: Wed Sep 26, 2012 4:47 pm
by oga83
It sounds great !