irp_classes: library for IR remote control applications


This classes implements the core algorithms required for working with IR remote controls, i.e. encode and decode RAW IR commands, using informations about the IR protocol in 'IRP notation'. The irp_classes is an 'execution process' for IRPs, extended to encode and decode process of IR raw streams.
In this library you also found some methods to handle RAW data streams, without IRP, for 'learn and repeat' applications.
irp_classes was designed to help me (and you) to build good applications using IR Remote Control, like media home automation, with knowns IRPs and not for analysing or reverse-engineering unknowns IR protocols, because for that are many better applications (IRremote, IrScrutinizer etc..).

To store and retrieve IR commands you have many options:

In some cases (e.g. Fujitsu_Aircon_modified) you can have 2 DATA SET: the <device-parameters> and the <protocol-parameters>: this class processes both.

Test:

Of course any design using IR is influenced by hardware and by the communications between host and IR device (Serial communications using php in Win environment are not easy). Here some simple example test pages.
For a more complex demo see remoteDB.

Test cases for the library irp_classes: encode + decode

This test don't requires hardware. It produces a RAW IR stream, then decodes it.
Useful, because this test shows all formats and all main methods of irp_classes library.
For more infos, read comments embedded in irp_classes.php.

Choose protocol:     

Demo example: (receive) + decode and analyse test

This demo can run with capturing HW (Arduino) or it can use some recorded IR RAW data.
  • Arduino: the HW schema and the Arduino sketch can be found in the dir 'Arduino'
  • Serial: this demo on Win requires the free version of PHP Serial extension (download and install it before). Free version is with some limits: you must restart the server before any run (sorry, no Linux version).
  • If you have problems with serial, it is possible to use the Arduino IDE terminal and copy and paste the IR RAW stream into the decode-test.php code.
The output is similar to previous test, but the protocols* uses recorded real data produced by remote controls. On case of real data, this demo shows also the use of methods processing RAW data without IRP.

Choose protocol:         

to remoteDB test >>>