Updated Tasmota IR (markdown)

Michael Ingraham 2019-09-08 15:32:56 -04:00
parent a13384513c
commit ce1caca89e
1 changed files with 8 additions and 8 deletions

@ -1,17 +1,17 @@
# IR Remote "Full protocols" version
# "Complete" IR Remote Protocols
The default Sonoff version includes support for IR send/receive for a limited set of protocols, see [Tasmota Commands](https://github.com/arendst/Sonoff-Tasmota/wiki/Commands#irremote). Tasmota uses the [IRremoteESP8266 library](https://github.com/crankyoldgit/IRremoteESP8266) that supports numerous protocols. Each protocol consumes some program memory, especially air conditioner protocols (up to 81k of Flash size).
The default Tasmota firmware variants include support for IR send/receive for a limited set of protocols (see [IR Remote](Commands#irremote)). Tasmota uses the [IRremoteESP8266 library](https://github.com/crankyoldgit/IRremoteESP8266) that supports numerous protocols. Each protocol consumes some program memory, especially air conditioner protocols (up to 81k of Flash size).
There are now two Tasmota flavors that provided almost all IRremoteESP8266 protocols, which means disabling some other features to keep code size reasonable. `Sonoff-IR` is pre-packaged for IR blasters, like [Eachen IR Bridge](https://blakadder.github.io/templates/eachen_SANT-IR_01.html) or [YTF IR Bridge](https://blakadder.github.io/templates/ytf_ir_bridge.html).
There are now two additional Tasmota firmware variants that provide almost all IRremoteESP8266 protocols. This requires disabling some other features to keep code size manageable.
- `sonoff-ir` is pre-packaged for IR blasters, like [Eachen IR Bridge](https://blakadder.github.io/templates/eachen_SANT-IR_01.html) or [YTF IR Bridge](https://blakadder.github.io/templates/ytf_ir_bridge.html). Choose the preconfigured `sonoff-ir` if you are using an IR blaster.
- `sonoff-ircustom` is used if you want to customize your own firmware binary. This latter variant is required because it triggers a special compilation flag for IRremoteESP8266.
> Choose the preconfigured `sonoff-ir` binary if you are using an IR blaster. If you want to customize your own version, choose `sonoff-ircustom`. The later is required because it trigger a special compilation flag for IRremoteESP8266.
## Sending IR Commands
## Sending IR
Send an IR remote control code as a decimal or hexadecimal string in a JSON payload. In order to send IR data, _**you must configure one of the free device GPIO as `IRsend (8)`. GPIO01 nor GPIO03 can be used.**_
Send an IR remote control code as a decimal or hexadecimal string in a JSON payload. In order to send IR data, _**you must configure one of the free device GPIO as `IRsend (8)`. Neither GPIO01 nor GPIO03 can be used.**_
<a id="tb-irremote">Command|Parameters
:---|:---
IRsend`<x>`<a id="IRsend"></a>|`<x>` [_optional_] = number of times the IR message is sent. If not specified or `0..1`, the message is sent only once (i.e., not repeated) _(default)_<BR>`>1` = emulate a long-press on the remote control, sending the message `<x>` times, or sending a repeat message for specific protocols (like NEC)<BR><BR>`{"Protocol":"<value>","Bits":<value>,"Data":<value>,"DataLSB":<value>,"Repeat":<value>}`<BR><BR>`"Protocol"` or `"Vendor"` (select one of the following): <BR>`RC5, RC6, NEC, SONY, PANASONIC, JVC, SAMSUNG, WHYNTER, AIWA_RC_T501, LG, MITSUBISHI, DISH, SHARP, DENON, SHERWOOD, RCMM, SANYO_LC7461, RC5X, NEC (non-strict), NIKAI, MAGIQUEST, LASERTAG, CARRIER_AC, MITSUBISHI2, HITACHI_AC1, HITACHI_AC2, GICABLE, LUTRON, PIONEER, LG2, SAMSUNG36, LEGOPF, INAX, DAIKIN152)`<BR><BR>`"Bits":1..64` = required number of data bits<BR>&nbsp;&nbsp;&nbsp;&nbsp;for PANASONIC protocol this parameter is the the address, not the number of bits<BR><BR>`"Data":0x1..0xFFFFFFFFFFFFFFFF` = data frame as 64 bit hexadecimal.<BR>&nbsp;&nbsp;&nbsp;&nbsp;e.g., `IRsend {"Protocol":"NEC","Bits":32,"Data":0x8166817E}`<BR>**Or**<BR>`"DataLSB":0x1..0xFFFFFFFFFFFFFFFF` = data frame as 64 bit hexadecimal with LSB (each byte with bits reversed).<BR>&nbsp;&nbsp;&nbsp;&nbsp;e.g., `IRsend {"Protocol":"NEC","Bits":32,"Data":0x8166817E}`<BR>`DataLSB` comes handy with LSB-first (Least Significant Bit First) protocols like NEC, and makes decoding/encoding easier.<BR><BR>Alternatively, you can send IR remote control codes using [RAW command encoding](IRSend-RAW-Encoding).<BR><BR>Information on [Receiving Infrared Data](Receiving-Infrared-Remote-Control-Data)
IRsend`<x>`<a id="IRsend"></a>|`<x>` [_optional_] = number of times the IR message is sent. If not specified or `0..1`, the message is sent only once (i.e., not repeated) _(default)_<BR>`>1` = emulate a long-press on the remote control, sending the message `<x>` times, or sending a repeat message for specific protocols (like NEC)<BR><BR>`{"Protocol":"<value>","Bits":<value>,"Data":<value>,"DataLSB":<value>,"Repeat":<value>}`<BR><BR>`"Protocol"` or `"Vendor"` (select one of the following): <BR>`RC5, RC6, NEC, SONY, PANASONIC, JVC, SAMSUNG, WHYNTER, AIWA_RC_T501, LG, MITSUBISHI, DISH, SHARP, DENON, SHERWOOD, RCMM, SANYO_LC7461, RC5X, NEC (non-strict), NIKAI, MAGIQUEST, LASERTAG, CARRIER_AC, MITSUBISHI2, HITACHI_AC1, HITACHI_AC2, GICABLE, LUTRON, PIONEER, LG2, SAMSUNG36, LEGOPF, INAX, DAIKIN152`<BR><BR>`"Bits":1..64` = required number of data bits<BR>&nbsp;&nbsp;&nbsp;&nbsp;for PANASONIC protocol this parameter is the the address, not the number of bits<BR><BR>`"Data":0x1..0xFFFFFFFFFFFFFFFF` = data frame as 64 bit hexadecimal.<BR>&nbsp;&nbsp;&nbsp;&nbsp;e.g., `IRsend {"Protocol":"NEC","Bits":32,"Data":0x8166817E}`<BR>**Or**<BR>`"DataLSB":0x1..0xFFFFFFFFFFFFFFFF` = data frame as 64 bit hexadecimal with LSB (each byte with bits reversed).<BR>&nbsp;&nbsp;&nbsp;&nbsp;e.g., `IRsend {"Protocol":"NEC","Bits":32,"Data":0x8166817E}`<BR>`DataLSB` comes handy with LSB-first (Least Significant Bit First) protocols like NEC, and makes decoding/encoding easier.<BR><BR>Alternatively, you can send IR remote control codes using [RAW command encoding](IRSend-RAW-Encoding).<BR><BR>Information on [Receiving Infrared Data](Receiving-Infrared-Remote-Control-Data)
IRhvac<a id="IRhvac"></a>|Send HVAC IR remote control code as JSON payload<Br>`{"Vendor":"<value>","Power":<value>,"Mode":”<value>”, "FanSpeed":”<value>”,"Temp":<value>}`<BR>`"Vendor":"Toshiba"\|"Mitsubishi"\|"LG"\|"Fujitsu"`<BR>`"Power":0\|1`<BR>`"Mode":"Hot"\|"Cold"\|"Dry"\|"Auto"`<BR>`"FanSpeed":"1"\|"2"\|"3"\|"4"\|"5"\|"Auto"\|"Silence"` <BR>`"Temp":17..30`
|See also|[`SetOption29`](#SetOption29) - Set IR received data format<BR>[`SetOption38`](#SetOption38) - Set IR received protocol sensitivity<BR>[`SetOption58`](#SetOption58) - [IR Raw data in JSON payload](https://github.com/arendst/Sonoff-Tasmota/issues/2116#issuecomment-440716483)