Problem mit setwakeup

Moderators: daschatten, dekarl

Problem mit setwakeup

Postby Woodpacker » Sat May 06, 2017 2:39 pm

Hallo erst mal,
ich hoffe das mir hier jemand helfen kann. Folgende Problematik treibt mich noch in den Wahnsinn. Mythtv wacht nicht für eine programmierte Aufnahme auf. Mache ich es jedoch manuell, also mit
Code: Select all
sudo sh -c "echo 0 > /sys/class/rtc/rtc0/wakealarm"

zum clearen und dann
Code: Select all
sudo bash -c "echo `date '+%s' -d '+ 5 minutes'` > /sys/class/rtc/rtc0/wakealarm"

zum Aufwachen in 5 Minuten. Funktioniert das auch wunderbar.
Mache ich das selbe mit Mythtv zum aufnehmen, passiert nichts. Er wacht nicht auf. Habe http://www.mythtv.org/wiki/ACPI_Wakeup schon mehrfach durchgelesen. Habe mittlerweile auch schon drei verschiedene setwakeup.sh Skripte probiert. Bis jetzt immer ohne Erfolg :cry:
Ich habe Ubuntu Gnome 16.04 installiert, dann mythbuntu-control-centre und damit dann den Rest.
Hier auch noch meine drei setwakeup Varianten
Variante1:
Code: Select all
#!/bin/sh
#$TIMESTEP is the time in seconds since 1970
NEXTRECORDING=`mysql -BN --database=mythconverg --user=mythtv --password=XXXXXXXX -e "select a.starttime from recordmatch a, record b where a.recordid =
b.recordid and a.starttime >= now() and b.prefinput < 3 order by starttime";`
NEXTTIME=`echo $NEXTRECORDING | awk '{ print $2 " " $1 }'`
NEXTRECORDINGSEC=`date -d "${NEXTTIME}" +%s`
TIMESTEMP=$((${NEXTRECORDINGSEC} - 15 * 60))
echo 0 > /sys/class/rtc/rtc0/wakealarm #this clears your alarm.
echo $TIMESTEMP > /sys/class/rtc/rtc0/wakealarm #this writes your alarm
cat /proc/driver/rtc


Variante2:
Code: Select all
#!/bin/bash
#$1 is the first argument to the script. It is the time in seconds since 1970
#this is defined in mythtv-setup with the time_t argument

echo 0 > /sys/class/rtc/rtc0/wakealarm      #this clears your alarm.
echo $1 > /sys/class/rtc/rtc0/wakealarm     #this writes your alarm

LOG_FILE='/var/log/mythtv/hwclock-rebootTime.log' #log file

# Now write the time the system is expected to come out of power save mode
# so there is at least a small record of when if it was supposed to recover

# Note:- Log file will just keep growing

# date in Epoch format
a="`date  +%s`"

# Subtract Current time from Future time
let "b=$1-$a"

# echo $b
# echo "result of time subtraction `date -d @$b`"

# Get Date and Subtract 1,.. as date starts from 1st Jan 1970
dte=`date -d @$b +%d`
let "dte -= 1"

echo "Current Time      ->`date`" >> $LOG_FILE

# Simple check to determine if to include days in output string
if (dte=0)
then
    echo "Shutting down for ->`date -d @$b +%Hhrs:%MMins`" >> $LOG_FILE
else
    echo "Shutting down for ->$[dte]Days `date -d @$b +%Hhrs:%MMins`" >> $LOG_FILE
fi

echo "Wake up at approx.->`date -d @$1`"  >> $LOG_FILE
echo "------------------------------------------------------" >> $LOG_FILE


Variante3:
Code: Select all
#!/bin/sh
#
# set ACPI Wakeup time
# usage: setwakeup.sh seconds
#    seconds - number of seconds from epoch to UTC time (time_t time format)
#
# set UTCBIOS to true if bios is using UTC time
# set UTCBIOS to false if bios is using local time

UTCBIOS=true

if $UTCBIOS
then
    #utc bios - use supplied seconds
    SECS=$1
else
    #non utc bios - convert supplied seconds to seconds from
    #epoch to local time
    SECS=`date -u --date "\`date --date @$1 +%F" "%T\`" +%s`
fi

echo 0 > /sys/class/rtc/rtc0/wakealarm    # clear alarm
echo $SECS > /sys/class/rtc/rtc0/wakealarm   # write the waketime


und hier auch noch der aktuellste Log von mythbackend
Code: Select all
2017-05-06 15:51:05.981981 C [1202/1202] thread_unknown mythcommandlineparser.cpp:2599 (ConfigureLogging) - mythbackend version: fixes/0.28 [v0.28.1-21-ge26a33c] www.mythtv.org
2017-05-06 15:51:05.982006 C [1202/1202] thread_unknown mythcommandlineparser.cpp:2601 (ConfigureLogging) - Qt version: compile: 5.5.1, runtime: 5.5.1
2017-05-06 15:51:05.982009 N [1202/1202] thread_unknown mythcommandlineparser.cpp:2603 (ConfigureLogging) - Enabled verbose msgs:  general
2017-05-06 15:51:05.982118 N [1202/1202] thread_unknown logging.cpp:920 (logStart) - Setting Log Level to LOG_INFO
2017-05-06 15:51:05.992865 I [1202/1211] Logger logging.cpp:313 (run) - Added logging to the console
2017-05-06 15:51:05.993331 I [1202/1202] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Unterbrechung handler
2017-05-06 15:51:05.993346 I [1202/1202] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Beendet handler
2017-05-06 15:51:05.993356 I [1202/1202] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Speicherzugriffsfehler handler
2017-05-06 15:51:05.993363 I [1202/1202] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Abgebrochen handler
2017-05-06 15:51:05.993372 I [1202/1202] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Bus-Zugriffsfehler handler
2017-05-06 15:51:05.993378 I [1202/1202] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Gleitkomma-Ausnahme handler
2017-05-06 15:51:05.993387 I [1202/1202] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Ungültiger Maschinenbefehl handler
2017-05-06 15:51:05.993401 I [1202/1202] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Real-Time Signal 0 handler
2017-05-06 15:51:05.993412 I [1202/1202] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Aufgelegt handler
2017-05-06 15:51:05.993442 N [1202/1202] thread_unknown mythdirs.cpp:33 (InitializeMythDirs) - Read conf dir = /etc/mythtv
2017-05-06 15:51:05.993508 N [1202/1202] thread_unknown mythdirs.cpp:192 (InitializeMythDirs) - Using runtime prefix = /usr
2017-05-06 15:51:05.993511 N [1202/1202] thread_unknown mythdirs.cpp:194 (InitializeMythDirs) - Using configuration directory = /etc/mythtv
2017-05-06 15:51:05.993570 I [1202/1202] CoreContext mythcorecontext.cpp:266 (Init) - Assumed character encoding: de_DE.UTF-8
2017-05-06 15:51:05.993816 N [1202/1202] CoreContext mythcontext.cpp:505 (LoadDatabaseSettings) - Empty LocalHostName.
2017-05-06 15:51:05.993821 I [1202/1202] CoreContext mythcontext.cpp:513 (LoadDatabaseSettings) - Using localhost value of mediaserver
2017-05-06 15:51:06.004085 N [1202/1202] CoreContext mythcorecontext.cpp:1670 (InitLocale) - Setting QT default locale to de_DE
2017-05-06 15:51:06.004096 I [1202/1202] CoreContext mythcorecontext.cpp:1703 (SaveLocaleDefaults) - Current locale de_DE
2017-05-06 15:51:06.004146 N [1202/1202] CoreContext mythlocale.cpp:123 (LoadDefaultsFromXML) - Reading locale defaults from /usr/share/mythtv//locales/de_de.xml
2017-05-06 15:51:06.008714 I [1202/1202] CoreContext mythtranslation.cpp:73 (load) - Loading de translation for module mythfrontend
2017-05-06 15:51:06.019029 I [1202/1202] CoreContext mythcorecontext.cpp:436 (ConnectCommandSocket) - MythCoreContext::ConnectCommandSocket(): Connecting to backend server: 192.168.246.31:6$
2017-05-06 15:51:06.019691 E [1202/1214] MythSocketThread(-1) mythsocket.cpp:729 (ConnectToHostReal) - MythSocket(1f95fb0:-1): Failed to connect to (127.0.0.1:6543) Connection refused
2017-05-06 15:51:06.019909 E [1202/1202] CoreContext mythcorecontext.cpp:506 (ConnectCommandSocket) - Connection to master server timed out.
                        Either the server is down or the master server settings
                        in mythtv-settings does not contain the proper IP address

2017-05-06 15:51:06.019922 E [1202/1202] CoreContext main_helpers.cpp:325 (handle_command) - Unable to connect to backend, verbose mask unchanged
2017-05-06 15:51:06.093327 I [1202/1208] LogForward loggingserver.cpp:142 (FileLogger) - Added logging to /var/log/mythtv/mythbackend.20170506135105.1202.log


Ich hoffe irgendjemand hat eine Idee woran es liegen könnte.

Mfg
GermanyWoodpacker
Newcomer
 
Posts: 1
Joined: Thu May 04, 2017 5:53 pm

Return to Deutschland - Germany



Who is online

Users browsing this forum: No registered users and 1 guest