Sign up here and you can log into the forum!

Remote Control Discrete Codes

This is the place to ask for how to use software that is (or isn't) included in the various wdlxtv flavours. Questions about software such as rtorrent, NZBGet, sshfs, curlftpfs, ssh, telnet, etc.

Re: Remote Control Discrete Codes   

Postby recliq » Wed Dec 28, 2011 3:17 am

did you make the scripts executable?
Code: Select all
chmod a+x /tmp/conf/power_off.sh
config_tool -s


sometime the permissions don't stick in /conf, a workaround would be to change your eiri.conf like this:
Code: Select all
[POWERON]
code=3676591275
type=shell
shell=sh /tmp/conf/power_on.sh
­WDLXTV Project Maintainer
-:] If you like my contributions feel free to donate for a beer or a new flash drive. ...and always remember: RTFM! (README, FAQ, WIKI) [:-
User avatar
recliq
WDLXTV Team
 
Posts: 5022
Joined: Thu Apr 15, 2010 8:09 am
Location: Kiel, Germany

Re: Remote Control Discrete Codes   

Postby grrwmr » Wed Dec 28, 2011 3:48 am

Code: Select all
[POWERON]
code=3676591275
type=shell
shell=sh /tmp/conf/power_on.sh


This worked perfectly.
Thanks again & Happy New Year
User avatar
grrwmr
n00b
 
Posts: 11
Joined: Thu Apr 28, 2011 4:56 am

Re: Remote Control Discrete Codes   

Postby justinthomsony » Fri Jun 29, 2012 12:47 am

nradu wrote:Many thanks b-rad for the hint & grrwmr for the idea!

I managed to implement Discrete Codes for Power On and Power Off using EIRI, an old unused remote control and a Logitech Harmony remote control.
The advantage of this is a very reliable setup for universal remote controls oriented on activities (users of such remote controls knows what it's all about).

I hope anyone interested in this can easily follow these steps:

1. put the following 2 scripts on your USB stick:
power_on.sh
Code: Select all
#!/bin/sh
if [ `cat /proc/led` = "OFF" ]; then
    irsend POWER
fi


power_off.sh
Code: Select all
#!/bin/sh
if [ `cat /proc/led` = "ON" ]; then
    irsend POWER
fi


2. take an old (unused) remote control and pick 2 buttons to be used for Power On and Power Off

3. follow the procedure from http://wiki.wdlxtv.com/Eiri to enable EIRI and find the codes of the 2 buttons from step 2

4. add the following lines to /conf/eiri.conf (or create the file from scratch if it does not exist):
Code: Select all
        [POWEROFF]
        code=the_IR_code_of_the_button_for_power_off_found_in_step_3
        type=shell
        shell=the_path_to_scripts_from_1st_step/power_off.sh

       [POWERON]
        code=the_IR_code_of_the_button_for_power_on_found_in_step_3
        type=shell
        shell=the_path_to_scripts_from_1st_step/power_on.sh


5. (optional) if you use a Logitech Harmony you can trick it and add the 2 buttons from step 2 on WD TV device using Learn IR (I add them as button "1" and button "2" - they don't exist on original WD remote, so no conflicts with original remote). next select Settings under WD TV device and Adjust Power Settings. in here you can select that your device has a discrete button for ON and another one for OFF (the 2 buttons newly learned).
Good luck,
Radu


Just Awesome and Promising Solution!
justinthomsony
n00b
 
Posts: 9
Joined: Thu Jun 21, 2012 10:43 pm
Location: India

Re: Remote Control Discrete Codes   

Postby Athlon » Fri Nov 09, 2012 11:01 am

I'm having trouble getting this to work on my Live Plus.

Should Eiri be 'on'? The option to 'check mark' it 'on' is in the webend/config/main section. I re-boot whenever I change it's state.

I'm assuming it should be on, but when I have it on the unit will respond only to left and right on my remote, and not up and down (weird, I know). In any case, I can't get my unit to work with the scripts.

My eiri.conf

Code: Select all
[POWER]
code=
type=alias
alias=POWER

[HOME]
code=
type=alias
alias=HOME

[TOP_MENU]
code=
type=alias
alias=HOME

[MENU]
code=
type=alias
alias=HOME

[UP]
code=
type=alias
alias=UP

[LEFT]
code=
type=alias
alias=LEFT

[ENTER]
code=
type=alias
alias=ENTER

[RIGHT]
code=
type=alias
alias=RIGHT

[DOWN]
code=
type=alias
alias=DOWN

[BACK]
code=
type=alias
alias=BACK

[STOP]
code=
type=alias
alias=STOP

[OPTION]
code=
type=alias
alias=OPTION

[REWIND]
code=
type=alias
alias=REWIND

[PLAY]
code=
type=alias
alias=PLAY

[PAUSE]
code=
type=alias
alias=PAUSE

[FORWARD]
code=
type=alias
alias=FORWARD

[PREVIOUS]
code=
type=alias
alias=PREVIOUS

[NEXT]
code=
type=alias
alias=NEXT

[SEARCH]
code=
type=alias
alias=SEARCH

[EJECT]
code=
type=alias
alias=EJECT

[POWEROFF]
code=2640474754
type=shell
shell=/tmp/media/usb/USB2/56B8-2EEF/power_off.sh

[POWERON]
code=2657186434
type=shell
shell=/tmp/media/usb/USB2/56B8-2EEF/power_on.sh


My power_on.sh

Code: Select all
#!/bin/sh
if [ `cat /proc/led` = "OFF" ]; then
    irsend POWER
fi


My power_off.sh

Code: Select all
#!/bin/sh
if [ `cat /proc/led` = "ON" ]; then
    irsend POWER
fi


I have all three files in '/conf' and on my USB stick
Athlon
n00b
 
Posts: 4
Joined: Thu Dec 30, 2010 10:50 am

Re: Remote Control Discrete Codes   

Postby mad_ady » Sat Nov 10, 2012 2:14 am

If you are running 1.05, there is a bug within EIRI that makes the wdtv remote unusable with some arrow keys. You can use other remotes, though...
User avatar
mad_ady
Developer
 
Posts: 3000
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: Remote Control Discrete Codes   

Postby Athlon » Sat Nov 10, 2012 4:20 am

Thanks for your reply.

By 'other remotes', do you mean other programmable remotes with WD codes built in will just work, or do I have to go through the eiri process for each button that doesn't work on my WD remote.

The programmable remote I have does not have the WD codes built in - it' can learn them however from the WD remote, so it doesn't work with 1.05 either.
Athlon
n00b
 
Posts: 4
Joined: Thu Dec 30, 2010 10:50 am

Re: Remote Control Discrete Codes   

Postby Athlon » Sat Nov 10, 2012 5:49 am

Never mind - I borrowed a friends programmable remote with WD codes built in and it worked!

Now to get the power on/off scripts to work..........

My other question was should eiri be on or off for the scripts to work. I'm tired of trying it both ways while trouble shooting. As I said in my earlier post I'm turning eiri on and off while experimenting using the web end check box (not telnet).
Athlon
n00b
 
Posts: 4
Joined: Thu Dec 30, 2010 10:50 am

Re: Remote Control Discrete Codes   

Postby mad_ady » Sun Nov 11, 2012 10:33 pm

The problem affects the original WD remote - or at least its key combinations. You should be able to use any other remote (programmable or not) and map its keys through eiri so that they act like the WDTV keys: http://wiki.wdlxtv.com/Eiri
If EIRI is off, non-WD remotes stop working, and the WD remote works as expected (but you can't map scripts to keys anymore)
User avatar
mad_ady
Developer
 
Posts: 3000
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: Remote Control Discrete Codes   

Postby recliq » Mon Nov 12, 2012 2:27 am

...and I hope the reason you are trying this is not for the scripts you posted above because that would be complete nonsense...
(enable eiri to catch press of POWER button to start a script that sends POWER button keypress) :mrgreen:
­WDLXTV Project Maintainer
-:] If you like my contributions feel free to donate for a beer or a new flash drive. ...and always remember: RTFM! (README, FAQ, WIKI) [:-
User avatar
recliq
WDLXTV Team
 
Posts: 5022
Joined: Thu Apr 15, 2010 8:09 am
Location: Kiel, Germany

Re: Remote Control Discrete Codes   

Postby Athlon » Mon Nov 12, 2012 4:14 am

recliq wrote:...and I hope the reason you are trying this is not for the scripts you posted above because that would be complete nonsense...
(enable eiri to catch press of POWER button to start a script that sends POWER button keypress) :mrgreen:


The reason I'm trying to do this is for discrete on and off codes for my home theater (the subject of this thread).

I did enable eiri to catch two power signals from an old dvd player remote I had. That is where the two numbers came from at the end of my eiri file.

The two sh files were simply copied from this forum.

The eiri file I created is a result of following instructions here (Step #4). I added the two additional poweron and poweroff routines at the end of the file found on the wiki. If that is in correct, please tell me what to do instead.

Obviously I understood correctly that eiri must be on to capture the codes, but my question was do I leave it on. According to mad_ady it sounds like I should leave it on in order to use my programmable remote, however it does not work.
Athlon
n00b
 
Posts: 4
Joined: Thu Dec 30, 2010 10:50 am

PreviousNext

Return to Application Questions

Who is online

Users browsing this forum: No registered users and 2 guests