script that can activate a specific TV channel when a receiver is put into standby

Antworten
Nachricht
Autor
mitcd
Beginners
Beginners
Beiträge: 16
Registriert: 14 Aug 2013 11:39
Wohnort: Romania
Receiver 1: GigaBlue Quad
Receiver 2: VU+ Solo 4K
Hat gedankt: 27 Mal
Hat Dank erhalten: 5 Mal

script that can activate a specific TV channel when a receiver is put into standby

#1

Beitrag von mitcd »

Hi all

script that can activate a specific TV channel when a receiver is put into standby mode
Is it possible to do it?
Benutzeravatar
Gio60
VIP
VIP
Beiträge: 3782
Registriert: 12 Okt 2020 11:33
Receiver 1: Axas HIS 4K Combo mit ATV 7.4/7.5
Receiver 2: OSmio4K+ mit ATV 7.4/7.5
Receiver 3: AX HD61 mit ATV 7.4/7.5
Receiver 4: Mutant HD51 mit ATV 7.4/7.5
Receiver 5: PULSe4k mit ATV 7.4/7.5
Hat gedankt: 955 Mal
Hat Dank erhalten: 2102 Mal
Geschlecht:

#2

Beitrag von Gio60 »

Sorry if I have missunderstand you,but why with a script?Channellist/Menue/Set as startup service.
Dateianhänge
1_0_19_283D_3FB_1_C00000_0_0_0_20230419114554.jpg
1_0_19_283D_3FB_1_C00000_0_0_0_20230419114536.jpg
1_0_19_283D_3FB_1_C00000_0_0_0_20230419114444.jpg
Ab 2024 nur selten aktiv,wenn die Gesundheit einem einen Strich durch die Rechnung macht.
mitcd
Beginners
Beginners
Beiträge: 16
Registriert: 14 Aug 2013 11:39
Wohnort: Romania
Receiver 1: GigaBlue Quad
Receiver 2: VU+ Solo 4K
Hat gedankt: 27 Mal
Hat Dank erhalten: 5 Mal

#3

Beitrag von mitcd »

Thank you for the answer
I want that specific channel to run in the "background", after I activate standby mode
Benutzeravatar
Papi2000
Super Moderator
Super Moderator
Beiträge: 25923
Registriert: 20 Apr 2013 20:09
Receiver 1: Viele GigaBlues
Receiver 2: DM und ZGemma
Receiver 3: bissl VU
Hat gedankt: 4496 Mal
Hat Dank erhalten: 8313 Mal

#4

Beitrag von Papi2000 »

In standby, there is no tuner activate, and no stream within the box active, too.
You only can call a specific stream from an external device (other box or PC), to enforce an active stream running, when you sent the box itself to standby. In deep that is of course not possible.
Grüßle
Ralf
--------------------------------------------
---- Einen Receiver kann sich jeder kaufen - Eine stabile E²-Box muß man sich verdienen! ----




Bild
mitcd
Beginners
Beginners
Beiträge: 16
Registriert: 14 Aug 2013 11:39
Wohnort: Romania
Receiver 1: GigaBlue Quad
Receiver 2: VU+ Solo 4K
Hat gedankt: 27 Mal
Hat Dank erhalten: 5 Mal

#5

Beitrag von mitcd »

Yes, this is how I do it at the moment. I activate the service from another device. I was curious if everything can be done automatically with a script.
Benutzeravatar
Makumbo
VIP
VIP
Beiträge: 1414
Registriert: 13 Mär 2016 07:42
Receiver 1: Vu+ DUO 4K mit 7.4
Hat gedankt: 670 Mal
Hat Dank erhalten: 534 Mal

#6

Beitrag von Makumbo »

Gio60 hat geschrieben:Sorry if I have missunderstand you,but why with a script?Channellist/Menue/Set as startup service.


Der Dateianhang 01 Frage.jpg existiert nicht mehr.


Alles in englisch, aber dann "Frage"?

Gruß - Makumbo
Dateianhänge
01 Frage.jpg
01 Frage.jpg (6.19 KiB) 126 mal betrachtet
Benutzeravatar
s3n0
Senior member
Senior member
Beiträge: 1580
Registriert: 02 Jan 2017 14:38
Receiver 1: Vu+ Zero 4K
Receiver 2: Vu+ Solo SE V2
Hat gedankt: 108 Mal
Hat Dank erhalten: 416 Mal
Kontaktdaten:

#7

Beitrag von s3n0 »

Hi.

It is possible to do it !

It is enough to call the tuner through the OpenWebif interface using the Linux Shell, and the TV display will not turn on (it will remain off). Namely, calling the OpenWebif interface, in order to switch the channel, does not affect whether the TV is in standby. Likewise, Enigma2 itself will remain in Standby mode. Only the DVB tuner is simply activated / started, using the OpenWebif interface:

Code: Alles auswählen

wget -qO- "http://127.0.0.1/api/zap?sRef=1:0:19:3731:C8E:3:EB0000:0:0:0:"    # activating the tuner in the set-top box, with the help of OpenWebif call 

wget -qO- "http://127.0.0.1/api/zap?sRef=0"                                  # if you want stop the tuner


Find the Service Reference Code (SRC) yourself, the one you need. You can find it, for example, in the userbouquet files "/etc/enigma2/userbouquet.*.tv" or you can look through the OpenWebif interface (by entering the set-top-box IP address, into the web browser on your PC, if both the PC and the set-top box are located in the same computer network - LAN). The example uses SRC for the "Markiza" satellite channel (Slovak Republic, satellite 23.5E).

If you wanted a fully automated script, then it would be possible to use two scripts:
[font=Courier New]/usr/script/StandbyEnter.sh
/usr/script/StandbyLeave.sh[/font]
...which are called every time you enter or leave the standby mode in the Enigma2 algorithm.

If these scripts (and also directories) does not exists, you must create them. Then assign execution rights to the files ([font=Courier New]chmod a+x /usr/script/*.sh[/font])

One small example of the [font=Courier New]/usr/script/StandbyEnter.sh[/font] script:

Code: Alles auswählen

#!/bin/bash

ZAPCHANNEL="1:0:19:3731:C8E:3:EB0000:0:0:0:"    # Service-Reference-Code of the satellite channel - for invoke the ZAP function, via Enigma2 / Open-Webif
ZAPDELAY=3                                      # some delay in seconds

CMD="sleep ${ZAPDELAY}; /usr/bin/wget -qO- 'http://127.0.0.1/api/zap?sRef=${ZAPCHANNEL}' > /dev/null 2>&1;"

eval "${CMD}" &>/dev/null & disown;             # run the $CMD at the background
Benutzeravatar
Gio60
VIP
VIP
Beiträge: 3782
Registriert: 12 Okt 2020 11:33
Receiver 1: Axas HIS 4K Combo mit ATV 7.4/7.5
Receiver 2: OSmio4K+ mit ATV 7.4/7.5
Receiver 3: AX HD61 mit ATV 7.4/7.5
Receiver 4: Mutant HD51 mit ATV 7.4/7.5
Receiver 5: PULSe4k mit ATV 7.4/7.5
Hat gedankt: 955 Mal
Hat Dank erhalten: 2102 Mal
Geschlecht:

#8

Beitrag von Gio60 »

Makumbo hat geschrieben:[ATTACH=CONFIG]90788[/ATTACH]

Alles in englisch, aber dann "Frage"?

Gruß - Makumbo

Joo, das passiert, wenn man die Sprache ändert ohne einen Gui Neustart zu machen, macht man einen Gui Neustart, passt es dann wieder, wird dann "question" angezeigt.
Ab 2024 nur selten aktiv,wenn die Gesundheit einem einen Strich durch die Rechnung macht.
Benutzeravatar
Papi2000
Super Moderator
Super Moderator
Beiträge: 25923
Registriert: 20 Apr 2013 20:09
Receiver 1: Viele GigaBlues
Receiver 2: DM und ZGemma
Receiver 3: bissl VU
Hat gedankt: 4496 Mal
Hat Dank erhalten: 8313 Mal

#9

Beitrag von Papi2000 »

s3n0 hat geschrieben:Hi.

It is possible to do it !

It is enough to call the tuner through the OpenWebif interface using the Linux Shell, and the TV display will not turn on (it will remain off). Namely, calling the OpenWebif interface, in order to switch the channel, does not affect whether the TV is in standby. Likewise, Enigma2 itself will remain in Standby mode. Only the DVB tuner is simply activated / started, using the OpenWebif interface:

Code: Alles auswählen

wget -qO- "http://127.0.0.1/api/zap?sRef=1:0:19:3731:C8E:3:EB0000:0:0:0:"    # activating the tuner in the set-top box, with the help of OpenWebif call 

wget -qO- "http://127.0.0.1/api/zap?sRef=0"                                  # if you want stop the tuner


Find the Service Reference Code (SRC) yourself, the one you need. You can find it, for example, in the userbouquet files "/etc/enigma2/userbouquet.*.tv" or you can look through the OpenWebif interface (by entering the set-top-box IP address, into the web browser on your PC, if both the PC and the set-top box are located in the same computer network - LAN). The example uses SRC for the "Markiza" satellite channel (Slovak Republic, satellite 23.5E).

If you wanted a fully automated script, then it would be possible to use two scripts:
[font=Courier New]/usr/script/StandbyEnter.sh
/usr/script/StandbyLeave.sh[/font]
...which are called every time you enter or leave the standby mode in the Enigma2 algorithm.

If these scripts and directories does not exists, you must create them and assign them execution rights ([font=Courier New]chmod a+x /usr/script/*.sh[/font])

One small example of the [font=Courier New]/usr/script/StandbyEnter.sh[/font] :

Code: Alles auswählen

#!/bin/bash

ZAPCHANNEL="1:0:19:3731:C8E:3:EB0000:0:0:0:"    # Service-Reference-Code of the satellite channel - for invoke the ZAP function, via Enigma2 / Open-Webif
ZAPDELAY=3                                      # some delay in seconds

CMD="sleep ${ZAPDELAY}; /usr/bin/wget -qO- 'http://127.0.0.1/api/zap?sRef=${ZAPCHANNEL}' > /dev/null 2>&1;"

eval "${CMD}" &>/dev/null & disown;             # run the $CMD at the background


You can do that. But in the WebIF you will see, that even with that ZAP (yes, it is done) NO tuner will be active, and therefore also NO internal stream..
You could make a virtual stream-workflow to " -> NONE" (device zero as output), but you would need to pipe all neccesary commands yourself in the script.
And in times of reducing power consumption, that may NOT be done, because it is pure waste.
Grüßle
Ralf
--------------------------------------------
---- Einen Receiver kann sich jeder kaufen - Eine stabile E²-Box muß man sich verdienen! ----




Bild
Benutzeravatar
s3n0
Senior member
Senior member
Beiträge: 1580
Registriert: 02 Jan 2017 14:38
Receiver 1: Vu+ Zero 4K
Receiver 2: Vu+ Solo SE V2
Hat gedankt: 108 Mal
Hat Dank erhalten: 416 Mal
Kontaktdaten:

#10

Beitrag von s3n0 »

He probably needs the tuner running for the reason (I'm just guessing) to write EMMs to the decoding card... or some other similar reason. It's definitely not just for fun :) . So it's not about whether the set-top box will eat electricity or not.
Antworten

Zurück zu „English Section“