[mythtv-users] Powersaving
Per Kofod
per.s.kofod at gmail.com
Thu Jun 16 13:26:48 UTC 2011
Thanks Brian
The mythshutdown command is just what I need.
David, I already have the setup you mention working; but want to
safeguard the system
to react properly if shutdown is executed, or power button is pressed,
and it looks like
the mythshutdown is just what I need. Then I can create my shutdown
scripts to handle
that.
Thanks Per
On 06/16/2011 03:01 PM, David Watkins wrote:
> On 16 June 2011 13:48, Brian Long<briandlong at gmail.com> wrote:
>> On Thu, Jun 16, 2011 at 8:25 AM, Per Kofod<per.s.kofod at gmail.com> wrote:
>>> Hi
>>>
>>> I am new to using mythtv, and is currently running it on my desktop PC while
>>> waiting for the parts for building a HTPC.
>>>
>>> I have managed to set mythtv up so shut down automaticaly when not busy, and
>>> set the bios time to restart the the computer in time for the next
>>> recording, all very well. I used the method described on this page:
>>>
>>> http://www.mythtv.org/wiki/ACPI_Wakeup
>>>
>>> I would however like to take this one step further, as I would like to
>>> make sure, that if shutdown is executed, I would like to have a script, that will
>>> check if mythbackend is busy and not shut down if that is the case, or if mythbackend
>>> is not busy, set the wakeup time, if a later recording is scheduled.
>>>
>>> So my question is:
>>>
>>> 1: Does mythtv have a command, that will tell if the backend is busy?
>>> 2: Does mythtv have a command, that will return the time of the next
>>> recording? (or 0 if none).
>> Per, you should be using mythshutdown to determine if/when to shutdown.
>>
>> mythshutdown -h
>> Usage of mythshutdown
>> -w/--setwakeup time (sets the wakeup time. time=yyyy-MM-ddThh:mm:ss
>> doesn't write it into nvram)
>> -t/--setscheduledwakeup (sets the wakeup time to the next scheduled recording)
>> -q/--shutdown (set nvram-wakeup time and shutdown)
>> -x/--safeshutdown (equal to -c -t -q. check shutdown possible, set
>> scheduled wakeup and shutdown)
>> -p/--startup (check startup. check will return 0 if automatic
>> 1 for manually)
>> -c/--check flag (check shutdown possible
>> flag is 0 - don't check recording status
>> 1 - do check recording status (default)
>> returns 0 ok to shutdown
>> 1 reset idle check)
>> -l/--lock (disable shutdown. check will return 1.)
>> -u/--unlock (enable shutdown. check will return 0)
>> -s/--status flag (returns a code indicating the current status)
>> flag is 0 - don't check recording status
>> 1 - do check recording status (default)
>> 0 - Idle
>> 1 - Transcoding
>> 2 - Commercial Detection
>> 4 - Grabbing EPG data
>> 8 - Recording - only valid if flag is 1
>> 16 - Locked
>> 32 - Jobs running or pending
>> 64 - In a daily wakeup/shutdown period
>> 128 - Less than 15 minutes to next wakeup period
>> 255 - Setup is running
>> -v/--verbose debug-level (Use '-v help' for level info
>> -h/--help (shows this usage)
>>
>
> .. but if your needs are simple mythbackend can handle this automatically.
>
> In mythtv-setup / General
>
> configure mythbackend to "Shutdown on Idle"
>
> and point to a suitable script to be run on shutdown passing it the
> %time parameter which mythbackend will set to the time of the next
> recording
>
> and a suitable command to shutdown the system.
>
> Then, when the backend is not recording or transcoding, and no
> frontends are connected mythtbackend will pass the time of the next
> recording to your script, which you can use to configure the ACPI
> wakeup, and shutdown the system.
>
> Works Well
>
> http://www.mythtv.org/wiki/ACPI_Wakeup#Integrate_into_mythTV_2
>
>
> or use the mythwelcome application which does the above (and more) for you
>
> http://www.mythtv.org/wiki/Mythwelcome
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users
More information about the mythtv-users
mailing list