IR Remote Control on RaspberryPi

Rough Draft

For a long time I’ve wanted to use my Pi as as WiFi controlled IR Remote.  e.g Connect to it vi a WiFi and have it beam IR codes to any device that uses them.

With PiZero this becomes cheap and affordable to do.

i looked around and found that LIRC is the software needed to do this so I installed it mainly using this blog.

However, I seemed to find that the instructions were slightly unclear to me so let me jsut emphasse/add the stuff I did to get it going

Note – I cheated at first by just connecting transmitting diode direct to PiZero – you should really use a little transistor cct but since PiZero are £4 – i decided to risk it YMMV

Using Pin18(GPIO 23) for the receiver and Pin20(GPIO 24) for the transmitting diode.

Make sure /boot/config.txt has this line in it


If all goes well and you can record your remote then all thats needed to use it is to run

sudo irsend SEND_ONCE name_of_remote key

where name_of_remote is the one in your /etc/lirc/lircd.conf file and key is the code you want to send

To send these using ScratchGPIO then you can use

broadcast join (run sudo irsend SEND_ONCE name_of_remote ) (key)

and just change the value of key

IMPORTANT: make sure there is a space after name_of_remote

I’ve managed to put together an lircd.conf file for these GU10 type rgb  bulb
# Please make this file available to others
# by sending it to <>
# this config file was automatically generated
# using lirc-0.9.0-pre1(default) on Wed Dec 2 11:43:49 2015
# contributed by
# brand: /home/pi/lircd.conf
# model no. of remote control:
# devices being controlled by this remote:

begin remote

name gu10
bits 16
eps 30
aeps 100

header 9090 4442
one 639 1624
zero 639 517
ptrail 635
repeat 9090 2206
pre_data_bits 16
pre_data 0xFF
gap 107834
toggle_bit_mask 0x0

begin codes

brighter 0xA05F
darker 0x20DF
off 0x609F
on 0xE01F
red 0x906F
green 0x10EF
blue 0x50AF
white 0xD02F
warmwhite 0xD02F
orange 0xB04F
yellow 0x8877
cyan 0x30CF
purple 0x708F
pink 0x6897
magenta 0x48B7

flash 0xF00F
strobe 0xE817
fade 0xD827
smooth 0xC837

BR1 0xB04F
BR2 0xA857
BR3 0x9867
BR4 0x8877
BG1 0x30CF
BG2 0x28D7
BG3 0x18E7
BG4 0x08F7
BB1 0x708F
BB2 0x6897
BB3 0x58A7
BB4 0x48B7

end codes

end remote

You may also like...

1 Response

  1. I was just looking for a guide like this! I’ll be using this to control from Scratch some infrared Christmas lights!

Leave a Reply

Your email address will not be published. Required fields are marked *