[mythtv-users] wakeup

Nicolas Krzywinski myth2 at site7even.de
Wed Sep 12 14:51:02 UTC 2018


Am 12.09.2018 um 13:52 schrieb Daryl McDonald:
>
>
> On Wed, Sep 12, 2018 at 3:32 AM jksj <jksjdevelop at gmail.com <mailto:jksjdevelop at gmail.com>> wrote:
>
>     On 12/09/18 00:53, Daryl McDonald wrote:
>>     I have the same set up in 18.04 as I did in 16.04 but my box doesn't wake up in time, once it came on two hours late, since then I've pushed the button myself. Is there a time setting I'm missing somewhere? TIA  Daryl
>>
>>
>>     _______________________________________________
>>     mythtv-users mailing list
>>     mythtv-users at mythtv.org <mailto:mythtv-users at mythtv.org>
>>     http://lists.mythtv.org/mailman/listinfo/mythtv-users
>>     http://wiki.mythtv.org/Mailing_List_etiquette
>>     MythTV Forums:https://forum.mythtv.org
>
>     Mine wakes on time to record programs, the same as in 16.04 but I think it does not do this for the daily wake up time set in Mythwelcome. Could that be your issue?
>
>     No, I don't use Mythwelcome, but thanks for the reply, I'll go over my setup again, I must have missed something. Curious that the wakeup_test.sh, thanks Bill, restarts 16.04 and not 18.04 when the report from (bad syntax from memory) proc driver rtc is identical from both distros. _______________________________________________
>     mythtv-users mailing list
>     mythtv-users at mythtv.org <mailto:mythtv-users at mythtv.org>
>     http://lists.mythtv.org/mailman/listinfo/mythtv-users
>     http://wiki.mythtv.org/Mailing_List_etiquette
>     MythTV Forums: https://forum.mythtv.org
>
Hey Daryl,

recently I set up a new MythTV system (see signature) and there I switched to the new method of using only:
/usr/sbin/rtcwake --date "<datestring>" --mode no
to set the wakeup time.

This works fine for my system.

The MythTV wiki was quite confusing as there is a lot of outdated and ambigous information, but you can find the above mentioned call as well, if you search for it.

Btw., I made a small script to also update the LCD display with the next scheduled automatic wakeup time:

    me at mysystem:~$ cat /usr/sbin/wakewrapper.sh
    #!/bin/bash
    # Sets RTC wake time and inserts the time into LCDd.conf for letting the display inform about the next wakeup time when the system is off

    if [ -z "$1" ]
         then
             echo "Usage $0 <time>"
             exit 1
    fi

    # set wake time
    wakestring=`/usr/sbin/rtcwake --date "$1" --mode no`

    # grab the confirmed wake time
    wakestring=`rtcwake --mode show | grep Alarm`

    # extract only time of confirmation output
    waketime=${wakestring:15:16}

    # convert utc time string to local time
    waketime=`date --date="$waketime +0000" +"%d. %b %T"`

    # update LCDd.conf with wake time
    sed -i -e "s/GoodBye = \"[^H].*/GoodBye = \"$waketime\"/g" /etc/LCDd.conf

    # reload LCDd to let it use the new config
    systemctl reload-or-restart LCDd.service

The sed command to update the LCDd.conf has to be adapted to the target environment. It needs to filter out the second GoodBye line, that should not be overwritten. Mine begins with "H", therefore the regex skips every GoodBye lines that have a value beginning with "H".

Have fun!
Nicolas

-- 
Nicolas

MythTV Version : v29.1-22-g675676b
Ubuntu 18.04 LTS (4.15.0-23-generic)
Digital Devices GmbH Octopus DVB Adapter via ddbridge kernel module
15c2:0036 SoundGraph Inc. LC16M VFD Display/IR Receiver (imon) via ir-keytable
VGA compatible controller: Intel Corporation Device 3e91 (Intel(R) Core(TM) i3-8100T)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20180912/1a684271/attachment.html>


More information about the mythtv-users mailing list