Script TV-Control Taste der Fernbedienung (power on/off) keymap?

git, sourcen, scripte und co. alles was der Hobby Coder benötigt
Nachricht
Autor
Benutzeravatar
s3n0
Senior member
Senior member
Beiträge: 1611
Registriert: 02 Jan 2017 14:38
Wohnort: SK
Receiver 1: Vu+ Zero 4K
Receiver 2: Vu+ Solo SE V2
Hat gedankt: 113 Mal
Hat Dank erhalten: 428 Mal
Kontaktdaten:

Re: Script TV-Control Taste der Fernbedienung (power on/off) keymap?

#21

Beitrag von s3n0 »

Hi.

I don't want to search the internet, but... wouldn't it be possible to switch "AC3 downmix" and "DTS downmix" without having to restart? Directly while Enigma2 is running? Maybe it could be done somehow. I don't know.

If you can't switch while Enigma2 is running, then try a quick restart of the Enigma2/GUI, without a full reboot. It takes less time. But even that will probably be an annoying wait:

Code: Alles auswählen

init 4; sleep 5; init 3;
Or restart the Enigma2/GUI with feedback:
(you can also find these two shell script functions in my simple "backrest" - backup script, here: https://github.com/s3n0/e2scripts/blob/master/backrest )

Code: Alles auswählen

init_4_with_feedback() {
    echo "Stopping the Enigma..."
    init 4
    x=0
    while [ "$x" -le 15 ] && [ $(pidof enigma2) ] ; do
        x=$(( $x + 1 ))
        sleep 1
        echo "...$x seconds waiting"
        #echo "...Enigma state = "`ps --no-headers -o stat -C enigma2`      # debugging output - for testing purpose only
    done
    if pidof enigma2 > /dev/null 2>&1 ; then
        echo "...stopping failed ! the 'backrest' script was aborted !"
        exit 1
    else
        echo "...successfully stopped after $x seconds."
    fi
}

init_3_with_feedback() {
    echo "Starting the Enigma..."
    init 3
    x=0
    while [ "$x" -le 120 ] && [ -z "$(timeout 1 wget -q -O - http://127.0.0.1/web/powerstate)" ] ; do
        x=$(( $x + 1 ))
        sleep 1
        echo "...$x seconds waiting"
    done
    echo "...+5 seconds of additional waiting (other Enigma2 modules such as OpenWebif take a long time to start)"
    sleep 5; x=$(( $x + 5 ))
    echo "...successfully started after $x seconds."
}
NOTE:
If you edit the "/etc/enigma2/settings" file, you must do it when the Enigma2 is stopped (via the init 4 command). If Enigma2 stops, the Enigma2 stores and overwrite its "/etc/enigma2/settings" file with the current configuration.
Benutzeravatar
Norrin-Radd
Member
Member
Beiträge: 57
Registriert: 01 Jul 2015 00:31
Receiver 1: Octagon SF8008
Receiver 2: Octagon SF8008
Receiver 3: Octagon SFX6018 S2
Hat gedankt: 20 Mal
Hat Dank erhalten: 3 Mal

Re: Script TV-Control Taste der Fernbedienung (power on/off) keymap?

#22

Beitrag von Norrin-Radd »

@s3n0
Thank you very much for the good advice!
In principle the script works now :-) but it is slow/uncomfortable due to the (GUI-)reboot.

At the moment I switch the AC3 downmix function via hotkey and put this hotkey (via wget) together with the hdmi-cec command to switch off the soundbar into a script. This works very quickly (less than 1 second) and works :-) But not for DTS movies.
I'll open a new thread to describe the DTS downmix problem link.
THANK YOU!
Antworten

Zurück zu „Die Bastelecke“