Marc's Public Blog - Linux Hacking

All | Arduino | Cars | Clubbing | Diving | Electronics | Exercising | Flying | Hiking | Linux | Linuxha | Public | Rc | Snow | Solar | Trips
Most recent entry: 2009-05-27 00:00:00 -- Generated on 2012-05-14 14:30:53 by Rig3 0.4-440

This page has a few of my blog entries about linux, but my main linux page is here
Picture of Linus


Table of Content for linux:



More pages: May 2012 March 2012 January 2012 December 2011 August 2011 July 2011 January 2011 October 2010 August 2010 June 2010 April 2010 March 2010 January 2010 December 2009 November 2009 September 2009 August 2009 July 2009 May 2009 January 2009 December 2008 November 2008 October 2008 January 2008 November 2007 July 2006 January 2006 August 2005 April 2005 November 2004 March 2004 February 2004


2009/05/27 Mythtv + Denon-AVR3808 Hack
π 2009-05-27 00:00 in Linux, Linuxha
I had a minor issue where I have 4 hauppage remote controls and one on the kitchen counter that I sometimes use to control my mythtv when I'm in the kitchen.
The only problem was that sound is actually controlled by the Denon receiver and that the hauppage remote doesn't talk to the denon.

I finally found a fix for this, which somewhat justifies the extra money I spent for an ethernet connected receiver: I wrote an lirc configuration that effectively telnets to the denon to tell it to change volume when the hauppage receives a relevant remote code for that.

lircrc:

# Denon
# Mute
begin
prog = irexec
button = MUTE
repeat = 1
config = /var/local/scr/denonmute
end

begin prog = irexec button = Vol+ repeat = 1 config = /var/local/scr/denoncmd MVUP 3 end

begin prog = irexec button = Vol- repeat = 1 config = /var/local/scr/denoncmd MVDOWN 3 end

denonmute:

#!/bin/bash

FILE=/var/run/denonmute

test -f $FILE || touch $FILE

# prevent bounces [ $(( $(date "+%s") - $(stat -c "%Z" $FILE) )) -lt 2 ] && exit

if grep -q MUON $FILE 2>/dev/null; then CMD=MUOFF else CMD=MUON fi

echo -ne "$CMD\r" | nc -q0 denon 23 echo $CMD > $FILE

denoncmd:

#!/bin/bash

# $0 cmd [repeat]

for i in `seq 1 ${2-1}` do echo -ne "$1\r" | nc -q0 denon 23 sleep 0.2 done

exit

And there you go, I can now send volume requests to my mythtv and they get forwarded to my denon over TCP/IP. Pretty cool :)


More pages: May 2012 March 2012 January 2012 December 2011 August 2011 July 2011 January 2011 October 2010 August 2010 June 2010 April 2010 March 2010 January 2010 December 2009 November 2009 September 2009 August 2009 July 2009 May 2009 January 2009 December 2008 November 2008 October 2008 January 2008 November 2007 July 2006 January 2006 August 2005 April 2005 November 2004 March 2004 February 2004