MyGodAL3X
Posts: 6
Joined: Thu May 10, 2012 1:26 pm

Re: RasPi as universal Remote

Thu May 10, 2012 3:08 pm

Hello all,

I was just wondering if anyone had given thought to using the Raspberry Pi as a universal remote.

I don't know what is needed to do such a thing (IR emitter/receiver and a ton of programming, probably) but I was wondering if anyone knew in which direction to point me.

Let me know.

Cheers

gjs
Posts: 148
Joined: Fri Dec 02, 2011 8:04 pm

Re: RasPi as universal Remote

Thu May 10, 2012 4:11 pm

Nice idea but I think the current consumption of the Pi is probably too high for battery operated hand held use.

MyGodAL3X
Posts: 6
Joined: Thu May 10, 2012 1:26 pm

Re: RasPi as universal Remote

Thu May 10, 2012 6:37 pm

Well I was thinking more along the lines of incorporating it inside a coffee table, so that way it could be plugged into a power source quite easily.

I was just wondering along the lines of "How would one go about making the RasPi function as a remote".

bredman
Posts: 1415
Joined: Tue Jan 17, 2012 2:38 pm

Re: RasPi as universal Remote

Thu May 10, 2012 9:18 pm

This is how you do it.

http://www.instructables.com/i.....hone-iPod/

This example is for an iPhone but can be used for anything which can play MP3 to an audio socket.

Very little programming is needed, the major work is to build an MP3 file for each of the infrared keycodes that you want to send.

bredman
Posts: 1415
Joined: Tue Jan 17, 2012 2:38 pm

Re: RasPi as universal Remote

Thu May 10, 2012 9:33 pm

Here is a more detailed instruction. It also includes a Python program to generate the files if you can find the keycode numbers.

http://rtfms.com/episode-4-tur.....remote.htm

Here are the prepared files for some popular TV models. http://remote.rtfms.com/

As you see, you don't need much programming. You could (as in this example) just build a webpage which plays the correct sound file when you click on a link.

Good luck !

MyGodAL3X
Posts: 6
Joined: Thu May 10, 2012 1:26 pm

Re: RasPi as universal Remote

Fri May 11, 2012 1:24 am

You sir, are a life saver.

Thanks a million for this.

User avatar
patrikg
Posts: 168
Joined: Sun Mar 18, 2012 10:19 pm

Re: RasPi as universal Remote

Fri May 11, 2012 6:27 am

How about lirc ??

http://www.lirc.org/

And some home-brew usb IR receiver / transmitter, like this http://www.huitsing.nl/irftdi/

/Patrik

User avatar
SN
Posts: 1014
Joined: Mon Feb 13, 2012 8:06 pm
Location: Romiley, UK
Contact: Website

Re: RasPi as universal Remote

Fri May 11, 2012 8:22 am

I love the lateral thinking around this and other stuff I've seen over the last 48 hours

- Audio out port used as an IR output

- Deconstructed USB Wheel Mouse used as a Triple Analog input

Keep 'em coming
Steve N – binatone mk4->intellivision->zx81->spectrum->cbm64->cpc6128->520stfm->pc->raspi ?

User avatar
alexeames
Forum Moderator
Forum Moderator
Posts: 2869
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
Contact: Website

Re: RasPi as universal Remote

Fri May 11, 2012 10:47 am

This is excellent fun. IR LEDs ordered.

Amazing how it can be so simple (in a complicated way LOL)
Alex Eames RasPi.TV, RasP.iO

Joefish
Posts: 95
Joined: Wed Jan 25, 2012 10:31 am

Re: RasPi as universal Remote

Fri May 11, 2012 11:22 am

Has anyone got 'teh codez' for driving LEGO's Power Functions remote controls?

Protocol is here, for those that can make sense of such things:

http://storage.technicbricks.c.....20v120.pdf

Joefish
Posts: 95
Joined: Wed Jan 25, 2012 10:31 am

Re: RasPi as universal Remote

Fri May 11, 2012 11:23 am

Has anyone got 'teh codez' for driving LEGO's Power Functions remote controls?

Protocol is here, for those that can make sense of such things:

http://storage.technicbricks.c.....20v120.pdf

plugwash
Forum Moderator
Forum Moderator
Posts: 3456
Joined: Wed Dec 28, 2011 11:45 pm

Re: RasPi as universal Remote

Fri May 11, 2012 11:29 am

If you want a relatively easy (but not cheap ) soloution to controlling lego power functions then you might want to consider the hitechnic irlink, it's an I2C device (intended for use with the NXT but it should be pretty easy to hook up to a Pi) that is designed to transmit lego infrared protocols.

Joefish
Posts: 95
Joined: Wed Jan 25, 2012 10:31 am

Re: RasPi as universal Remote

Fri May 11, 2012 3:23 pm

I know, I wrote the bytecode API for it for John Hansen's NBC and NXC suites!

The precise blinking of the IR-LEDs is controlled by a chip on-board; you just give it whole bytes to encode.  What I don't know is what the chip is doing to turn the data into a modulated signal.  If someone has that figured out you could generate the audio signals (or GPIO control) on demand.

I find it hard to believe you couldn't set something to a high enough priority to replay a sample at a high enough rate, when even my Atari ST could do it.

djbonias
Posts: 2
Joined: Fri May 11, 2012 3:09 pm

Re: RasPi as universal Remote

Fri May 11, 2012 6:14 pm

What do you think about it : http://www.usbuirt.com/

you can transmit and receive signals, i want to use it for some home automation but need drivers

bredman
Posts: 1415
Joined: Tue Jan 17, 2012 2:38 pm

Re: RasPi as universal Remote

Fri May 11, 2012 6:29 pm

djbonias said:


What do you think about it : http://www.usbuirt.com/

you can transmit and receive signals, i want to use it for some home automation but need drivers


I would be worried about this text

"Driver Support for Win98, WinME, Win2K, and WinXP"

Some Linux projects are mentioned, MythTV and LinuxMCE for example. But Linux seems to be low on his list of priorities. This is a one-man operation, so he is unlikely to support ARM as well as x86. Also because it is commercial, there is no mention that he is willing to give you the source code for the drivers.

tech_monkey
Posts: 130
Joined: Fri Mar 09, 2012 6:12 pm

Re: RasPi as universal Remote

Fri May 11, 2012 6:42 pm

Remote Central is a good place for all things remotey.
http://www.casatech.eu

ar0n
Posts: 20
Joined: Thu Jun 07, 2012 9:33 pm

Re: RasPi as universal Remote

Fri Jun 08, 2012 4:57 am

I've created a driver for a simple homebrew receiver.
Please check this post out: http://www.raspberrypi.org/phpBB3/viewt ... 98&p=94440

tech_monkey
Posts: 130
Joined: Fri Mar 09, 2012 6:12 pm

Re: RasPi as universal Remote

Mon Jun 11, 2012 3:29 pm

http://www.casatech.eu

jaycuse
Posts: 8
Joined: Fri Oct 12, 2012 1:25 pm

Re: RasPi as universal Remote

Fri Oct 12, 2012 1:45 pm

bredman wrote:djbonias said:


What do you think about it : http://www.usbuirt.com/

you can transmit and receive signals, i want to use it for some home automation but need drivers


I would be worried about this text

"Driver Support for Win98, WinME, Win2K, and WinXP"

Some Linux projects are mentioned, MythTV and LinuxMCE for example. But Linux seems to be low on his list of priorities. This is a one-man operation, so he is unlikely to support ARM as well as x86. Also because it is commercial, there is no mention that he is willing to give you the source code for the drivers.

The USB-UIRT works with the uirt2_raw drivers. I was able to get mine to work on the Arch Linux ARM distribution.

I used https://wiki.archlinux.org/index.php/LIRC as a bit of a guide. I also used https://help.ubuntu.com/community/Lirc_USB-UIRT but some of it is old. For example after installing lirc I didn't have the /etc/lirc/hardware.conf file. Creating it didn't work and eventually I found that the config file I was looking for was /etc/conf.d/lircd.conf. So I modified that file to use the proper device (for me it was ttyUSB0) and driver (uirt2_raw). I was lucky enough to find one of my remotes and load it in /etc/lirc/lircd.conf and successfully test it with irw.
From what I can tell it will work on wheezy with a bit of playing around and getting lirc configured correctly.

Oh and one thing you want to make sure you have installed before you go this route: initscripts
I initially didn't have it installed and lircd would throw me errors when I would try to start it. I would have thought pacman would have installed it as a dependency, but I guess it had other plans.

bjdraw
Posts: 21
Joined: Wed Jan 30, 2013 11:12 pm

Re: RasPi as universal Remote

Wed Jan 30, 2013 11:21 pm

Has anyone been able to get a USB-UIRT working on their Raspberry Pi? I have receive working (as verified by learning and irw), but for some reason the init script isn't creating the transmit device in /dev/. I've tried other ways of creating /dev/ircd1 but have still yet to actually get it to work. I installed via "sudo apt-get install lirc" and have tried different drivers. Any help would be appreciated before I ditch this hardware I already have and seek another IR transceiver solution for the RPi.

Here is my current hardware.conf that works for transmit using a lircd.conf file I created with irrecord.

Code: Select all

# /etc/lirc/hardware.conf
#
# Arguments which will be used when launching lircd
LIRCD_ARGS="-d /dev/ttyUSB0"
#LIRCD_ARGS="-d /dev/ttyUSB0 --output=/dev/lircd1"

#Don't start lircmd even if there seems to be a good config file
#START_LIRCMD=false

#Don't start irexec, even if a good config file seems to exist.
#START_IREXEC=false

#Try to load appropriate kernel modules
LOAD_MODULES=true
#LOAD_MODULES=false

# Run "lircd --driver=help" for a list of supported drivers.
DRIVER="uirt2_raw"
#DRIVER="usb_uirt_raw"

# usually /dev/lirc0 is the correct setting for systems using udev 
DEVICE=""
MODULES=""

# Default configuration files for your hardware if any
LIRCD_CONF=""
LIRCMD_CONF=""
lircd.conf crated with irrecord

Code: Select all

# Please make this file available to others
# by sending it to <lirc@bartelmus.de>
#
# this config file was automatically generated
# using lirc-0.9.0-pre1(usb_uirt_raw) on Sun Jan 27 13:52:04 2013
#
# contributed by 
#
# brand:                       MyRemote
# model no. of remote control: 
# devices being controlled by this remote:
#

begin remote

  name  MyRemote
  bits           16
  flags RC6
  eps            30
  aeps          100

  header       2657   751
  one           452   374
  zero          452   374
  pre_data_bits   21
  pre_data       0x37FF0
  gap          67300
  toggle_bit_mask 0x0
  rc6_mask    0x100000000

      begin codes
          KEY_DOWN                 0x7BE0
          KEY_UP                   0xFBE1
          KEY_RIGHT                0x7BDE
          KEY_LEFT                 0xFBDF
          KEY_SELECT               0x7BDD
      end codes

end remote

jaycuse
Posts: 8
Joined: Fri Oct 12, 2012 1:25 pm

Re: RasPi as universal Remote

Sat Feb 16, 2013 12:19 am

Code: Select all

Has anyone been able to get a USB-UIRT working on their Raspberry Pi? 
Yes, I have. I explained it in my previous post, but I have a blog writeup that may be a bit better:
http://ja.cques.ca/blog/2012/10/22/gett ... pberry-pi/

bjdraw
Posts: 21
Joined: Wed Jan 30, 2013 11:12 pm

Re: RasPi as universal Remote

Sat Feb 16, 2013 1:07 am

Thanks so much for replying, I found that post but wasn't able to comment.

Can you confirm that you can send using irsend? I am also able to receive as well, it is send that is causing an error.

jaycuse
Posts: 8
Joined: Fri Oct 12, 2012 1:25 pm

Re: RasPi as universal Remote

Sat Feb 16, 2013 3:59 am

bjdraw wrote:Thanks so much for replying, I found that post but wasn't able to comment.

Can you confirm that you can send using irsend? I am also able to receive as well, it is send that is causing an error.
Yes it sends commands. In the script I have, I send the command 2 or 3 times in a row in order for my speakers to get the signal. Otherwise it gets sent to fast.

bjdraw
Posts: 21
Joined: Wed Jan 30, 2013 11:12 pm

Re: RasPi as universal Remote

Sat Feb 16, 2013 3:00 pm

Ok, I'm going to give Arch Linux a try to see if I can duplicate your success. Can you confirm you are running the same version as is available on the download site currently? archlinux-hf-2013-02-11

Also, can you post your entire lircd.conf here or email it to me? My email is my pseudonym at google mail.

bjdraw
Posts: 21
Joined: Wed Jan 30, 2013 11:12 pm

Re: RasPi as universal Remote

Sat Feb 16, 2013 7:01 pm

Thanks to jaycuse I've confirmed this is a problem with Raspbian “wheezy” and not with the Pi. Using arch-linux and the exact same lircd.conf I'm able to send via my USB-UIRT running lircd without a daemon (so not using the init script to start it).

Return to “General discussion”