Any Linux software to control tv/receiver through RS-232? - AVS Forum
Forum Jump: 
 
Thread Tools
post #1 of 7 Old 04-23-2007, 01:30 PM - Thread Starter
Member
 
Todd7's Avatar
 
Join Date: Sep 2006
Posts: 19
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
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?
Todd7 is offline  
Sponsored Links
Advertisement
 
post #2 of 7 Old 04-23-2007, 01:49 PM
AVS Special Member
 
newlinux's Avatar
 
Join Date: Oct 2006
Location: Parts unknown
Posts: 1,548
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 5 Post(s)
Liked: 15
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.
newlinux is offline  
post #3 of 7 Old 04-23-2007, 01:53 PM
AVS Special Member
 
newlinux's Avatar
 
Join Date: Oct 2006
Location: Parts unknown
Posts: 1,548
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 5 Post(s)
Liked: 15
Is there some reason you want to control volume and power via RS-232 instead of using LIRC and a remote?
newlinux is offline  
post #4 of 7 Old 04-23-2007, 02:14 PM - Thread Starter
Member
 
Todd7's Avatar
 
Join Date: Sep 2006
Posts: 19
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
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.
Todd7 is offline  
post #5 of 7 Old 04-23-2007, 02:38 PM
AVS Special Member
 
newlinux's Avatar
 
Join Date: Oct 2006
Location: Parts unknown
Posts: 1,548
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 5 Post(s)
Liked: 15
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...
newlinux is offline  
post #6 of 7 Old 04-23-2007, 02:45 PM - Thread Starter
Member
 
Todd7's Avatar
 
Join Date: Sep 2006
Posts: 19
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
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.
Todd7 is offline  
post #7 of 7 Old 04-28-2007, 03:49 AM
Senior Member
 
nitrogen's Avatar
 
Join Date: Feb 2003
Location: Utah
Posts: 264
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
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.
nitrogen is offline  
Reply HTPC - Linux Chat

User Tag List

Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page


Forum Jump: 

Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off