The raspi-based IR extender
#1
Maybe this has already been done, but I've never noticed it.....

I've been using a universal remote, a Flirc and an IR extender to control my XBMC (which sits one floor below my living room TV). However, it seems to be a fairly common problem that the Flirc doesn't work very well with many IR extenders, so my control has been somewhat unreliable even after playing with many of the Flirc settings. I think IR extenders in general just suck.

Not sure if this will help anyone else, but last night I played around with a raspi and an old MCE USB-based IR receiver and I got it so the raspi is now a "repeater" which receives an IR signal in my living room and then sends out a JSON request to XBMC with the corresponding command. So far it seems perfectly reliable, much more so than the IR extender.

For anyone interested (maybe not many of you!), here are the basics:

My raspi is running raspbian, and I installed lirc with a simple sudo apt-get install lirc. My USB receiver is a MCE USB-based receiver, and for testing I used an old MCE remote control.

I configured lirc to use the MCE USB receiver by editing hardware.conf (to use /dev/lirc0) and copying the mceusb lircd.conf file from the pre-packed config settings directory (I believe it's /usr/share/lirc/remotes/mceusb/). I started lircd and used irw to test that the commands are being received by lirc.

To configure the action of sending a JSON request each time an IR command is received, I'm using irexec. In the .lircrc file (used by irexec), I have entries like this for each button-JSON mapping:

begin
button = KEY_UP
prog = irexec
config = curl --data-binary '{ "jsonrpc": "2.0", "method": "Input.Up", "id": "mybash"}' -H 'content-type: application/json;' http://192.168.1.140:8080/jsonrpc
end


These get a little more complicated for requests that require a playerID, but this is generally the flow. In this example it basically means that each time the KEY_UP button is detected, it sends a curl request to my XBMC with a JSON payload that tells it to go "up", and so there will be one entry like this for each remote control button.

I configured irexec to run in daemon mode on startup, and so far everything seems to work great. I would say that it's about as responsive as my old setup, which is "good" but not "great". Mine is currently running on wifi, so I may experiment with ethernet to see if it improves response time at all. However more importantly is the fact that it's very reliable.

For now I will continue to use Flirc for certain commands, because I have it configured to do things that are not easily available through JSON. The Flirc is a really great device, but it just hasn't been working very well with the IR extender.

Hope this helps someone.
Reply
#2
Neat! I'll have to try this sometime.
Reply
#3
(2014-10-16, 17:17)Ned Scott Wrote: Neat! I'll have to try this sometime.

Hello. This saved my day! I managed to get my harmony remote to control the volume on my new electrocompaniet living speakers, instead og just using tje app!
Thank you,
Best regards Lars
Reply
#4
By the way, would it be possible to use bluetooth in a similar way as json. I have a devialet phanthom that i would like to control using my harmony as well.
Best regards Lars
Reply
#5
Hi,

I`m currently working on the same case, trying to make my Harmony control the EC living system. Would be grateful if you could share the config code (json code) for adjusting volume and also what HW you used Smile
Reply
#6
(2017-10-16, 20:48)gaustabl Wrote:
(2014-10-16, 17:17)Ned Scott Wrote: Neat! I'll have to try this sometime.

Hello. This saved my day! I managed to get my harmony remote to control the volume on my new electrocompaniet living speakers, instead og just using tje app!
Thank you,
Best regards Lars   
I`m currently working on the same case, trying to make my Harmony control the EC living system. Would be grateful if you could share the config code (json code) for adjusting volume and also what HW you used Smile 
Reply
#7
Hello.

I was using a pi 3 with a pifi digi+ interface card. This has onboard ir receiver.

these are the commands i sendt in lircrc configuration file. ( i put it in both the file named .lircrc at root, and in /etc/lirc/lircrc)

begin
    button = KEY_VOLUMEUP
    prog = irexec
    config = curl 'http://192.168.70.99/jsonrpc?request=\{%22jsonrpc%22:%222.0%22,%22method%22:%22Input.ExecuteAction%22,%22params%22:\{%22action%22:%22volumeup%22\},%22id%22:1\}'
    repeat = 1
end

begin
    button = KEY_VOLUMEDOWN
    prog = irexec
    config = curl 'http://192.168.70.99/jsonrpc?request=\{%22jsonrpc%22:%222.0%22,%22method%22:%22Input.ExecuteAction%22,%22params%22:\{%22action%22:%22volumedown%22\},%22id%22:1\}'
    repeat = 1
end

Hope this helps, you will need to change the ip address matching yours of course.

I configured the remote as an xbox 360 in lirc, and also on my harmony.

Best regards Lars
Reply
#8
(2018-01-24, 22:20)gaustabl Wrote: Hello.

I was using a pi 3 with a pifi digi+ interface card. This has onboard ir receiver.

these are the commands i sendt in lircrc configuration file. ( i put it in both the file named .lircrc at root, and in /etc/lirc/lircrc)

begin
    button = KEY_VOLUMEUP
    prog = irexec
    config = curl 'http://192.168.70.99/jsonrpc?request=\{%22jsonrpc%22:%222.0%22,%22method%22:%22Input.ExecuteAction%22,%22params%22:\{%22action%22:%22volumeup%22\},%22id%22:1\}'
    repeat = 1
end

begin
    button = KEY_VOLUMEDOWN
    prog = irexec
    config = curl 'http://192.168.70.99/jsonrpc?request=\{%22jsonrpc%22:%222.0%22,%22method%22:%22Input.ExecuteAction%22,%22params%22:\{%22action%22:%22volumedown%22\},%22id%22:1\}'
    repeat = 1
end

Hope this helps, you will need to change the ip address matching yours of course.

I configured the remote as an xbox 360 in lirc, and also on my harmony.

Best regards Lars
 Thanks Lars, just want I needed!
Reply

Logout Mark Read Team Forum Stats Members Help
The raspi-based IR extender2