My lircd.conf file is off of the MythTV wiki:
Code: Select all
# 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
Code: Select all
#!/bin/sh
# Maintained by CommandIR Support mini at commandir.com - Comments / Suggestions Welcome.
if [ $# -lt 3 ]
then
echo "IR Control Script for LIRC V2.0
Includes support for CommandIR transmitter selection and lockfile.
Usage:
$0 REMOTE_NAME TRANSMITTER_NUM (CHANNEL_NUMBER | IR_COMMAND) [DELAY]
Sends an IR command or sequence of numbers using REMOTE_NAME via emitter
TRANSMITTER_NUM. DELAY (in seconds) is waited between sending IR commands.
Example: Change ExpressVu to channel 123 using emitter 2 with a 0.3s pause between digits:
$0 expressvu 2 123 .3
"
exit 1
fi
if [ $# -eq 4 ]
then
DELAY=$4
else
DELAY=.3
fi
LOCKFILE=/tmp/lirclock
export PATH=/bin:/usr/bin:/usr/local/bin
REMOTE_NAME=$1
TRANSMITTER=$2
cmd="$3"
while [ -f $LOCKFILE ]
do
#echo "Waiting for lock..."
sleep .1
done
touch $LOCKFILE
irsend SET_TRANSMITTERS $TRANSMITTER
sleep .15
case $cmd in
[0-9]*)
for digit in $(echo $3 | sed -e 's/./& /g'); do
irsend SEND_ONCE $REMOTE_NAME $digit
sleep $DELAY
done
;;
*)
irsend SEND_ONCE $REMOTE_NAME $cmd
;;
esac
rm $LOCKFILE
Code: Select all
irsend send_once dish1 5Code: Select all
./chchange-device-lock.sh dish1 1 122