Jump to content


Photo

Shell-script - Diseqc command


  • Please log in to reply
8 replies to this topic

#1 john448

  • Member
  • 8 posts

0
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,026 posts

+67
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
  • 8 posts

0
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,026 posts

+67
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
  • 8 posts

0
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,026 posts

+67
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
  • 8 posts

0
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,026 posts

+67
Good

Posted 19 January 2022 - 20:38

interesting! an undocumented feature of diseqc



Re: Shell-script - Diseqc command #9 Dimitrij

  • PLi® Core member
  • 8,311 posts

+271
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.


Duo 4K/Lunix3-4K/Solo 4K



1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users