DISHNetworkLIRCConfiguration
Author | unknown |
Description | Channel-change script and LIRC configuration (lircd.conf) for use with DISH Network set-top boxes and LIRC transmitters. |
Supports |
lircd.conf file
Endaf Jones took the time to decode the DISH Network remote control command set for use in controlling DISH Network or Bell ExpressVu receivers. The result is the following lircd.conf that includes definitions for all the buttons, discrete power (i.e. power_on and power_off, in addition to the power toggle), and all 16 remote codesets (i.e. for controlling up to 16 DISH receivers).
To send a command to a receiver using codeset 1, use the remote name "dish1". To send a command to a receiver using codeset 9, use the remote name "dish9" (and so on for other codesets). Ensure your channel change scripts (and anything else you use to send commands to your receivers) use the button names defined below.
If using the discrete power_on button, I recommend you do not include it in a channel change script. If the receiver is, in fact, off, it will not receive/process additional commands after the "power_on" until it has finished booting. Therefore, if you do most of your recording during primetime, you could set up a daily cron job to send a "power_on" a few minutes before primetime begins. You may even try sending the command more often (i.e. at 25 and 55 past each hour), but test this out before any important recordings.
To use the configuration, copy the information below (or download a compressed copy from the mailing list archives) and paste it into a text file. Save the file at /etc/lirc/lircd.conf (or ledxmitd.conf, if appropriate for your configuration). Then, restart LIRC and enjoy. Note that spaces and formatting can be very important, so be careful to copy/paste correctly.
Bell ExpressVu users wanting to use different remote names may copy the same lircd.conf and update the remote names to "expressvu1", "expressvu2", ... with the following script:
sed -i -e 's/name dish/name expressvu/' \ -e 's/dish#/expressvu#/' \ -e 's/called "dish/called "expressvu/' \ -e 's/dish" and a "dish/expressvu" and a "expressvu/' \ lircd.conf
Those wanting to update the buttons named "dish_home{,2}" may do so with:
sed -i -e 's/dish_home/expressvu_home/' lircd.conf
# This config file is based on the information posted by Endaf Jones at # http://www.gossamer-threads.com/lists/mythtv/users/196566#196566 # # brand: JVC/RCA # model no. of remote control: # supported devices: Dish Network (EchoStar) # - JVC 2700 receiver # - JVC 4700 receiver # - JVC 49xx receiver # - JVC 50xx receiver # - RCA 31x receiver # # Bell ExpressVu (EchoStar) # - 3100 receiver # - 5100 receiver # # and several other Dish and Bell ExpressVu receivers. # # Unit code selection (1-16) is performed by specifying the appropriate # value for post_data # 1=0x000 2=0x200 3=0x100 4=0x300 # 5=0x080 6=0x280 7=0x180 8=0x380 # 9=0x040 10=0x240 11=0x140 12=0x340 # 13=0x0C0 14=0x2C0 15=0x1C0 16=0x3C0 # # Each has been implemented in this config file with the remote names "dish#" # where the hash/pound/number sign ("#") is a code number from 1 through 16. # There is also a remote called "dish" (without a number), for users with only # one receiver, that uses remote code 1 (DISH's default). # # The duty_cycle (the percentage of time during a pulse that infrared light is # being sent) is commented because some hardware transmitters don't support its # use. # # The discrete power functions (power_on and power_off) can be used to ensure # the power state of the receiver. However, they probably shouldn't be used in # a channel change script as the receiver will require a significant delay # after a power_on before it is capable of receiving/responding to additional # commands (such as channel numbers). Instead, assuming most of your recording # is during prime-time, you may want to set a cron job to run a "power_on" # command for each of your receivers about 5 or 10 minutes before primtetime. ### Remote definition for remotes using remote code 1 (0x000) begin remote name dish flags SPACE_ENC|NO_HEAD_REP eps 30 aeps 100 frequency 56000 # duty_cycle 32 one 440 1645 zero 440 2780 header 525 6045 ptrail 450 gap 6115 min_repeat 6 bits 6 post_data_bits 10 post_data 0x000 begin codes info 0 power_on 1 power 2 1 4 2 5 3 6 4 8 5 9 6 10 7 12 8 13 9 14 0 17 menu 11 select 16 cancel 18 guide 20 view 22 tv_vcr 23 right 24 up 26 recall 27 left 28 down 30 record 31 pause 32 stop 33 sys_info 36 asterisk 37 pound 38 power_off 39 sat 41 dish_home 52 sys_info2 54 dish_home2 56 end codes end remote ### Remote definition for remotes using remote code 1 (0x000) ### (Duplicated to allow a "dish" and a "dish1" remote name) begin remote name dish1 flags SPACE_ENC|NO_HEAD_REP eps 30 aeps 100 frequency 56000 # duty_cycle 32 one 440 1645 zero 440 2780 header 525 6045 ptrail 450 gap 6115 min_repeat 6 bits 6 post_data_bits 10 post_data 0x000 begin codes info 0 power_on 1 power 2 1 4 2 5 3 6 4 8 5 9 6 10 7 12 8 13 9 14 0 17 menu 11 select 16 cancel 18 guide 20 view 22 tv_vcr 23 right 24 up 26 recall 27 left 28 down 30 record 31 pause 32 stop 33 sys_info 36 asterisk 37 pound 38 power_off 39 sat 41 dish_home 52 sys_info2 54 dish_home2 56 end codes end remote ### Remote definition for remotes using remote code 2 (0x200) begin remote name dish2 flags SPACE_ENC|NO_HEAD_REP eps 30 aeps 100 frequency 56000 # duty_cycle 32 one 440 1645 zero 440 2780 header 525 6045 ptrail 450 gap 6115 min_repeat 6 bits 6 post_data_bits 10 post_data 0x200 begin codes info 0 power_on 1 power 2 1 4 2 5 3 6 4 8 5 9 6 10 7 12 8 13 9 14 0 17 menu 11 select 16 cancel 18 guide 20 view 22 tv_vcr 23 right 24 up 26 recall 27 left 28 down 30 record 31 pause 32 stop 33 sys_info 36 asterisk 37 pound 38 power_off 39 sat 41 dish_home 52 sys_info2 54 dish_home2 56 end codes end remote ### Remote definition for remotes using remote code 3 (0x100) begin remote name dish3 flags SPACE_ENC|NO_HEAD_REP eps 30 aeps 100 frequency 56000 # duty_cycle 32 one 440 1645 zero 440 2780 header 525 6045 ptrail 450 gap 6115 min_repeat 6 bits 6 post_data_bits 10 post_data 0x100 begin codes info 0 power_on 1 power 2 1 4 2 5 3 6 4 8 5 9 6 10 7 12 8 13 9 14 0 17 menu 11 select 16 cancel 18 guide 20 view 22 tv_vcr 23 right 24 up 26 recall 27 left 28 down 30 record 31 pause 32 stop 33 sys_info 36 asterisk 37 pound 38 power_off 39 sat 41 dish_home 52 sys_info2 54 dish_home2 56 end codes end remote ### Remote definition for remotes using remote code 4 (0x300) begin remote name dish4 flags SPACE_ENC|NO_HEAD_REP eps 30 aeps 100 frequency 56000 # duty_cycle 32 one 440 1645 zero 440 2780 header 525 6045 ptrail 450 gap 6115 min_repeat 6 bits 6 post_data_bits 10 post_data 0x300 begin codes info 0 power_on 1 power 2 1 4 2 5 3 6 4 8 5 9 6 10 7 12 8 13 9 14 0 17 menu 11 select 16 cancel 18 guide 20 view 22 tv_vcr 23 right 24 up 26 recall 27 left 28 down 30 record 31 pause 32 stop 33 sys_info 36 asterisk 37 pound 38 power_off 39 sat 41 dish_home 52 sys_info2 54 dish_home2 56 end codes end remote ### Remote definition for remotes using remote code 5 (0x080) begin remote name dish5 flags SPACE_ENC|NO_HEAD_REP eps 30 aeps 100 frequency 56000 # duty_cycle 32 one 440 1645 zero 440 2780 header 525 6045 ptrail 450 gap 6115 min_repeat 6 bits 6 post_data_bits 10 post_data 0x080 begin codes info 0 power_on 1 power 2 1 4 2 5 3 6 4 8 5 9 6 10 7 12 8 13 9 14 0 17 menu 11 select 16 cancel 18 guide 20 view 22 tv_vcr 23 right 24 up 26 recall 27 left 28 down 30 record 31 pause 32 stop 33 sys_info 36 asterisk 37 pound 38 power_off 39 sat 41 dish_home 52 sys_info2 54 dish_home2 56 end codes end remote ### Remote definition for remotes using remote code 6 (0x280) begin remote name dish6 flags SPACE_ENC|NO_HEAD_REP eps 30 aeps 100 frequency 56000 # duty_cycle 32 one 440 1645 zero 440 2780 header 525 6045 ptrail 450 gap 6115 min_repeat 6 bits 6 post_data_bits 10 post_data 0x280 begin codes info 0 power_on 1 power 2 1 4 2 5 3 6 4 8 5 9 6 10 7 12 8 13 9 14 0 17 menu 11 select 16 cancel 18 guide 20 view 22 tv_vcr 23 right 24 up 26 recall 27 left 28 down 30 record 31 pause 32 stop 33 sys_info 36 asterisk 37 pound 38 power_off 39 sat 41 dish_home 52 sys_info2 54 dish_home2 56 end codes end remote ### Remote definition for remotes using remote code 7 (0x180) begin remote name dish7 flags SPACE_ENC|NO_HEAD_REP eps 30 aeps 100 frequency 56000 # duty_cycle 32 one 440 1645 zero 440 2780 header 525 6045 ptrail 450 gap 6115 min_repeat 6 bits 6 post_data_bits 10 post_data 0x180 begin codes info 0 power_on 1 power 2 1 4 2 5 3 6 4 8 5 9 6 10 7 12 8 13 9 14 0 17 menu 11 select 16 cancel 18 guide 20 view 22 tv_vcr 23 right 24 up 26 recall 27 left 28 down 30 record 31 pause 32 stop 33 sys_info 36 asterisk 37 pound 38 power_off 39 sat 41 dish_home 52 sys_info2 54 dish_home2 56 end codes end remote ### Remote definition for remotes using remote code 8 (0x380) begin remote name dish8 flags SPACE_ENC|NO_HEAD_REP eps 30 aeps 100 frequency 56000 # duty_cycle 32 one 440 1645 zero 440 2780 header 525 6045 ptrail 450 gap 6115 min_repeat 6 bits 6 post_data_bits 10 post_data 0x380 begin codes info 0 power_on 1 power 2 1 4 2 5 3 6 4 8 5 9 6 10 7 12 8 13 9 14 0 17 menu 11 select 16 cancel 18 guide 20 view 22 tv_vcr 23 right 24 up 26 recall 27 left 28 down 30 record 31 pause 32 stop 33 sys_info 36 asterisk 37 pound 38 power_off 39 sat 41 dish_home 52 sys_info2 54 dish_home2 56 end codes end remote ### Remote definition for remotes using remote code 9 (0x040) begin remote name dish9 flags SPACE_ENC|NO_HEAD_REP eps 30 aeps 100 frequency 56000 # duty_cycle 32 one 440 1645 zero 440 2780 header 525 6045 ptrail 450 gap 6115 min_repeat 6 bits 6 post_data_bits 10 post_data 0x040 begin codes info 0 power_on 1 power 2 1 4 2 5 3 6 4 8 5 9 6 10 7 12 8 13 9 14 0 17 menu 11 select 16 cancel 18 guide 20 view 22 tv_vcr 23 right 24 up 26 recall 27 left 28 down 30 record 31 pause 32 stop 33 sys_info 36 asterisk 37 pound 38 power_off 39 sat 41 dish_home 52 sys_info2 54 dish_home2 56 end codes end remote ### Remote definition for remotes using remote code 10 (0x240) begin remote name dish10 flags SPACE_ENC|NO_HEAD_REP eps 30 aeps 100 frequency 56000 # duty_cycle 32 one 440 1645 zero 440 2780 header 525 6045 ptrail 450 gap 6115 min_repeat 6 bits 6 post_data_bits 10 post_data 0x240 begin codes info 0 power_on 1 power 2 1 4 2 5 3 6 4 8 5 9 6 10 7 12 8 13 9 14 0 17 menu 11 select 16 cancel 18 guide 20 view 22 tv_vcr 23 right 24 up 26 recall 27 left 28 down 30 record 31 pause 32 stop 33 sys_info 36 asterisk 37 pound 38 power_off 39 sat 41 dish_home 52 sys_info2 54 dish_home2 56 end codes end remote ### Remote definition for remotes using remote code 11 (0x140) begin remote name dish11 flags SPACE_ENC|NO_HEAD_REP eps 30 aeps 100 frequency 56000 # duty_cycle 32 one 440 1645 zero 440 2780 header 525 6045 ptrail 450 gap 6115 min_repeat 6 bits 6 post_data_bits 10 post_data 0x140 begin codes info 0 power_on 1 power 2 1 4 2 5 3 6 4 8 5 9 6 10 7 12 8 13 9 14 0 17 menu 11 select 16 cancel 18 guide 20 view 22 tv_vcr 23 right 24 up 26 recall 27 left 28 down 30 record 31 pause 32 stop 33 sys_info 36 asterisk 37 pound 38 power_off 39 sat 41 dish_home 52 sys_info2 54 dish_home2 56 end codes end remote ### Remote definition for remotes using remote code 12 (0x340) begin remote name dish12 flags SPACE_ENC|NO_HEAD_REP eps 30 aeps 100 frequency 56000 # duty_cycle 32 one 440 1645 zero 440 2780 header 525 6045 ptrail 450 gap 6115 min_repeat 6 bits 6 post_data_bits 10 post_data 0x340 begin codes info 0 power_on 1 power 2 1 4 2 5 3 6 4 8 5 9 6 10 7 12 8 13 9 14 0 17 menu 11 select 16 cancel 18 guide 20 view 22 tv_vcr 23 right 24 up 26 recall 27 left 28 down 30 record 31 pause 32 stop 33 sys_info 36 asterisk 37 pound 38 power_off 39 sat 41 dish_home 52 sys_info2 54 dish_home2 56 end codes end remote ### Remote definition for remotes using remote code 13 (0x0C0) begin remote name dish13 flags SPACE_ENC|NO_HEAD_REP eps 30 aeps 100 frequency 56000 # duty_cycle 32 one 440 1645 zero 440 2780 header 525 6045 ptrail 450 gap 6115 min_repeat 6 bits 6 post_data_bits 10 post_data 0x0C0 begin codes info 0 power_on 1 power 2 1 4 2 5 3 6 4 8 5 9 6 10 7 12 8 13 9 14 0 17 menu 11 select 16 cancel 18 guide 20 view 22 tv_vcr 23 right 24 up 26 recall 27 left 28 down 30 record 31 pause 32 stop 33 sys_info 36 asterisk 37 pound 38 power_off 39 sat 41 dish_home 52 sys_info2 54 dish_home2 56 end codes end remote ### Remote definition for remotes using remote code 14 (0x2C0) begin remote name dish14 flags SPACE_ENC|NO_HEAD_REP eps 30 aeps 100 frequency 56000 # duty_cycle 32 one 440 1645 zero 440 2780 header 525 6045 ptrail 450 gap 6115 min_repeat 6 bits 6 post_data_bits 10 post_data 0x2C0 begin codes info 0 power_on 1 power 2 1 4 2 5 3 6 4 8 5 9 6 10 7 12 8 13 9 14 0 17 menu 11 select 16 cancel 18 guide 20 view 22 tv_vcr 23 right 24 up 26 recall 27 left 28 down 30 record 31 pause 32 stop 33 sys_info 36 asterisk 37 pound 38 power_off 39 sat 41 dish_home 52 sys_info2 54 dish_home2 56 end codes end remote ### Remote definition for remotes using remote code 15 (0x1C0) begin remote name dish15 flags SPACE_ENC|NO_HEAD_REP eps 30 aeps 100 frequency 56000 # duty_cycle 32 one 440 1645 zero 440 2780 header 525 6045 ptrail 450 gap 6115 min_repeat 6 bits 6 post_data_bits 10 post_data 0x1C0 begin codes info 0 power_on 1 power 2 1 4 2 5 3 6 4 8 5 9 6 10 7 12 8 13 9 14 0 17 menu 11 select 16 cancel 18 guide 20 view 22 tv_vcr 23 right 24 up 26 recall 27 left 28 down 30 record 31 pause 32 stop 33 sys_info 36 asterisk 37 pound 38 power_off 39 sat 41 dish_home 52 sys_info2 54 dish_home2 56 end codes end remote ### Remote definition for remotes using remote code 16 (0x3C0) begin remote name dish16 flags SPACE_ENC|NO_HEAD_REP eps 30 aeps 100 frequency 56000 # duty_cycle 32 one 440 1645 zero 440 2780 header 525 6045 ptrail 450 gap 6115 min_repeat 6 bits 6 post_data_bits 10 post_data 0x3C0 begin codes info 0 power_on 1 power 2 1 4 2 5 3 6 4 8 5 9 6 10 7 12 8 13 9 14 0 17 menu 11 select 16 cancel 18 guide 20 view 22 tv_vcr 23 right 24 up 26 recall 27 left 28 down 30 record 31 pause 32 stop 33 sys_info 36 asterisk 37 pound 38 power_off 39 sat 41 dish_home 52 sys_info2 54 dish_home2 56 end codes end remote
Example channel change script
The following is the script I use when changing channels on my model 322. It may need modification to work with other models. It is coded to avoid 'channel not available' and 'press select to continue'
#!/bin/sh # # script to control echostar model x22 (and maybe others) # # This handles both the "press select to continue "screen saver", and the # unsubscribed channel dialog box. # # Also when a channel is changed, the bannder is quickly removed to minimize # the showing of the banner display. # # usage: changechannel <receiver number> [--raw] # [<channel number> | <remote_button [...]] # # Options: # --raw = any following numbers are sent raw, without additional signals # needed to bypass the receiver quirks quirks # # For each # - <channel number> = Change to given channel, if not prefixed with # --raw option, it also sends additional signals in an attempt to bypass # dialog boxes, the "press select to continue" display, and a cancel # to quickly remove the channel display # - <remote button> = control the receiver directly using the given # remote control buttons # # the time to wait between button presses, mine is workable at .1 SLEEP_TIME=.1 # path of the lirc irsend command IRSEND=/usr/bin/irsend # probably dish or expressvu REMOTE_BASENAME=dish # change to /dev/null to diable logging logfile=/tmp/changechannel.log if [ $# -lt 2 ]; then echo "usage: changechannel <receiver number> [--raw] " echo " [<channel number> | <remote_button [...]]" echo echo " Options:" echo " --raw = any following numbers are sent raw, without additional signals" echo " needed to bypass the receiver quirks quirks" echo echo " For each" echo " - <channel number> = Change to given channel, if not prefixed with" echo " --raw option, it also sends additional signals in an attempt to bypass" echo " dialog boxes, the 'press select to continue' display, and a cancel " echo " to quickly remove the channel display" echo " - <remote button> = control the receiver directly using the given" echo " remote control buttons" echo exit 0 fi log() { echo `date +"%F %T"` `basename $0`: "$@" >> $logfile } log started: "$@" # first arguemnt receiver_num=$1 shift eval REMOTE_NAME=${REMOTE_BASENAME}${receiver_num} # if set, only numbers are sent to the receiver numbers_only=0 irsend() { $IRSEND SEND_ONCE $REMOTE_NAME $1 #echo irsend $1 } send_digits() { local do_select=0 if [ $numbers_only -eq 0 ]; then # try and detect if select is needed to finish the channel change # less then three digits if [ "$3" = "" ]; then do_select=1 fi # begins with a 5-9(dish network 4 digit channels) # and is less then 4 digits if [ $1 -gt 4 -a "$4" = "" ]; then do_select=1 fi # we must skip a dialog(like "this channel isn't accessible") # in order to allow channel changing, the only universal seems to be # 'recall' irsend recall sleep $SLEEP_TIME # wake up the receiver if it is asleep(after the channel up to prevent # channel ordering) irsend select sleep $SLEEP_TIME fi while [ "$1" != "" ]; do irsend $1 shift sleep $SLEEP_TIME done if [ $numbers_only -eq 0 ]; then if [ $do_select -ne 0 ]; then irsend select sleep $SLEEP_TIME fi # clear the display quickly (and cancel any channel ordering requests) irsend cancel fi } for cmd in "$@"; do case $cmd in [0-9]*) eval send_digits $(echo $cmd | sed -e 's/./& /g') ;; --raw) numbers_only=1 ;; *) irsend $cmd ;; esac sleep $SLEEP_TIME done