or Connect
AVS › AVS Forum › Video Components › Home Theater Computers › HTPC - Linux Chat › Any Linux software to control tv/receiver through RS-232?
New Posts  All Forums:Forum Nav:

Any Linux software to control tv/receiver through RS-232?

post #1 of 7
Thread Starter 
Is there any linux software that will allow your htpc to control a tv or a receiver through it's rs-232 port? Such as allow your computer to turn on the tv and reciever and controll the volume?
post #2 of 7
yes there is. I think LinuxMCE uses Pluto to do so - and Mythtv has code to do this as well located in the contrib folder in SVN. As far as the Myth stuff goes, I think they only have code that works with some cable receivers and Satellite receivers, but of course you can modify it.

examples:

http://mythtv.org/wiki/index.php/Motorola_DCT-25xx

http://mythtv.org/wiki/index.php/Con..._USB_or_Serial


As far as stereo receivers go, I don't know... Probably take some knowledge of the receiver's protocols to modify this code to do what you need.
post #3 of 7
Is there some reason you want to control volume and power via RS-232 instead of using LIRC and a remote?
post #4 of 7
Thread Starter 
I am planning a system, and I think I will put the receiver in another room than where the tv will be. I haven't decided if I will put the computer in the same room as the tv or the room where the receiver is located.

I thought the rs-232 might be more reliable than the LIRC and a remote. I am thinking of building a myth box but I haven't used linux much and I haven't used LIRC at all. If it repeats IR signals isn't that less reliable as there isn't a way for the computer to know if the receiver received the signal? Where my understanding of rs-232 is it communicates back to the computer.
post #5 of 7
So when you say receiver, what type of receiver are you talking about?

LIRC is actually pretty straight forward, especially if you use some of the common configurations that already have profiles readily available (still probably takes time to configure to your liking, however). But I certainly understand your concerns about the IR signals, although I don't know how much you'll be able to use any of the communication back from rs-232 in linux...

My mythfrontends are located in the same rooms as my cable boxes and TV, and LIRC works well for me. However, for changing the channel and recording from my DCT-6400 I use firewire... so I don't have to worry about an IR blaster for channel changing, and I leave it on all the time and use my stereo receiver to control the volume--all with Universal learning remote...
post #6 of 7
Thread Starter 
Quote:
Originally Posted by newlinux View Post

So when you say receiver, what type of receiver are you talking about?

I am considering getting a Denon AVR-2807.

An IR repeater and a learning universal remote may be the more practical solution.
post #7 of 7
Quote:
Originally Posted by newlinux View Post

although I don't know how much you'll be able to use any of the communication back from rs-232 in linux...

I used RS-232 to control my Plus UP-1100 projector before it blew up. I wrote a simple tool in C that ran at startup and shutdown, and could also switch video sources. It used two-way communication with the projector to check bulb status, power status, etc.

RS-232 is infinitely better than IR when it comes to reliability. Most high-end equipment includes an RS-232 port, such as the home theater receivers from Harman-Kardon and other mid-high to high-end brands. Proprietary touchscreen controllers, such as those from Crestron and AMX, commonly installed in million dollar homes, use RS-232 to control everything, falling back to IR only as a last resort.

At the simplest level, if you don't mind the command line (which is where the power of Linux lies anyway, so not using the command line when setting up a powerhouse HTPC is like not using the Tiptronic mode of your new Acura), you can control a serial device with two steps:

1. set the baud rate
Code:
stty -F /dev/ttyS0 [[]baud rate[]]
i.e.
Code:
stty -F /dev/ttyS0 115200
stty stands for set teletype
/dev/ttyS0 is the UNIX equivalent to COM1 in Windows

2. send the control string
Code:
printf "blahblah" > /dev/ttyS0
i.e.
Code:
printf "Input 02\
\
" > /dev/ttyS0
printf "\\x08\\x0f" > /dev/ttyS0
\
\
prints a Windows-style newline, in case your device requires such a newline after a command. \\x lets you use hexadecimal bytes directly, as my Plus projector required, for example.

To go beyond one-way control, there is a program called chat or expect or something like that, that can run scripted conversations with your devices. It was designed for handling logins to dial-up Internet/network access back in the day. Beyond that, you can write something in C/C++, perl, bash, or any other language to do your bidding.
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: HTPC - Linux Chat
AVS › AVS Forum › Video Components › Home Theater Computers › HTPC - Linux Chat › Any Linux software to control tv/receiver through RS-232?