Ergebnis 11 bis 11 von 11
Thema: Powerstate check possible ?
-
25.03.2019, 10:21 #11
- Registriert seit
- 02.01.2017
- Ort
- Slovakia
- Beiträge
- 1.460
- Thanks (gegeben)
- 91
- Thanks (bekommen)
- 418
- Total Downloaded
- 323,0 KB
- Total Downloaded
- 323,0 KB
Box 1:Vu+ Zero 4KBox 2:Vu+ Solo SE V2Box 3:Formuer F4-TURBOThis is old TOPIC but I came across it today.
Channel switching is also possible with direct SRC (Service Reference Code).
Code:#!/bin/sh sRefCode=1:0:19:13B4:C95:3:EB0000:0:0:0: wget -q -O - "http://127.0.0.1/web/zap?sRef=$sRefCode" > /dev/null 2>&1
The disadvantage of switching over the remote control is that the user can not reorder the list of user channels (userbouquet files).
To use the remote control unit via OpenWebif, I recently created a dedicated function for bash script. It's not perfect, but it works:
Code:#!/bin/sh #### -usage: webif_rc "keycode:pause:repeat" "keycode:pause:repeat" "keycode:pause:repeat" . . . . webif_rc() { for button in "$@" # in ${arr[@]} do key=$( echo $button | cut -f1 -d ':' ) tim=$( echo $button | cut -f2 -d ':' | cut -f1 -d ':' ) rep=$( echo $button | cut -f3 -d ':' | cut -f1 -d ':' ) # echo ---- button=$button ---- key=$key -- pause=$tim -- repeat=$rep until [ $rep == "0" ] do wget -q -O - http://127.0.0.1/web/remotecontrol?command=$key > /dev/null 2>&1 sleep 0.1s sleep $tim rep=$[$rep-1] done done } #### -example: webif_rc "364:2.0:1" "158:0.1:1" "108:0.5:4" "352:0.8:1" "108:0.3:1" "352:2.0:1" "103:0.5:2" "352:0.5:1" #### FAV Recall DOWN x 4 OK DOWN OK UP x 2 OK
The answer, for the first question is here:
Code:#!/bin/sh #### a simple function to check the Standby mode (e2/OpenWebif power-state) function is_standby() { [ "$(wget -q -O - http://127.0.0.1/web/powerstate | grep '</e2instandby>' | cut -f 1)" == "true" ] } if is_standby ; then echo `date '+%Y-%m-%d %H:%M:%S'`" Enigma2 is in Standby. Enigma2 is sleeping." else echo `date '+%Y-%m-%d %H:%M:%S'`" Enigma2 is not in Standby." fi
Geändert von s3n0 (03.10.2019 um 12:02 Uhr)
-
Danke - 1 Thanks- bedankten sich
-
Advertising
Lesezeichen