How can I add a key combination to restart vdr in yaVDR 0.3a?

  • Hi.


    Sometimes I found hanged vdr in yaVDR 0.3a. Then I have to connect by mean ssh in order to execute "sudo restart vdr" and make it work again.


    How can I do the same thing using remote control and a key combination?


    Thanks in advance
    Regards
    jbjbjb

    VDR 1: Intel NUC6i5SYK || SSD 128Gb M.2 2242 ADATA PREMIER || External HD: W.D. Elements 5 Tb || RAM: 4 Gb KINGSTON HYPERX IMPACT − DDR4 || Remote compatible Microsoft Media Center || 3 tuners pctv nanoStick || easyVdr 3.0
    VDR 2: Xtreamer Ultra || HD 2 Tb || RAM: 4 Gb || Remote compatible Microsoft Media Center || 3 tuners pctv nanoStick || yaVdr 0.6
    VDR 3: Siemens Gigaset M740 AV + HD Western Digital "My Book Essential-2, 1Tb" (6 partitions ext2) || VDR-NG-EM 0.6 Pro - Rev 844

  • You should look into irexec and .lircrc. As I am not at home right now, I cannot give you a useable example.


    Joachim

    Registrieter VDR User Nr. 1237


  • Thanks. If it do not take too much time, I will appreciate the example.


    Regards
    jbjbjb

    VDR 1: Intel NUC6i5SYK || SSD 128Gb M.2 2242 ADATA PREMIER || External HD: W.D. Elements 5 Tb || RAM: 4 Gb KINGSTON HYPERX IMPACT − DDR4 || Remote compatible Microsoft Media Center || 3 tuners pctv nanoStick || easyVdr 3.0
    VDR 2: Xtreamer Ultra || HD 2 Tb || RAM: 4 Gb || Remote compatible Microsoft Media Center || 3 tuners pctv nanoStick || yaVdr 0.6
    VDR 3: Siemens Gigaset M740 AV + HD Western Digital "My Book Essential-2, 1Tb" (6 partitions ext2) || VDR-NG-EM 0.6 Pro - Rev 844

  • Hi jbjbjb,
    are you shure that vdr it self hangs? On my machines there ares "only" freezes caused by vdr-sxfe or XBMC, so "sudo restart openbox" or "sudo /usr/bin/killall vdr-sxfe -9" restores the frontend and does not affect recordings made by vdr at this time.
    I added these lines to /etc/lirc/lircrc to map this function to the button "Go" defined in my /etc/lirc/lircd.conf and removed this key from the remote.conf to prevent unwanted actions within vdr when pressing the button:

    Code
    begin
            prog    =  irexec
            button  =  Go
            repeat  =  0
            config  =  /usr/bin/killall vdr-sxfe -9 | /usr/bin/logger
    end


    If you do really have to restart vdr try to exchange the command provided in "config = " respectively.

    yaVDR-Dokumentation (Ceterum censeo enchiridia esse lectitanda.)

  • Thanks a lot.


    I will try your solution.


    The problem I have is that one you mentioned. The screen freezes from time to time.


    I let you know the result of my tries.


    Regards and thanks again.
    jbjbjb

    VDR 1: Intel NUC6i5SYK || SSD 128Gb M.2 2242 ADATA PREMIER || External HD: W.D. Elements 5 Tb || RAM: 4 Gb KINGSTON HYPERX IMPACT − DDR4 || Remote compatible Microsoft Media Center || 3 tuners pctv nanoStick || easyVdr 3.0
    VDR 2: Xtreamer Ultra || HD 2 Tb || RAM: 4 Gb || Remote compatible Microsoft Media Center || 3 tuners pctv nanoStick || yaVdr 0.6
    VDR 3: Siemens Gigaset M740 AV + HD Western Digital "My Book Essential-2, 1Tb" (6 partitions ext2) || VDR-NG-EM 0.6 Pro - Rev 844

  • I am sorry.


    Before asigning the final button I made a try with Stop button creating /etc/lirc/lircrc with this code:


    Code
    begin
     prog    =  irexec
     button  = Stop
     repeat  =  0
     config  =  sudo /usr/bin/killall vdr-sxfe -9 | /usr/bin/logger 
    end


    Then I restarted, but nothing happens pressing Stop button.


    What else can I try?


    Thanks
    jbjbjb

    VDR 1: Intel NUC6i5SYK || SSD 128Gb M.2 2242 ADATA PREMIER || External HD: W.D. Elements 5 Tb || RAM: 4 Gb KINGSTON HYPERX IMPACT − DDR4 || Remote compatible Microsoft Media Center || 3 tuners pctv nanoStick || easyVdr 3.0
    VDR 2: Xtreamer Ultra || HD 2 Tb || RAM: 4 Gb || Remote compatible Microsoft Media Center || 3 tuners pctv nanoStick || yaVdr 0.6
    VDR 3: Siemens Gigaset M740 AV + HD Western Digital "My Book Essential-2, 1Tb" (6 partitions ext2) || VDR-NG-EM 0.6 Pro - Rev 844

    Einmal editiert, zuletzt von jbjbjb ()

  • Does it work if you omit sudo?

    yaVDR-Dokumentation (Ceterum censeo enchiridia esse lectitanda.)

  • Does it work if you omit sudo?


    Nop, I tried it before.

    VDR 1: Intel NUC6i5SYK || SSD 128Gb M.2 2242 ADATA PREMIER || External HD: W.D. Elements 5 Tb || RAM: 4 Gb KINGSTON HYPERX IMPACT − DDR4 || Remote compatible Microsoft Media Center || 3 tuners pctv nanoStick || easyVdr 3.0
    VDR 2: Xtreamer Ultra || HD 2 Tb || RAM: 4 Gb || Remote compatible Microsoft Media Center || 3 tuners pctv nanoStick || yaVdr 0.6
    VDR 3: Siemens Gigaset M740 AV + HD Western Digital "My Book Essential-2, 1Tb" (6 partitions ext2) || VDR-NG-EM 0.6 Pro - Rev 844

  • Is irexec running?
    --
    ps -AF | grep irexec
    --


    Is irexec running as root? Then you do not need sudo. Because root is allowed to run all commands.


    BTW:
    with
    --
    ircat --config=/etc/lirc/lircrc irexec
    --
    you could test your lircrc file. Press Button "Stop" and you should get "sudo /usr/bin/killall vdr-sxfe -9 | /usr/bin/logger" printet on the console.


    cu

  • It is only a guess, but is the command that you want to execute with sudo in the sudoers file?


    Yes, it is in sudoers file for "ALL" commands of user "VDR".

    VDR 1: Intel NUC6i5SYK || SSD 128Gb M.2 2242 ADATA PREMIER || External HD: W.D. Elements 5 Tb || RAM: 4 Gb KINGSTON HYPERX IMPACT − DDR4 || Remote compatible Microsoft Media Center || 3 tuners pctv nanoStick || easyVdr 3.0
    VDR 2: Xtreamer Ultra || HD 2 Tb || RAM: 4 Gb || Remote compatible Microsoft Media Center || 3 tuners pctv nanoStick || yaVdr 0.6
    VDR 3: Siemens Gigaset M740 AV + HD Western Digital "My Book Essential-2, 1Tb" (6 partitions ext2) || VDR-NG-EM 0.6 Pro - Rev 844


  • Hi:


    Code
    ps -AF | grep irexec


    returns

    Code
    1631  1619  0   835   832   1 20:00 pts/1	00:00:00 grep --color=auto irexec


    and with

    Code
    ircat --config=/etc/lirc/lircrc irexec


    when I press Stop button, it returns

    Code
    sudo /usr/bin/killall vdr-sxfe -9 | /usr/bin/logger


    Does that means that it is working?


    Regards.
    jbjbjb

    VDR 1: Intel NUC6i5SYK || SSD 128Gb M.2 2242 ADATA PREMIER || External HD: W.D. Elements 5 Tb || RAM: 4 Gb KINGSTON HYPERX IMPACT − DDR4 || Remote compatible Microsoft Media Center || 3 tuners pctv nanoStick || easyVdr 3.0
    VDR 2: Xtreamer Ultra || HD 2 Tb || RAM: 4 Gb || Remote compatible Microsoft Media Center || 3 tuners pctv nanoStick || yaVdr 0.6
    VDR 3: Siemens Gigaset M740 AV + HD Western Digital "My Book Essential-2, 1Tb" (6 partitions ext2) || VDR-NG-EM 0.6 Pro - Rev 844

  • Code
    ps -AF | grep irexec


    returns

    Code
    1631  1619  0   835   832   1 20:00 pts/1	00:00:00 grep --color=auto irexec


    The irexec Daemon is not running. I do not know Ubuntu, on Debian this works OOTB. You may need an Upstart Job or adjust your /etc/lirc/hardware.conf


    cu

  • Then, anyone with knowledge of yavdr 0.3a can help with the issue?

    VDR 1: Intel NUC6i5SYK || SSD 128Gb M.2 2242 ADATA PREMIER || External HD: W.D. Elements 5 Tb || RAM: 4 Gb KINGSTON HYPERX IMPACT − DDR4 || Remote compatible Microsoft Media Center || 3 tuners pctv nanoStick || easyVdr 3.0
    VDR 2: Xtreamer Ultra || HD 2 Tb || RAM: 4 Gb || Remote compatible Microsoft Media Center || 3 tuners pctv nanoStick || yaVdr 0.6
    VDR 3: Siemens Gigaset M740 AV + HD Western Digital "My Book Essential-2, 1Tb" (6 partitions ext2) || VDR-NG-EM 0.6 Pro - Rev 844

  • Hi again.


    Summarizing, does someone knows and can write a litle example for configuring the remote control to execute the command proposed by seahawk1986 "sudo /usr/bin/killall vdr-sxfe -9 | /usr/bin/logger" by pressing the key combination "Stop-Nine-Stop" in yaVDR 0.3a?


    Regards.
    jbjbjb

    VDR 1: Intel NUC6i5SYK || SSD 128Gb M.2 2242 ADATA PREMIER || External HD: W.D. Elements 5 Tb || RAM: 4 Gb KINGSTON HYPERX IMPACT − DDR4 || Remote compatible Microsoft Media Center || 3 tuners pctv nanoStick || easyVdr 3.0
    VDR 2: Xtreamer Ultra || HD 2 Tb || RAM: 4 Gb || Remote compatible Microsoft Media Center || 3 tuners pctv nanoStick || yaVdr 0.6
    VDR 3: Siemens Gigaset M740 AV + HD Western Digital "My Book Essential-2, 1Tb" (6 partitions ext2) || VDR-NG-EM 0.6 Pro - Rev 844

  • Hi, I achieved restart vdr-sxfe using a key combination in my remote control with yavdr 0.3a.
    I guess it could be made more easily but my knowledge in linux is basic.


    First of all, I created a file named "StopNineStopKeys" with:

    Code
    #nano StopNineStopKeys


    containing:


    Code
    begin
        prog   = irexec
        button = Stop
        button = Nine
        button = Stop
        config = /usr/bin/killall vdr-sxfe -9 | /usr/bin/logger
    end


    Then I changed owner (I do not know if necessary) with:

    Code
    #sudo chown vdr:vdr StopNineStopKeys


    After that, I created another file named "StopNineStop" that is a script:

    Code
    #nano StopNineStop


    containing:


    Bash
    #!/bin/sh
    /usr/bin/irexec -d /path_To_StopNineStopKeys/StopNineStopKeys &
    exit


    Then I changed owner (I do not know if necessary) with:

    Code
    #sudo chown vdr:vdr StopNineStop


    And I made it executable:

    Code
    #sudo chmod +x StopNineStop


    I copied StopNineStop to /etc/init.d/

    Code
    #sudo cp StopNineStop /etc/init.d/


    And I force it to execute every time the system starts:

    Code
    #sudo ln -s /etc/init.d/StopNineStop /etc/rc2.d/S99StopNineStop
    #sudo ln -s /etc/init.d/StopNineStop /etc/rc3.d/S99StopNineStop
    #sudo ln -s /etc/init.d/StopNineStop /etc/rc4.d/S99StopNineStop
    #sudo ln -s /etc/init.d/StopNineStop /etc/rc5.d/S99StopNineStop


    After restart the system I can recover the freezing of the screen by pressing Stop-9-Stop keys.


    Regards.
    jbjbjb

    VDR 1: Intel NUC6i5SYK || SSD 128Gb M.2 2242 ADATA PREMIER || External HD: W.D. Elements 5 Tb || RAM: 4 Gb KINGSTON HYPERX IMPACT − DDR4 || Remote compatible Microsoft Media Center || 3 tuners pctv nanoStick || easyVdr 3.0
    VDR 2: Xtreamer Ultra || HD 2 Tb || RAM: 4 Gb || Remote compatible Microsoft Media Center || 3 tuners pctv nanoStick || yaVdr 0.6
    VDR 3: Siemens Gigaset M740 AV + HD Western Digital "My Book Essential-2, 1Tb" (6 partitions ext2) || VDR-NG-EM 0.6 Pro - Rev 844

  • Hi.


    I have a problem with the proposed solution. I tried it restarting the computer and it worked perfectly, but today I did a complete shutdown, but the script for launching irexec has not been executed when the computer booted up.


    Someone can tell me if there are something wrong in the proposed solution?


    Thanks.
    Regards
    jbjbjb

    VDR 1: Intel NUC6i5SYK || SSD 128Gb M.2 2242 ADATA PREMIER || External HD: W.D. Elements 5 Tb || RAM: 4 Gb KINGSTON HYPERX IMPACT − DDR4 || Remote compatible Microsoft Media Center || 3 tuners pctv nanoStick || easyVdr 3.0
    VDR 2: Xtreamer Ultra || HD 2 Tb || RAM: 4 Gb || Remote compatible Microsoft Media Center || 3 tuners pctv nanoStick || yaVdr 0.6
    VDR 3: Siemens Gigaset M740 AV + HD Western Digital "My Book Essential-2, 1Tb" (6 partitions ext2) || VDR-NG-EM 0.6 Pro - Rev 844

  • @jbjbjb


    You are digging in a wrong direction. As Keine_Ahnung has mentioned, the irexec daemon is not running,
    so you have to find out how to auto start this daemon on ubuntu/yavdr. Just google for it.

  • Hi.


    I thought that it was precisely what I was doing. Do not should the links in etc/rcX.d/S99StopNineStop do what you are proposing? They work correctly with a reboot but not from a total shutdown.


    I will try googling deeply...


    Thanks.
    jbjbjb

    VDR 1: Intel NUC6i5SYK || SSD 128Gb M.2 2242 ADATA PREMIER || External HD: W.D. Elements 5 Tb || RAM: 4 Gb KINGSTON HYPERX IMPACT − DDR4 || Remote compatible Microsoft Media Center || 3 tuners pctv nanoStick || easyVdr 3.0
    VDR 2: Xtreamer Ultra || HD 2 Tb || RAM: 4 Gb || Remote compatible Microsoft Media Center || 3 tuners pctv nanoStick || yaVdr 0.6
    VDR 3: Siemens Gigaset M740 AV + HD Western Digital "My Book Essential-2, 1Tb" (6 partitions ext2) || VDR-NG-EM 0.6 Pro - Rev 844

  • What do you have in /etc/init/irexec.conf?

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!