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.

Remote Control Discrete Codes   

Postby grrwmr » Fri Apr 29, 2011 1:58 pm

G'day,

would it be possible to make Discrete Codes that can be used for programmable Remote Controls:-
POWER ON code
POWER OFF code

VIDEO code
MUSIC code
PHOTO code

this makes programming macros for Universal Remote Controls so much easier (I have the PHILIPS PRONTO Remote Control)
I did contact WD about this but they were not interested.

Example of HEX codes for the Netgear Media Player from RemoteCentral.com

Power Off
0000 006D 0022 0002 0155 00AA 0015 0015 0015 0015 0015 0040 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0040 0015 0040 0015 0015 0015 0040 0015 0015 0015 0015 0015 0040 0015 0040 0015 0040 0015 0040 0015 0040 0015 0040 0015 0015 0015 0015 0015 0040 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0040 0015 0040 0015 0015 0015 0040 0015 05ED 0155 0055 0015 0E47

Power On
0000 006D 0022 0002 0155 00AA 0015 0015 0015 0015 0015 0040 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0040 0015 0040 0015 0015 0015 0040 0015 0015 0015 0015 0015 0040 0015 0040 0015 0040 0015 0040 0015 0040 0015 0040 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0040 0015 0040 0015 0040 0015 0040 0015 05ED 0155 0055 0015 0E47


Cheers
User avatar
grrwmr
n00b
 
Posts: 13
Joined: Thu Apr 28, 2011 4:56 am

Re: Remote Control Discrete Codes   

Postby KAD » Fri Apr 29, 2011 3:15 pm

dont know about making discrete codes, but you can do the opposite
search for EIRI, it's part of the firmware and can be set up to work with nearly any remote

KAD
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
PM's are for private matters. Post support questions to the appropriate forum, or they will be ignored.
User avatar
KAD
Global Moderator
 
Posts: 5103
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

Re: Remote Control Discrete Codes   

Postby nradu » Sun May 01, 2011 7:52 am

Hi KAD,

Is it possible with EIRI to set up a POWER action only if WDTV is ON? This way we can emulate the discrete code for POWER OFF. And viceversa for POWER OFF.

Thanks,
Radu
nradu
Donor
 
Posts: 38
Joined: Fri Nov 05, 2010 12:40 am
Location: Bucharest, Romania

Re: Remote Control Discrete Codes   

Postby KAD » Mon May 02, 2011 11:51 am

I've never tried any power up actions, etc with EIRI, but it's documented that it supports handling of custom commands if correctly configured in eiri.conf

KAD
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
PM's are for private matters. Post support questions to the appropriate forum, or they will be ignored.
User avatar
KAD
Global Moderator
 
Posts: 5103
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

Re: Remote Control Discrete Codes   

Postby nradu » Tue May 03, 2011 7:28 am

after some EIRI reading, I raelized the only chance to implement POWER ON and POWER OFF (not POWER TOGGLE) is to have a script to run when pressing the button on RC. This script has to check the current power status of WD and acts accordingly (i.e. POWER OFF script should send irsend POWER only if WD is ON).
does anyone know how to check in a simple shell script the power status (ON/OFF) of the WD as the one on the home page of WEC (WEBEND_SHOWNOWPLAYING)?

thanks,
Radu
nradu
Donor
 
Posts: 38
Joined: Fri Nov 05, 2010 12:40 am
Location: Bucharest, Romania

Re: Remote Control Discrete Codes   

Postby b-rad.cc » Sun May 22, 2011 9:33 am

Code: Select all
cat /proc/led
PM's are for private matters only, please post public matters on the forum to help others who might have the same issue.
:mrgreen:
User avatar
b-rad.cc
WDLXTV Team
 
Posts: 3003
Joined: Sat Apr 03, 2010 9:35 am
Location: New York

Re: Remote Control Discrete Codes   

Postby nradu » Wed May 25, 2011 12:14 pm

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
nradu
Donor
 
Posts: 38
Joined: Fri Nov 05, 2010 12:40 am
Location: Bucharest, Romania

Re: Remote Control Discrete Codes   

Postby b-rad.cc » Wed May 25, 2011 12:41 pm

/proc/led is perhaps not the most intuitive file to return power status, especially since it does not indicate the status of the actual led's themselves--yet takes the controls to turn them on & off. The led kernel module controls leds and bus power, so i added in extra functionality to make the module act a bit better and return something useful for us. I should probably further change that to have /proc/led return led status and add a new entry /proc/power to return ON/OFF...i'll think about it :ugeek:
PM's are for private matters only, please post public matters on the forum to help others who might have the same issue.
:mrgreen:
User avatar
b-rad.cc
WDLXTV Team
 
Posts: 3003
Joined: Sat Apr 03, 2010 9:35 am
Location: New York

Re: Remote Control Discrete Codes   

Postby nradu » Wed May 25, 2011 10:05 pm

b-rad.cc wrote:I should probably further change that to have /proc/led return led status and add a new entry /proc/power to return ON/OFF...i'll think about it :ugeek:


Great idea, as some users prefer to turn them off for good in WEC/MediaNavigation/Autores etc.
I forgot to mention in the above post my scripts work only if user doesn't touch the status of LEDS.

Cheers,
Radu
nradu
Donor
 
Posts: 38
Joined: Fri Nov 05, 2010 12:40 am
Location: Bucharest, Romania

Re: Remote Control Discrete Codes   

Postby quidqod » Tue Jun 21, 2011 9:41 am

I just have to thank nradu for this solution! Recently got a harmony remote and assumed discrete power codes weren't possible on the WDTV. Solves many problems for me, thanks!

It was a bit tricky to find a non-used remote that worked with the WDTV, but I found an old CD player remote that was recognised. I hadn't read the whole Eiri Wiki entry and thought eiri just wasn't working properly.
quidqod
n00b
 
Posts: 10
Joined: Tue May 10, 2011 10:30 am

Next

Return to Application Questions

Who is online

Users browsing this forum: No registered users and 1 guest