The image below is a link. Try to click on it.

Recording Air Conditioner remote controls using Irdroid

 

Recording Air conditioner remote controls with Irdroid

Recording Air conditioner remote controls with Irdroid

Recording Air Conditioner (AC) infrared remote controls can be a challenge, when using conventional methods for recording IR remote control codes with LIRC (The Linux Infrared Remote control software package).Recording off-the-shelf TV / STB infrared remote control includes running the irrecord utility that comes with LIRC and recording the physical infrared remote buttons one after another and storing the data into a flat text file. The above procedure is standard for recording home appliance IR remotes, except for Air Conditioner remote controls.

OK, what is different about the AC infrared remote controls ?

Well, the difference is that the AC infrared remote control codes are longer in comparison with any TV, DVD, STB or any other IR controlled equipment. The main difference is the way these infrared remote controls work.

The AC remote control sends all its settings (current state) at once (in one infrared code sequence) . That means when you set for example a temperature, air direction , mode etc these are all send with one IR command which contains all the current settings (current state) with other words all the data in the remote. It means that normally we can’t record remote buttons individually by pressing each button and recording with LIRC, as with every button press we get the remote current state, not a single pressed button.

We can record ON command, OFF command in combination with the current setting/state (mode – heat, current temperature;air direction etc) . We can do that using a patched version of the IR record utility, which is part of the LIRC software package which will allow us to record longer infrared commands.

The LIRC irrecord utility assumes maximum infrared code length of 200 bits, which is a limitation and it is not enought as most of the ACs are using code length > 200bits (some are using code length of ~500 bits) .To change the setting, we need to edit the source file irrecord.c that comes with the version of LIRC , attached to this article.

In particular we have to edit line #109 of irrecord.c

  • #define MAX_SIGNALS 200

this defines the maximum signal length that irrecord shall consider as valid. We shall change that to :

  • #define MAX_SIGNALS 600 (to have some reserve and make sure we cover all ACs with code length over 500 bits)

After changing the file we have to compile LIRC by issuing:

./configure
make
make install

*My configuration for the above procedure was a Laptop running Ubuntu Linux 14.04 LTS
*In Windows the user needs to download WinLIRC, edit the irrecord.c file and recompile the software

After the install process finishes we should be able to use the Irdroid USB IR Transceiver or the Irdroid-Rpi (infrared transceiver for Raspberry Pi) in combination with irrecord to record any AC infrared remote control code in RAW form.

The irrecord syntax:

irrecord -f -d /dev/ttyACMx /etc/lirc/lircd.conf

*depending on your configuration and the number of the serial ACM devices used in your system the ttyACMx can be ttyACM0 or any other number depending on the number of serial ACM devices in enumerated in your system.

the irrecord -f option forces the program to go in a RAW IR record mode (it will not try to decode any of the known IR protocols like RC5, RC6 etc)

Example lircd.conf file with a scanned toshiba Air Conditioner ON command :

begin remote

name Toshiba
flags RAW_CODES
eps 30
aeps 100

gap 1000000

begin raw_codes

name ON
3285 1578 447 405 405 405
426 1173 469 383 426 1173
469 383 426 383 426 383
426 1173 469 1173 469 383
426 383 426 383 426 1173
426 1194 426 405 405 405
405 447 383 447 383 405
405 405 405 405 405 405
405 405 405 405 405 405
405 405 405 405 405 1215
405 405 405 405 405 405
405 405 405 405 405 405
405 405 405 1215 405 405
405 405 405 405 405 405
405 1215 405 405 405 405
405 405 405 405 405 405
405 405 405 1237 405 405
405 1215 405 1215 405 1215
405 1215 405 1215 405 1215
405

end raw_codes

end remote

*The above example represents a ON command, and the current remote state (mode heat,22 degrees celsius, swing mode). You maybe noticed that there are repeating codes like 405, 1215, 1173 , these are the bit representations normally a sequence of zero’s and one’s . these numbers also represent the pusle / space IR signal length in microseconds. The big number in the begining is the so called “lead-in” “informing” the receiver that a infrared command starts.

Initially the program will try to identify the so-called “IR Gap” , it will ask you to press different buttons from the physical remote control. Even if the Gap is not found you can still continue and record button presses from the target remote and store them in a flat lircd.conf file, which is later used by lircd for reproducing the recorded infrared signals.

*The recorded remote control in the above example was for an old Toshiba Air Conditioner. A friend of mine asked me whether he can use one of the Irdroid modules to control (Turn On and Off) the Air Conditioner at his office. In particular to do that using WinLirc in Windows. I have successfully scanned the physical remote control and tested successfully with the target AC. Later on I find out a nice automation utility for windows which has plugins for LIRC and a Scheduler, giving the option to schedule infrared remote control commands. Convenient , isn’t it?

Downloads:

Hardware:

The image below is a link. Try to click on it.

Discover how to turn Raspberry Pi into a Infrared Remote control using the Irdroid-Rpi

This Blog post is a continuation of my previous Blog post for turning raspberry Pi into a Infrared Remote Control using the Irdroid USB Infrared Transceiver. This time we will be using the Irdroid-Rpi Infrared Transceiver HAT for Raspberry Pi. The Irdroid-Rpi Transceiver HAT has three powerful IR leds , that will allow wider remote control angle (you dont need to point it to the target IR controlled appliance – it can be behind it ) and improoved Infrared Remote control Range – more than 15 meters. The module also has a sensitive Infrared Receiver that will allow you to scan and digitize infrared remote controls of your choise.

In this example we will be using a Raspberry Pi model B+ with 512 MB of RAM as a system for running the open source software LIRCd , responsible for sending and receiving infrared commands in Linux.

I am using the following tools ( Hardware ) for our tests:

I also use the following software tools :

  • The latest version of LIRC

  • We will also use Raspbian , installed using NOOBS on a 16 GB sdcard.

  • The Irdroid-Rpi Infrared Transceiver HAT uses the Lirc-rpi and lirc-dev kernel modules, that normally comes with Raspbian

Below are the steps for configuring Irdroid-Rpi with LIRC on Raspbian:

  1. Attach the Irdroid-Rpi Infrared Transceiver HAT to your PI and turn your it on.

  2. After it boots issue “sudo apt-get install lirc lirc-x” and wait until the lirc packages are installed on Raspbian.

  3. cd to /boot and edit the config.txt file using your favourite text editor and uncomment “dtoverlay=lirc-rpi” . This will enable the lirc-rpi gpio kernel driver, and it will allow us to use the default IR Transmit and Receive GPIOs which are GPIO17 and GPIO18 (The Irdroid-Rpi board uses GPIO17 for IR TX and GPIO18 for IR RX , so you don’t need to change the pins. UPDATE!!! For Kernel 3.18+ where device tree is enabled by default  you will need to add “dtoverlay=lirc-rpi,gpio_in_pin=18,gpio_in_pull=high,gpio_out_pin=17” 

     “device_tree=” in order to disable the device tree.

  1. cd into /etc and edit “modules” using your favourite text editor add “lirc_dev” and under it “lirc_rpi” then save the file.

  2. cd into “/etc/lirc” and edit the file “hardware.conf” with your favourite text editor add “–listen”  as follows in “LIRCD_ARGS=”–uinput –listen”  then save the file . That will instruct lirc to listen on the default port (which is tcp port 8765), allowing connections from the local network (We will need that later for our lirc client application).

  3. Download an example lircd configuration file which includes some sample remotes. Issue “cd /etc/lirc” then issue “sudo wget http://irdroid.com/db/t.conf -O lircd.conf ” to download a sample config file with a sample “remote controls in it”

  4. Reboot your Raspberry Pi and make sure lircd is running , if not start it by issuing “sudo /etc/init.d/lirc restart”

Now you can play with the LIRCd Android clients like “Amote”  , and configure your smartphone as a custom user interface for controlling IR appliances using your newly configured Raspberry Pi Infrared Remote control.

As in my previous post I will again use the “Amote” lirc client application for Android in order to control my new Raspberry Pi infrared Transceiver.

The Amote app will allow you to:

  • Configure the network settings to connect to The lircd that runs innside Raspberry Pi

  • Allow you to connect to that lirc daemon and query for the remotes.

  • To assign and make custom buttons and interface for any of the remotes in the Lirc database . Below are some screenshots and videos.

We have a special discount ( 20% Off )offer for Raspberry Pi owners, you can purchase a Irdroid-Rpi Infrared Transceiver HAT with discount using the link below and applying the “raspberry” coupon on checkout .

http://www.irdroid.eu/product/irdroid-rpi-infrared-transceiver-raspberry-pi/

We also provide a ready configured and tested install of the LIRC daemon on a sdcard so that you can directly plug the card to your Raspberry Pi (for model B+) and save you some typing in the terminal. You can purchase a 16 Gigs SDcard with Raspbian and LIRCd configured for Irdroid from the link below:

Click here to grab a configured and tested install of Lircd, configured with the Irdroid-Rpi Infrared  Transceiver HAT  on a sdcard ready for running on your Raspberry Pi model B+

Downloads:

 

The image below is a link. Try to click on it.

How to turn your Raspberry Pi into a fully functional infrared remote control

Irdroid USB and Raspberry Pi

Irdroid USB and Raspberry Pi

We have received many requests for assistance with making the Irdroid USB Infrared Transceiver to work with the Raspberry Pi and in particular with Raspbian Linux OS distribution. Below we provide a step by step guide for making the Irdroid USB Infrared Transceiver working with the Raspberry Pi. In this particular example we will be using a Raspberry Pi model B+ with 512 MB of RAM as a medium for running the open source software LIRCd , responsible for sending and receiving infrared commands in Linux.

I am using the following tools ( Hardware ) for our tests:

I also use the following software tools :

  • A custom port of LIRC for the Irdroid USB Infrared Transceiver (Source code available for download – see the links at the end of this Blog post)
  • We will also use Raspbian , installed using NOOBS on a 16 GB sdcard.
  • The Irdroid USB Infrared transceiver uses the standard Serial ACM drivers in Linux that come with most Linux Distributions. Raspbian also has this driver built-in , so we do not need to compile custom drivers etc for making it work with this Linux Distro.
  • You will have to download the custom version of LIRC (that support the Irdroid USB IR transceiver) from our website, so step #1 is downloading LIRC
Below are the steps for compiling and installing LIRCd for the USB Infrared Transceiver  on your system:
  1. Open a console via SSH to your Raspberry Pi, and type the following command to download LIRC:sudo wget https://irdroid.com/wp-content/uploads/downloads/2014/01/USB_transceiver_LIRC.tar.gz
  2. Extract the archive and “cd” in the “irtoy” directory
  3. Type “./configure.sh” Once it completes issue:
  4. “sudo make install” , this will compile LIRC and it will install it. Once the operation completes. You have a LIRC installed on your system, we still have to make install a lircd.conf file with the remote control “database” in it , so that LIRC can generate IR commands and blast the commands over the Irdroid USB IR Transceiver module.
  5. Issue the following command “cd /etc” then issue “sudo mkdir lirc” “cd /lirc”
  6. Then Issue “sudo wget http://irdroid.com/db/t.conf -O lircd.conf ” to download a sample config file with a sample “remote controls database”
  7. Then insert the Irdroid USB infrared transceiver module in a free USB port on your Raspberry Pi, the module should be enumerated and it should show in the system as a serial ACM device (by default if no other serial ACM devices enumerated it should be ttyACM0)
  8. to start LIRC issue “sudo lircd –device=/dev/ttyACM0 –listen=8765” this will instruct LIRC to listen on port 8765 on All interfaces

You can also add the command above into the rc.local file , so that you have a lircd running on boot. (before that command you need to add “sudo mkdir /var/run/lirc” so that allowing lircd to create its pid file in that directory).You should be able to connect to the LIRC daemon on the Raspberry Pi IP and Port 8765
Now you can play with the LIRCd Android clients like “Amote” and also Irdroid Macro Remote / NFC Remote , and configure your smartphone as a custom user interface for controlling IR appliances using your newly configured Raspberry Pi Infrared Remote control.

In my particular configuration, my WiFi router is in a room where there was no TV. I had to find a way to assure one ethernet port available in the living room in order to connect to my Raspbeery Pi board. I have found that I have two SMC powerline adapters, that work in transparent bridge mode, so voila I got that remote ethernet port for my Pi.

In my case the Raspberry Pi board is connected to my home WiFi router and the router has provided the Pi with a 192.168.1.4 IP address. To use it as a remote control with Any android device you will need to download the “Amote” application for android which will allow you to setup the lirc client network setting, and to configure a custom remote with layout and button naming.

The amote app will allow you to.

  • Configure the network settings to connect to The lircd that runs in the Raspberry Pi
  • Allow you to connect to that lirc daemon and query for the remotes in its lircd.conf file.
  • To assign and make custom buttons and interface for any of the remotes in the Lirc database . Below are some screenshots and videos.

For convenience you can make the LIRC daemon to start on boot as a service.

We have a special discount ( 20% Off )offer for Raspberry Pi owners, you can purchase a Irdroid USB IR Transceiver with discount using the link below and applying the “raspberry” coupon on checkout .

http://www.irdroid.eu/product/usb-infrared-transceiver/

We also provide a ready configured and tested install of the LIRC daemon on a sdcard so that you can directly plug the card to your Raspberry Pi (for model B+) and save you some typing in the terminal. You can purchase a 16 Gigs SDcard with Raspbian and LIRCd configured for Irdroid from the link below:

Click here to grab a configured and tested install of Lircd, configured with the Irdroid USB Infrared Transceiver on a sdcard ready for running on your Raspberry Pi model B+

Downloads:

The image below is a link. Try to click on it.

Irdroid-Rpi Infrared Transceiver for Raspberry Pi

We have received a number of requests for making Infrared Transmitter / Receiver modules compatible with Raspberry Pi.  Our USB Infrared Transceiver module is compatible with Rpi , however we have decided to actually make a add-on Infrared Transceiver board / HAT for Rpi. The board is designed with Infrared Transmitter , Infrared Receiver and Olimex UEXT interconnect sections.

Irdroid-Rpi Infrared Transceiver Features:

  • Infrared Transceiver add-on / HAT for Raspberry Pi
  • Infrared Transmitter @940nm with 10+ meters range
  • Infrared Receiver up to 40khz and 10+ meters of receive range
  • On-board UEXT Interconnect for connecting Olimex sensors and boards.
  • Open Source Hardware.

We have completed the design of the board. We expect to have it in stock in mid April 2016.

Read more by following the link below ( http://www.irdroid.eu )