PHP Classes
elePHPant
Icontem

IRP Classes: Send and receive infrared commands via serial port

Recommend this page to a friend!
  Info   View files Example   View files View files (16)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2018-04-08 (5 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 82 All time: 9,128 This week: 378Up
Version License PHP version Categories
irpclasses 1.04GNU Lesser Genera...5PHP 5, Wireless and Mobile, Hardware
Description Author

This class can send and receive infrared commands via serial port.

It can parse IRP strings that define communication sequences between infrared devices.

The class can encode and decode command sequences to be sent and received from remote controls.

Innovation Award
PHP Programming Innovation award nominee
August 2017
Number 9
Infrared radiation is used to transmit information between remote control devices and other devices controlled remotely.

This class can send commands to infrared devices using sequences defined using the IRP notation format.

Manuel Lemos
  Performance   Level  
Name: Marco Sillano <contact>
Classes: 4 packages by
Country: Italy Italy
Innovation award
Innovation award
Nominee: 3x

Winner: 1x

Details

irp_classes

This php classe 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 processes 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 known IRPs and not for analysing or reverse-engineering unknown IR protocols, because for that are many better applications (IRremote, IrScrutinizer etc..).

The global desing is different from usual: Arduino (or other hardware) does only very simple tasks: to receive and to transmit RAW IR signals. All the work is done on PHP, and it is universal, based on IRPs, no size or protocols limits. The irp_class can be used with a big database in WAMP environment, as I do in remotesDB (https://github.com/msillano/remotesDB), library and demo application for replica of any IR remote control (air condioners included).

To store and retrieve IR commands you have many options: - RAW: big size but fast, car it not requires IRP or processing (format like RAW-0 or any compressed version: RAW-1,RAW-2) - HEX: small, but requires an IRP (format like BIN-1 or BIN-2) - DATA SET: smallest and significant (like {D=7,F=0x3F})

With this library you have also 2 test pages: 1. Test cases for the library irp_classes: encode + decode. This test don't requires hardware. It produces a RAW IR stream, then decodes it. See examples/example_Fujitsu_aircon_modified_test.pdf. 2. (receive) + decode and analyse test. This demo can run with capturing HW (Arduino) or it can use some recorded IR RAW data. See examples/example_NEC1_decode.pdf.

Arduino: the HW schema and the Arduino sketch can be found in the dir 'Arduino'

LIMITS - Raw stream receive precision = +/- 1 microsecond (with Arduino uno Rev.3: +/- 2 microseconds) - Raw transmit frequencies: no limits (with Arduino uno Rev.3: 30KHz - 57 KHz) - Raw receive buffer size: no limits (with Arduino uno Rev.3: 300) - Raw transmit size:no limits (with Arduino uno Rev.3: 300)

WORK IN PROGRESS project, now composed of following modules:

1) irp_classes (https://github.com/msillano/irp_classes): base classes and libray to work with IRP and RAW IR streams. Demo: (receive) + decode and analyse IR commands.

2) remotesDB (https://github.com/msillano/remotesDB): MySQL DB for IRP applications and related php tools. Demo: replica of any remote control in DB.

3) remotesDBdiscovery (https://github.com/msillano/remotesDB): This extension of remotesDB is for the management of new remote controls, with 100+ IRP

4) USBphpTunnel_fifo (https://github.com/msillano/USBphpTunnel_fifo): This Android app allows you to use a TVbox (e.g. MXQ) as stand alone web server running remotesDB, talking via USB with an Arduino board as IR interface.

INSTALLATION

Copy all in web area of your WAMP server: e.g. ' ...\apache\htdocs\www\phpIRPlib'.

optional: If you have Arduino-uno and an IR receiver:

 -  See the dir Arduino

optional: Serial communications php-Arduino in windows:

-  Download and install 'PHP Serial extension' free from http://www.thebyteworks.com (with some limits).

note: If you have some different IR HW, modify irp_rxtxArduino.php to receive RAW data from your HW.

Arduino IR

  Files folder image Files  
File Role Description
Files folder imageArduino (3 files)
Files folder imagecss (1 file)
Files folder imageexamples (4 files)
Accessible without login Plain text file decode-test.php Example Example script
Accessible without login Plain text file full-test.php Example Example script
Accessible without login HTML file index.html Doc. Documentation
Plain text file irp_classes.php Class Class source
Accessible without login Plain text file irp_rxtxArduino.php Aux. Auxiliary script
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Doc. Documentation
Accessible without login Plain text file readme.txt Doc. Documentation

  Files folder image Files  /  Arduino  
File Role Description
  Accessible without login Image file arduinoIR.jpg Data Auxiliary data
  Accessible without login Plain text file IRHW-Arduino.pdf Data Auxiliary data
  Accessible without login Plain text file rawRxTx02.ino Data Auxiliary data

  Files folder image Files  /  css  
File Role Description
  Accessible without login Plain text file style.css Data Auxiliary data

  Files folder image Files  /  examples  
File Role Description
  Accessible without login Image file demo_indexpage.gif Data Auxiliary data
  Accessible without login Plain text file demo_indexpage.pdf Data Auxiliary data
  Accessible without login Plain text file example_Fujitsu_aircon_modified_test.pdf Data Auxiliary data
  Accessible without login Plain text file example_NEC1_decode.pdf Data Auxiliary data

 Version Control Unique User Downloads Download Rankings  
 100%
Total:82
This week:0
All time:9,128
This week:378Up