IRMP-org / IRMP

Infrared Multi Protocol Decoder
GNU General Public License v3.0
267 stars 43 forks source link

Mh addrf: more comprehensive RF OOK send and receive #40

Closed matzrh closed 1 year ago

matzrh commented 3 years ago

Implementation of further protocols: 'HomeEasy' advanced protocol for simple RF controlled switches Information can be found here: https://homeeasyhacking.fandom.com/wiki/Advanced_Protocol I did not implement the described dimming function, as I did not need it and as it is a bit 'hacky' The repartition of address and command just made so that the upper bits 16 bits are in the address and the lower 16 bits in the command. This is a bit arbitrary according to the specs from the page above. To swicht a device on or of, bit at 0x0010 needs to be toggled in the command word.

AC104 protocol for some projector screens or similar: Information can be found here: https://github.com/akirjavainen/A-OK/issues/1 I found however, that I needed to tweak the timing a bit, especially the pause between the repeats needed to be very short for the sending to work. There needs to be a 24 bit ID being sent. This is implemented as follows: A macro RF_AC104_ID 0x123456 has to be defined. If the received ID matches the macro definition, address and command are stored accordingly. Otherwise the upper 16 bit of the ID are stored in the address and the lower 8 bit in the command.

General implementation of sending RF (for Arduino only): A flag irsnd_rf is handled in irsnd.c.h. It is set to 1 if a supported RF protocol is chosen and reset after done with sending. the macro IRSND_RF_PIN is defined in irsndArduinoExt.h and defaults to Pin 12. It can be overwritten before including irsnd.c.h I implemented the above two protocol and RF_GEN24. For the latter, I also found that I needed to tweak the time constants for my hardware to work. Feel free to change it to the original values if you choose to take in this pull request. It may be very particular to my hardware (again, a set of RF-controlled sockets).