View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 24 posts ] 
Go to page 1, 2  Next

Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Sun Nov 06, 2005 5:29 pm 
Offline
Joined: Sun Oct 30, 2005 2:30 pm
Posts: 13
Hi All,

my English is not so good :( Sorry

I made exactly that, what stands with http://knoppmythwiki.org/index.php?page=WakeupToRecord

Wake up to correct time to record = OK :)
If record finished... PC will not go shutdown = not OK :( PLEAS HELP

this (knoppmyth-wakeuptest.pl) script does not function
Code:
#!/usr/bin/perl
# This script can be called when the mythtv backend starts to
# determine whether the frontend should be shutdown.
#
# If this boot was an automatic wakeup because there is something
# to record, the frontend is shutdown to allow the backend to
# shutdown the computer when it is done recording.
#
# Imporant:  In mythtv-setup, this script should be set up to
# be called in the background (with a trailing &) because of the
# sleep.

$kill_frontend = "killall -TERM mythfrontend";
$sleep_time = 30;

# Now the work starts...

if (@ARGV[0] eq "auto") {
   sleep $sleep_time;
   system "$kill_frontend";
}


why???


Pleas help!

I use R5A12 because with me stable
R5A22 with me not stable <-(WakeUpTorecord 100% function)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 07, 2005 1:29 pm 
Offline
Joined: Sun Oct 30, 2005 2:30 pm
Posts: 13
???:cry:???
If record finished... PC will not go shutdown = not OK PLEAS HELP
???


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 08, 2005 3:03 am 
Offline
Joined: Sun May 22, 2005 2:44 pm
Posts: 105
Location: The Netherlands
Hi,

Can you please post the exact content of your shutdown options including checkboxes (running Mythtv-setup - > settings)? Did you follow the instructions chapter 'How to do it' number 6 of the wiki? Is mythfrontend stopping or not?

Fiete


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 08, 2005 6:01 am 
Offline
Joined: Sun Oct 30, 2005 2:30 pm
Posts: 13
fiete wrote:
Hi,
Can you please post the exact content of your shutdown options including checkboxes (running Mythtv-setup - > settings)

# startup command: "knoppmyth-wakeuptest.pl $status &"
# Block shutdown before client connected "Disabled"
# idle timeout: "60"
# Set wakeuptime command: "knoppmyth-nvram-set-time.pl $time"
# Halt command: "knoppmyth-shutdown.pl "
# wakeup time format: "time_t"
# Halt command: "knoppmyth-shutdown.pl "
# pre-shutdown command: "knoppmyth-preshutdown.sh"

fiete wrote:
Is mythfrontend stopping or not?


mythfrontend not stopping if the PC wakes up for records


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 08, 2005 10:17 am 
Offline
Joined: Sun May 22, 2005 2:44 pm
Posts: 105
Location: The Netherlands
Ok
Just to track down the error you could replace the preshutdown command by 'exit 0'. Is mythfrontend (and the computer) shutting down properly? And also waking up for recording the next time? If not, test the output of top, typing in a xterm:
top -u mythtv (typed in xterm)
Anything like mythcommflag of mythtranscode?

If mythfrontend is not shutting down automatically during a recording after automatic start-up, do:
1) shutdown the GUI of mythfrontend manually
2) open a xterm
3) restart mythfrontend GUI (right-click in desktop > restart)
4) switch back to the xterm (using {ALT}+{TAB}
5) type on command line: knoppmyth-wakeuptest.pl auto &

[please post any error message showing up at this point]

6) type on command line: top -u mythtv
7) You should see mythfrontend en mythbackend active (right side of screen). After idle time, mythfrontend should disappear.
8) exit top by typing: q
9) sit and wait until end of recording. The computer should shut down now.



Please post some relevant content of the log files
/var/log/mythtv/mythevent.date
/var/log/mythtv/mythpreshutdown.log
Do they exist?

Regards,
Fiete


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 17, 2005 11:03 pm 
Offline
Joined: Sun Oct 30, 2005 2:30 pm
Posts: 13
Quote:
Just to track down the error you could replace the preshutdown command by 'exit 0'


I made that

now is like that:

# startup command: "knoppmyth-wakeuptest.pl $status &"
# Block shutdown before client connected "Disabled"
# idle timeout: "60"
# Set wakeuptime command: "knoppmyth-nvram-set-time.pl $time"
# Halt command: "knoppmyth-shutdown.pl "
# wakeup time format: "time_t"
# Halt command: "knoppmyth-shutdown.pl "
# pre-shutdown command: "exit 0"

Quote:
1) shutdown the GUI of mythfrontend manually
2) open a xterm
3) restart mythfrontend GUI (right-click in desktop > restart)
4) switch back to the xterm (using {ALT}+{TAB}
5) type on command line: knoppmyth-wakeuptest.pl auto &


OK no errors! :D

Quote:
7) You should see mythfrontend en mythbackend active (right side of screen). After idle time, mythfrontend should disappear.


OK mythfrontend disappeared :D

Quote:
9) sit and wait until end of recording. The computer should shut down now.


OK The computer go shutdown :D

which I am to insert now here:
# startup command: "????"
# Block shutdown before client connected "Disabled"
# idle timeout: "60"
# Set wakeuptime command: "knoppmyth-nvram-set-time.pl $time"
# Halt command: "knoppmyth-shutdown.pl "
# wakeup time format: "time_t"
# Halt command: "knoppmyth-shutdown.pl "
# pre-shutdown command: "exit 0" < thus let and nothing change???

???

Quote:
Please post some relevant content of the log files


/var/log/mythtv/mythevent.date exists is however empty
/var/log/mythtv/mythpreshutdown.log exists is however empty


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 18, 2005 3:01 pm 
Offline
Joined: Sun May 22, 2005 2:44 pm
Posts: 105
Location: The Netherlands
Now you should look into mythbackend.log to figure out if there is a line "Recording starts soon, AUTO-Startup assumed". The file is in /var/log/mythtv/
type in XTERM: nano /var/log/mythtv/mythbackend.log and find a line timestamped close to an "automatic start to record" time.

If you only can find a line "Seem to be woken up by USER" we have to search further.
You can keep the
# startup command: "knoppmyth-wakeuptest.pl $status &"
and replace
# pre-shutdown command: "knoppmyth-preshutdown.sh"

Regards,


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 18, 2005 10:59 pm 
Offline
Joined: Sun Oct 30, 2005 2:30 pm
Posts: 13
/var/log/mythtv/mythbackend.log
Code:
2005-11-19 05:17:51.894 mythbackend version: 0.17.20050130-1 www.mythtv.org
2005-11-19 05:17:51.903 Enabled verbose msgs : important general
2005-11-19 05:17:54.035 Reschedule requested for id -1.
2005-11-19 05:17:54.080 Scheduled 0 items in 0.0 = 0.03 match + 0.02 place
2005-11-19 05:17:55.106 I'm idle now... shutdown will occur in 60 seconds.
2005-11-19 05:18:03.278 MainServer::HandleAnnounce Playback
2005-11-19 05:18:03.281 adding: mythtv as a client (events: 0)
2005-11-19 05:18:03.340 MainServer::HandleAnnounce Playback
2005-11-19 05:18:03.342 adding: mythtv as a client (events: 1)
2005-11-19 05:19:10.507 Reschedule requested for id 2.
2005-11-19 05:19:10.558 Scheduled 1 items in 0.1 = 0.03 match + 0.02 place
2005-11-19 05:19:16.578 I'm idle now... shutdown will occur in 60 seconds.
2005-11-19 05:19:25.597 50 secs left to system shutdown!
2005-11-19 05:19:35.618 40 secs left to system shutdown!
2005-11-19 05:19:45.638 30 secs left to system shutdown!
2005-11-19 05:19:55.659 20 secs left to system shutdown!
2005-11-19 05:20:05.679 10 secs left to system shutdown!

All values are displayed as they are stored in the nvram/rtc.
(and do not correspond necessarily to the system date/time)

WakeUp  : Enabled (0x80)
Day     : 18 (0x12)
Hour    : 05 (0x05)
Minute  : 12 (0xCC)
Second  : 39 (0x27)
rtcDay  : 18 (0x18)
rtcHour : 05
rtcMin  : 12
rtcSec  : 39
Checksum: 0xB863

Enabling (0x80) WakeUp-on-RTC in nvram.
New Day     : 19 (0x13)
New Hour    : 05 (0x05)
New Minute  : 25 (0xD9)
New Second  : 15 (0x0F)
New rtcDay  : 19 (0x19)
New rtcHour : 05
New rtcMin  : 25
New rtcSec  : 15
New Checksum: 0xB859

Now really WRITING into /dev/nvram...
And setting RTC alarm into /dev/rtc...

   The changes to take effect, you must reboot your computer now.

Starting up as the master server.
2005-11-19 05:26:26.427 mythbackend version: 0.17.20050130-1 www.mythtv.org
2005-11-19 05:26:26.451 Enabled verbose msgs : important general
2005-11-19 05:26:28.427 Reschedule requested for id -1.
2005-11-19 05:26:28.534 Scheduled 1 items in 0.1 = 0.09 match + 0.01 place
2005-11-19 05:26:29.590 I'm idle now... shutdown will occur in 60 seconds.
2005-11-19 05:26:38.802 50 secs left to system shutdown!
2005-11-19 05:26:46.230 MainServer::HandleAnnounce Playback
2005-11-19 05:26:46.244 adding: mythtv as a client (events: 0)
2005-11-19 05:26:46.811 MainServer::HandleAnnounce Playback
2005-11-19 05:26:46.813 adding: mythtv as a client (events: 1)
2005-11-19 05:33:02.842 Started recording "10 VOX" on channel: 10 on cardid: 1, sourceid 1
2005-11-19 05:33:02.919 Changing from None to RecordingOnly
2005-11-19 05:33:03.010 Unknown video codec
2005-11-19 05:33:03.013 Please go into the TV Settings, Recording Profiles and
2005-11-19 05:33:03.015 setup the four 'Software Encoders' profiles.
2005-11-19 05:33:03.017 Assuming RTjpeg for now.
2005-11-19 05:33:03.019 NVR: Error, unknown audio codec
2005-11-19 05:40:00.050 Finished recording 10 VOX on channel: 10
2005-11-19 05:40:00.100 Changing from RecordingOnly to None
2005-11-19 05:40:00.102 Reschedule requested for id 0.
2005-11-19 05:40:00.243 Scheduled 1 items in 0.1 = 0.00 match + 0.11 place


???


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 19, 2005 4:35 am 
Offline
Joined: Sun May 22, 2005 2:44 pm
Posts: 105
Location: The Netherlands
I can be wrong, but it seems that backend is initiating shutdown sequence while in idle time the frontend is going to connect. You can disable this premature shutdown to set the settings to:

# startup command: "knoppmyth-wakeuptest.pl $status &"
# Block shutdown before client connected "Enable"
# idle timeout: "60"
# Set wakeuptime command: "knoppmyth-nvram-set-time.pl $time"
# Halt command: "knoppmyth-shutdown.pl "
# wakeup time format: "time_t"
# Halt command: "knoppmyth-shutdown.pl "
# pre-shutdown command: "exit 0"

Could you try these settings?

Another possibility is that the $status is not defined in MythTV 0.17


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 19, 2005 9:04 am 
Offline
Joined: Sun Oct 30, 2005 2:30 pm
Posts: 13
Code:
# startup command: "knoppmyth-wakeuptest.pl $status &"
# Block shutdown before client connected "Enable"
# idle timeout: "60"
# Set wakeuptime command: "knoppmyth-nvram-set-time.pl $time"
# Halt command: "knoppmyth-shutdown.pl "
# wakeup time format: "time_t"
# Halt command: "knoppmyth-shutdown.pl "
# pre-shutdown command: "exit 0"


no success :cry:



Quote:
Another possibility is that the $status is not defined in MythTV 0.17


status ??? ($status ???)

nano /etc/init.d/mythtv-backend:
Code:
#! /bin/sh
#
# mythtv-server MythTV capture and encoding backend
#
# Based on:
#
# skeleton      example file to build /etc/init.d/ scripts.
#               This file should be used to construct scripts for /etc/init.d.
#
#               Written by Miquel van Smoorenburg <miquels@cistron.nl>.
#               Modified for Debian GNU/Linux
#               by Ian Murdock <imurdock@gnu.ai.mit.edu>.
#
# Version:      @(#)skeleton  1.9.1  08-Apr-2002  miquels@cistron.nl
#

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
HOME=/home/mythtv
DAEMON=/usr/bin/mythbackend
NAME="mythbackend"
DESC="MythTV server"

test -x $DAEMON || exit 0

set -e

USER=mythtv
RUNDIR=/var/run/mythtv
ARGS="--daemon --logfile /var/log/mythtv/mythbackend.log --pidfile $RUNDIR/$NAME.pid"
EXTRA_ARGS=""
NICE=0

if [ -f /etc/default/mythtv-backend ]; then
  . /etc/default/mythtv-backend
fi

ARGS="$ARGS $EXTRA_ARGS"

mkdir -p $RUNDIR
chown -R $USER $RUNDIR


case "$1" in
  start)
        echo -n "Starting $DESC: $NAME"
        start-stop-daemon --start --pidfile $RUNDIR/$NAME.pid \
                --chuid $USER --nicelevel $NICE --exec $DAEMON -- $ARGS
        echo "."
        ;;
  stop)
        echo -n "Stopping $DESC: $NAME "
        start-stop-daemon --stop --oknodo --pidfile $RUNDIR/$NAME.pid \
                --chuid $USER --exec $DAEMON -- $ARGS
        echo "."
        ;;
  restart|force-reload)
        echo -n "Restarting $DESC: $NAME"
        start-stop-daemon --stop --oknodo --pidfile $RUNDIR/$NAME.pid \
                --chuid $USER --exec $DAEMON -- $ARGS
        echo "."
        sleep 3
        start-stop-daemon --start --pidfile $RUNDIR/$NAME.pid \
                --chuid $USER --nicelevel $NICE --exec $DAEMON -- $ARGS
        echo "."
        ;;
  *)
        N=/etc/init.d/$NAME
        # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
        echo "Usage: $N {start|stop|restart|force-reload}" >&2
        exit 1
        ;;
esac

exit 0


???


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 19, 2005 12:30 pm 
Offline
Joined: Sun May 22, 2005 2:44 pm
Posts: 105
Location: The Netherlands
Hi brucelee100,

The script /etc/init.d/mythtv-backend should be okay, I think that this script is not that interesting in your case. Now you can test whether there is a call for the script 'knoppmyth-wakeuptest.pl' Please edit the script as root:

Insert a line after $sleep_time = 30; using nano of vi:
Code:
system "@ARGV[0] is the argument of the script >> /home/mythtv/test_wakeuptest.log"


Save and exit.
As I am no PERL programmer, I won't know if this works. But it should create a logfile '/home/mythtv/test_wakeuptest.log'. Please try manual startup of the box and automatic startup and post the file test_wakeuptest.log here.

I will verify this modified script on my own box tonight.

Regards,

Fiete


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 19, 2005 5:09 pm 
Offline
Joined: Sun Oct 30, 2005 2:30 pm
Posts: 13
Code:
#!/usr/bin/perl
# This script can be called when the mythtv backend starts to
# determine whether the frontend should be shutdown.
#
# If this boot was an automatic wakeup because there is something
# to record, the frontend is shutdown to allow the backend to
# shutdown the computer when it is done recording.
#
# Imporant:  In mythtv-setup, this script should be set up to
# be called in the background (with a trailing &) because of the
# sleep.

$kill_frontend = "killall mythfrontend";
$sleep_time = 30;

# Now the work starts...

if (@ARGV[0] eq "auto") {
   sleep $sleep_time;
   system "@ARGV[0] is the argument of the script >> /home/mythtv/test_wakeuptest.log";
   system "$kill_frontend";
}


/home/mythtv/test_wakeuptest.log does not exist :(


nano /var/log/mythtv/mythbackend.log
Quote:
Enabling (0x80) WakeUp-on-RTC in nvram.
New Day : 19 (0x13)
New Hour : 23 (0x17)
New Minute : 52 (0xF4)
New Second : 23 (0x17)
New rtcDay : 19 (0x19)
New rtcHour : 23
New rtcMin : 52
New rtcSec : 23
New Checksum: 0xB909

Now really WRITING into /dev/nvram...
And setting RTC alarm into /dev/rtc...

The changes to take effect, you must reboot your computer now.

Starting up as the master server.
2005-11-19 23:53:31.937 mythbackend version: 0.17.20050130-1 www.mythtv.org
2005-11-19 23:53:31.973 Enabled verbose msgs : important general
2005-11-19 23:53:33.939 Reschedule requested for id -1.
2005-11-19 23:53:34.068 Scheduled 1 items in 0.1 = 0.09 match + 0.04 place
2005-11-19 23:53:35.135 I'm idle now... shutdown will occur in 60 seconds.
2005-11-19 23:53:44.329 50 secs left to system shutdown!
2005-11-19 23:53:51.597 MainServer::HandleAnnounce Playback
2005-11-19 23:53:51.612 adding: mythtv as a client (events: 0)
2005-11-19 23:53:52.168 MainServer::HandleAnnounce Playback
2005-11-19 23:53:52.171 adding: mythtv as a client (events: 1)
2005-11-20 00:00:02.150 Started recording "10 VOX" on channel: 10 on cardid: 1, sourceid 1
2005-11-20 00:00:02.246 Changing from None to RecordingOnly
2005-11-20 00:00:02.335 Unknown video codec
2005-11-20 00:00:02.336 Please go into the TV Settings, Recording Profiles and
2005-11-20 00:00:02.337 setup the four 'Software Encoders' profiles.
2005-11-20 00:00:02.338 Assuming RTjpeg for now.
2005-11-20 00:00:02.339 NVR: Error, unknown audio codec
2005-11-20 00:05:00.045 Finished recording 10 VOX on channel: 10
2005-11-20 00:05:00.084 Changing from RecordingOnly to None
2005-11-20 00:05:00.091 Reschedule requested for id 0.
2005-11-20 00:05:00.267 Scheduled 1 items in 0.1 = 0.00 match + 0.10 place


:( ???


Top
 Profile  
 
PostPosted: Sat Nov 19, 2005 7:16 pm 
Offline
Joined: Sat Sep 24, 2005 4:45 pm
Posts: 42
first:

touch /var/log/mythtv/waketest.log
chmod 666 /var/log/mythtv/waketest.log

now: edit knoppmyth-wakeuptest.pl by adding this to the beginning of script

open wakelog, ">> /var/log/mythtv/waketest.log";


Replace:

system "@ARGV[0] is the argument of the script >> /home/mythtv/test_wakeuptest.log";

with

print wakelog, "wakeuptest called with @ARGV[0].\n";

and at the end of script add

close wakelog;

reboot that puppy and send us the log output.

A

_________________
ASUS A7N8X-E Deluxe
Hauppauge 350/150
ASUS V9520Magic/128MB Geforce FX5200
Maxtor DiamondMax 10 6L200R0 200GB
AMD Athlon XP 2800+ Barton


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 19, 2005 9:31 pm 
Offline
Joined: Sun Oct 30, 2005 2:30 pm
Posts: 13
Code:
#!/usr/bin/perl
# This script can be called when the mythtv backend starts to
# determine whether the frontend should be shutdown.
#
# If this boot was an automatic wakeup because there is something
# to record, the frontend is shutdown to allow the backend to
# shutdown the computer when it is done recording.
#
# Imporant:  In mythtv-setup, this script should be set up to
# be called in the background (with a trailing &) because of the
# sleep.

open wakelog, ">> /var/log/mythtv/waketest.log";
$kill_frontend = "killall mythfrontend";
$sleep_time = 30;

# Now the work starts...

if (@ARGV[0] eq "auto") {
   sleep $sleep_time;
   print wakelog, "wakeuptest called with @ARGV[0].\n";
   system "$kill_frontend";
}
close wakelog;


No comma allowed after filehandle at ... line 21

ok google help for this problem

print wakelog, "wakeuptest called with @ARGV[0].\n";

replace

print wakelog "wakeuptest called with @ARGV[0].\n";

wakeup of record, however /var/log/mythtv/waketest.log is empty

nano /var/log/mythtv/waketest.log:
nothing

???


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 19, 2005 11:23 pm 
Offline
Joined: Sat Sep 24, 2005 4:45 pm
Posts: 42
sorry, move the print line outside of the if statement. my bad,

Quote:
# Now the work starts...
print wakelog "wakeuptest called with @ARGV[0].\n";

if (@ARGV[0] eq "auto") {
sleep $sleep_time;
system "$kill_frontend";
}



Basically, we're trying to see what the wakeup script thinks when it runs.

Also, in reviewing the previous posts, I wonder how you are testing this? If you are just manually setting a wakeup time for something a few minutes form now, then the computer will come on, but that start-time is not related to when myth needs to reboot. Thus, the backend thinks it is a user start and not and auto start and so doesn't kill the frontend. Does that make sense?

To test this, you'll have to wait for it to AUTOMATICALLY shutdown and wakeup all on its own. [/quote]

_________________
ASUS A7N8X-E Deluxe
Hauppauge 350/150
ASUS V9520Magic/128MB Geforce FX5200
Maxtor DiamondMax 10 6L200R0 200GB
AMD Athlon XP 2800+ Barton


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 24 posts ] 
Go to page 1, 2  Next



All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 15 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:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu