Jump to content


Photo

Shell-script - Diseqc command


  • Please log in to reply
14 replies to this topic

#1 john448

  • Member
  • 9 posts

+1
Neutral

Posted 12 January 2022 - 18:59

Hi,

 

I need a simple script to send a Diseqc command - e.g. change port to B. Could someone help :) ?

 



Re: Shell-script - Diseqc command #2 mrvica

  • Senior Member
  • 1,216 posts

+80
Good

Posted 12 January 2022 - 23:09

I just compiled it without testing, you´ll propably have to stop enigma2

usage: FRONTEND=/dev/dvb/adapterX/frontendX diseqc [test_seq_no]

root@h7:/tmp# ./diseqc
diseqc test: using '/dev/dvb/adapter0/frontend0'
open: Device or resource busy
root@h7:/tmp# init 4
root@h7:/tmp# ./diseqc
diseqc test: using '/dev/dvb/adapter0/frontend0'
msg: e0 10 38 f0 00 00
diseqc_send_msg:  SEC_VOLTAGE_13  SEC_MINI_A  SEC_TONE_OFF
msg: e0 10 38 f2 00 00
diseqc_send_msg:  SEC_VOLTAGE_18  SEC_MINI_A  SEC_TONE_OFF
msg: e0 10 38 f1 00 00
diseqc_send_msg:  SEC_VOLTAGE_13  SEC_MINI_A  SEC_TONE_ON
msg: e0 10 38 f3 00 00
diseqc_send_msg:  SEC_VOLTAGE_18  SEC_MINI_A  SEC_TONE_ON
msg: e0 10 38 f4 00 00
diseqc_send_msg:  SEC_VOLTAGE_13  SEC_MINI_B  SEC_TONE_OFF
msg: e0 10 38 f6 00 00
diseqc_send_msg:  SEC_VOLTAGE_18  SEC_MINI_B  SEC_TONE_OFF
msg: e0 10 38 f5 00 00
diseqc_send_msg:  SEC_VOLTAGE_13  SEC_MINI_B  SEC_TONE_ON
msg: e0 10 38 f7 00 00
diseqc_send_msg:  SEC_VOLTAGE_18  SEC_MINI_B  SEC_TONE_ON
msg: e0 10 38 f8 00 00

Attached Files



Re: Shell-script - Diseqc command #3 john448

  • Member
  • 9 posts

+1
Neutral

Posted 14 January 2022 - 03:42

The program seams to work but nothing happens. 

 

I have 4x1 1.2 diseqc controller. 



Re: Shell-script - Diseqc command #4 mrvica

  • Senior Member
  • 1,216 posts

+80
Good

Posted 16 January 2022 - 15:51

Hi,
Thank you very much for your prompt answer.
I don't know much about coding.
Could you instruct me how to use the script you wrote.
Thanks again.
 

you wrote a P.M. to me but I could not answer it, could be a board problem, so I am putting it here, there are much more people to answer it



Re: Shell-script - Diseqc command #5 john448

  • Member
  • 9 posts

+1
Neutral

Posted 16 January 2022 - 18:56

Hi,

 

I did more testing and.... it works!

 

Marvica - thank you very much for your help!!!



Re: Shell-script - Diseqc command #6 mrvica

  • Senior Member
  • 1,216 posts

+80
Good

Posted 17 January 2022 - 14:11

people surely want to know how you did it, how did you get the tuner to not be in use (maybe switching to an IPTV service?), you wrote down the sequence you got starting diseqc without parameter and then use that parameter i.E.

diseqc e0 10 38 f7 00 00

Am I right?



Re: Shell-script - Diseqc command #7 john448

  • Member
  • 9 posts

+1
Neutral

Posted 18 January 2022 - 20:52

I have VU+ Duo 4k SE (with FBC tuners) which doesn't turn off LNB power in standby mode. By changing diseqc port to B (to which nothing will be connected) I will eliminate power consumption.

 

Here is a script which checks if a tuner is in use. If no tuner is in use the Diseqc switch will be turned to port B.

 

 

diseqc.sh:

 

#! /bin/bash
 
tuner=$(ps | grep -c kdvb)
 
if [ $tuner -le 1 ]
then 
source /usr/script/diseqc 3
 
fi
 
 
 
In LNB settings I added Diseqc 1.0 command - port A
 
 
And finally I put this line: 
 
*/1 * * * * /usr/script/diseqc.sh
 
 
in  /var/spool/cron/root file to run the script every minute.
 
 
Ps. VU+ consumes ~18W in standby mode and 14.5W without LNB connected. 


Re: Shell-script - Diseqc command #8 mrvica

  • Senior Member
  • 1,216 posts

+80
Good

Posted 19 January 2022 - 20:38

interesting! an undocumented feature of diseqc



Re: Shell-script - Diseqc command #9 Dimitrij

  • PLi® Core member
  • 9,964 posts

+334
Excellent

Posted 23 January 2022 - 12:49

 

I have VU+ Duo 4k SE (with FBC tuners) which doesn't turn off LNB power in standby mode. By changing diseqc port to B (to which nothing will be connected) I will eliminate power consumption.

 

Here is a script which checks if a tuner is in use. If no tuner is in use the Diseqc switch will be turned to port B.

 

 

diseqc.sh:

 

#! /bin/bash
 
tuner=$(ps | grep -c kdvb)
 
if [ $tuner -le 1 ]
then 
source /usr/script/diseqc 3
 
fi
 
 
 
In LNB settings I added Diseqc 1.0 command - port A
 
 
And finally I put this line: 
 
*/1 * * * * /usr/script/diseqc.sh
 
 
in  /var/spool/cron/root file to run the script every minute.
 
 
Ps. VU+ consumes ~18W in standby mode and 14.5W without LNB connected. 

 

You can try to add this solution to the image as an option in the tuner settings.


GigaBlue UHD Quad 4K /Lunix3-4K/Solo 4K


Re: Shell-script - Diseqc command #10 hw9258

  • Senior Member
  • 29 posts

+3
Neutral

Posted 2 February 2022 - 17:29

Perhaps similar lower consumption could be achieved with the following empty channel in userbouquet.favourites.tv or does the tuner stay on?

 

#SERVICE 1:0:1:0:0:0:0:0:0:0:EMPTY:EMPTY
#DESCRIPTION EMPTY

 

If john448 could take the time and measure the consumption, it would be interesting.



Re: Shell-script - Diseqc command #11 WanWizard

  • PLi® Core member
  • 68,306 posts

+1,719
Excellent

Posted 2 February 2022 - 17:37

I have VU+ Duo 4k SE (with FBC tuners) which doesn't turn off LNB power in standby mode. By changing diseqc port to B (to which nothing will be connected) I will eliminate power consumption.

 

I wonder what the point of this is, as a VU+ always powers all inputs, not only the selected tuner. Even in standby.

 

This is done by VU+ to work around a bug in their drivers that they don't seem to be able to fix (if A is in use, a recording starts on C, then A stops, and the LNB power cuts with only a leaf tuner in use).

 

The only way to reduce power consumption is switch the box off.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: Shell-script - Diseqc command #12 Abu Baniaz

  • PLi® Contributor
  • 2,414 posts

+61
Good

Posted 2 February 2022 - 17:49

This was mentioned to the OP on another forum. It was suggested that he uses a power timer to put box into deep standby

 

standby = switch off display and audio. everything still running

deep standby = everything off apart from waiting for remote response or recording timer.



Re: Shell-script - Diseqc command #13 WanWizard

  • PLi® Core member
  • 68,306 posts

+1,719
Excellent

Posted 2 February 2022 - 17:59

There are boxes that cut the LNB power in standby as well, but the VU+ doesn't. Its hardcoded in the current drivers.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: Shell-script - Diseqc command #14 john448

  • Member
  • 9 posts

+1
Neutral

Posted 4 February 2022 - 23:48

 

I have VU+ Duo 4k SE (with FBC tuners) which doesn't turn off LNB power in standby mode. By changing diseqc port to B (to which nothing will be connected) I will eliminate power consumption.

 

I wonder what the point of this is, as a VU+ always powers all inputs, not only the selected tuner. Even in standby.

 

This is done by VU+ to work around a bug in their drivers that they don't seem to be able to fix (if A is in use, a recording starts on C, then A stops, and the LNB power cuts with only a leaf tuner in use).

 

The only way to reduce power consumption is switch the box off.

 

This solution does reduce power consumption by about 2.5W. It cuts off the power to LNB. Of course deep standby is the best solution but the network is off. 

 

Perhaps similar lower consumption could be achieved with the following empty channel in userbouquet.favourites.tv or does the tuner stay on?

 

#SERVICE 1:0:1:0:0:0:0:0:0:0:EMPTY:EMPTY
#DESCRIPTION EMPTY

 

If john448 could take the time and measure the consumption, it would be interesting.

 
Tuning to empty channel has no effect on power consumption.


Re: Shell-script - Diseqc command #15 hw9258

  • Senior Member
  • 29 posts

+3
Neutral

Posted 7 February 2022 - 09:18

Thanks for measuring the empty channel consumption and reporting it back.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users