View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 2 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject: R6 And Lirc
PostPosted: Wed Feb 25, 2009 10:14 pm 
Offline
Joined: Wed Nov 09, 2005 1:21 pm
Posts: 161
Location: Manchester UK
I did a fresh install on a new hard drive on my myth box

I coppied over my savedfiles.tar.gz and extracted lircrc and lirc.conf

I have noticed the origonals are now both in /etc/

not /etc/lirc
/home/mythtv/.mythtv

so do i need to copy mine to /etc now

the reason i ask is i have no volume control at the moment the volume % goes up and down but dosnt actually do anything

i fixed this in my old R5.27 version by creating a volup /down .sh command and mapping the volume keys to that and i would like to restore this functionality.

like this

Volup.sh
Code:
amixer -c0 set PCM 1.5dB+



also i had a button for restarting the frontend if it locked up

mypower.sh

Code:
#!/bin/bash
# Script for powerbutton press on Mythtv.  Double click (within
# timeout) will reboot, single press will restart frontend
# /home/mythtv/scripts/mypower.sh
#
# Adopted from someone a long time ago.  Sorry for not
# remembering who.

DOUBLE_PRESS_TIMEOUT=2

SCRIPTNAME=`basename $0`
OLDEST_SCRIPT_PID=`pgrep -o $SCRIPTNAME`

OUR_PID=$$

# check if we are the oldest instance of this script
if [[ "$OLDEST_SCRIPT_PID" == "$OUR_PID" ]]
then
    killall mythfrontend
    sleep $DOUBLE_PRESS_TIMEOUT
    mythfrontend &
else
    # this is a doublepress
    kill $OLDEST_SCRIPT_PID
    sudo reboot
fi


I would like to get this back as it gave the mrs a button to push if it all went wrong, know she just shouts me.

_________________
Running:-
Intel 930 3GHz dual Core
Thermaltake Fanless CPU Cooler
Asus P5GS
Samsung 750G Sata HDD
8400 512m Video Card
2 * jetway DVB-t
1 * Haupage DVB-S2 Card
Samsung Sata 16x DVDRW
2048M Ram
1 * Netop Ion 330


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 26, 2009 2:17 am 
Offline
Joined: Wed Feb 15, 2006 3:18 pm
Posts: 47
Yep I have just been through the V6 thing and had a few drama's. Anyway this is what I did to get it to work:

Place the following script in /usr/LH/bin and do the usual chmod +x

Code:
#!/bin/bash

FirstClickFile="/home/mythtv/.FirstClick"
maxClickTime=3

FirstClick() {
 date > $FirstClickFile
 # echo DEBUG: FirstClick!
 exit
}

SecondClick() {
 # If the time between the first and the second click was less than $maxClickTime, restart mythfrontend
 timeSinceLastClick=$(expr $(date +"%G%m%d%H%M%S") - $(date -f /home/mythtv/.FirstClick +"%G%m%d%H%M%S"))

 if [ "$timeSinceLastClick" -lt "$maxClickTime" ]; then
  # echo DEBUG: SecondClick!
  # sudo killall -s 9 mythfrontend
  sudo /sbin/reboot
 else
  FirstClick
 fi

 rm -f $FirstClickFile
 exit
}

[ -f "$FirstClickFile" ] || FirstClick
SecondClick


The add a lirc item to fire it up on the second FAST click as follows:

Code:
begin
   prog = irexec
   button = pcoff
   config = /usr/LH/bin/mythrestart.sh
end


Obvious my script is called mythrestart.sh and this is for a DVICO remote so yours will be a different button. Give me a yell if you need more details. Kudos for the script goes elsewhere I just made it fit my system.

_________________
--
2.4 GHz P4 - 1GB Ram - 200 GB HardDisk
2 x DVICO DVB-T Lite
nVidia 7300GT - DVICO PCI Remote - R6
Wifey loves it more than me.
--


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 64 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu