easyVDR Kopie des easyVDR-Forums zum Nachschlagen
Hardware Wakeup mit dem Linux4 Media "L4M132C" Display

easyVDR - >VARforumsname - >Hardware Wakeup mit dem Linux4 Media "L4M132C" Display

jurhart  03.Mar.2011 10:03:20
Hallo,
ich möchte das L4M32C Display als Hardware Wakeup einsetzen, es biete ja die Möglichkeit eine Alarmzeit zu setzen dazu wird dieser Befehl benutzt :l4m132c_tool -p "/dev/usb/hiddev0" -a "23:30" -d 0x41  # set alarm at 23:30, saturday (bit6) and sunday (bit0)
wie kann ich jetzt aus der timers.conf die Weckzeit an das Display übergeben?
VDR1 Easyvdr 06.02 asrock_k7s41gx AMD Sempron 2200, 256 MB Ram Graph LCD von Rebach online DVBs Technotrent 1.6  WinTv Nova 320 GB Festplatte Seagate Brenner Toshiba SD 2005
zzzözzz  03.Mar.2011 21:18:11


vdr(1) - Linux man page
NAME
vdr - the Video Disk Recorder  SYNOPSIS vdr   DESCRIPTION 

-s cmd, --shutdown=cmd
  Call cmd to shutdown the computer. See the file INSTALL for more information




Automatic shutdown:
-------------------
If you define a shutdown command via the '-s' command line option, VDR
will call the given command if there is currently no recording or replay
active, the user has been inactive for at least MinUserInactivity minutes
and the next timer event is at least MinEventTimeout minutes in the future
(see the Setup parameters in MANUAL).
The command given in the '-s' option will be called with five parameters.
The first one is the time (in UTC) of the next timer event or plugin wakeup
time (as a time_t type number), and the second one is the number of
seconds from the current time until the next timer event. Your program can
choose which one to use for programming some sort of hardware device that
makes sure the computer will be restarted in time before the next timer
event. Your program must also initiate the actual shutdown procedure of the
computer. VDR will not automatically exit after calling the shutdown
program, but will rather continue normally until it receives a SIGTERM when
the computer is actually shut down. So in case the shutdown fails, or the
shutdown program for some reason decides not to perform a shutdown, VDR
will stay up and running and will call the shutdown program again after a
while. The command will be started in a separate background session, so it
can continue to run even after VDR has terminated.
If there are currently no timers active and there is no plugin wakeup
time, both parameters will be '0'. In that case the program shall not set
the hardware for automatic restart and only perform the system shutdown.
A program that uses the second parameter to set the hardware for restart
must therefore also check whether the first parameter is '0'.
If the wakeup time is given by a timer, the third parameter will be the
number of the channel that will be recorded, otherwise it will be 0. The
fourth parameter contains the file name of the recording as defined in the
timer, the name of the plugin that requested the wakeup time, or an empty
string if no wakeup time is present. These can be used by the shutdown
program to show that information on some display interface etc.
The fifth parameter indicates the reason why the shutdown was requested.
'0' means this is an automatic shutdown due to some timeout, while '1' means
that this is a user requested shutdown (resulting from pressing the "Power"
key). The shutdown program may use this information to decide whether or
not to actually perform the system shutdown.
If a timer is currently recording, or a recording would start within the
next 30 minutes (default for the "Min. event timeout" setup parameter), and
the user insists in shutting down now, the first and second parameter will
correspond to a time that is "Min. event timeout" minutes in the future.
Before the shutdown program is called, the user will be prompted to inform
him that the system is about to shut down. If any remote control key is
pressed while this prompt is visible, the shutdown will be cancelled (and
tried again later). The shutdown prompt will be displayed for 5 minutes, which
should be enough time for the user to react.
A sample shell script to be used with the '-s' option might look like this:
#!/bin/sh
setRTCwakeup $(($1 - 300))
sudo halt
Here 'setRTCwakeup' would be some program that uses the first parameter
(which is the absolute time of the next timer event) to set the Real Time
Clock so that it wakes up the computer 5 minutes (i.e. 300 seconds) before
that event. The 'sudo halt' command then shuts down the computer.
You will have to substitute both commands with whatever applies to your
particular hard- and software environment.
If the '-s' option is present, the VDR machine can be turned off by pressing
the "Power" key on the remote control.

jurhart  04.Mar.2011 12:24:18
hallo,

Danke für die Antwort,

ich dachte da mehr an ein Skript nur habe ich wirklich keine Ahnung wie so etwas geschrieben wird,
das Skript sollte folgendes erledigen

1. Alarm des Display deaktivieren
l4m132c_tool -p "/dev/usb/hiddev0" -d 0                # de-activate alarm
2. Uhrzeit aktualisieren
l4m132c_tool -p "/dev/usb/hiddev0" -t                    # set date/time of display module
3. die Weckzeit aus der timers.conf auslesen und die variablen Tag und Uhrzeit an das Display übergeben und genau das ist der Punkt
damit dann die Alarmzeit gesetzt werden kann und das Display den Vdr einschaltet.
Beispiel:
l4m132c_tool -p "/dev/usb/hiddev0" -a "15:36" -d 1  # set alarm at 15:36, Montag




VDR1 Easyvdr 06.02 asrock_k7s41gx AMD Sempron 2200, 256 MB Ram Graph LCD von Rebach online DVBs Technotrent 1.6  WinTv Nova 320 GB Festplatte Seagate Brenner Toshiba SD 2005
zzzözzz  04.Mar.2011 12:56:46
[quote='jurhart link' pid='11546' dateline='1299237858']
die Weckzeit aus der timers.conf auslesen

Hast du überhaupt den Text gelesen?
jurhart  04.Mar.2011 13:17:37
ja hab ich, da ich der Englischen Sprache nicht mächtig bin muss ich mir das alles online übersetzen, ich habe das nicht verstanden.
Da ich davon keine Ahnung habe suche ich ja hier Hilfe
VDR1 Easyvdr 06.02 asrock_k7s41gx AMD Sempron 2200, 256 MB Ram Graph LCD von Rebach online DVBs Technotrent 1.6  WinTv Nova 320 GB Festplatte Seagate Brenner Toshiba SD 2005
zzzözzz  04.Mar.2011 15:42:28
Ah, ok..

du brauchst die timers.conf nicht; vdr übermittelt die nächste wakeup time als time_t.