mirror of https://github.com/arendst/Tasmota.git
IR Remote article
parent
ce708d6ef3
commit
3c79e8c17b
|
@ -357,11 +357,6 @@ See also|[`SetOption28`](#SetOption28) - Set RF received data format
|
|||
|
||||
### IR Remote
|
||||
|
||||
See [Linux Infrared Remote Control (LIRC)](http://www.lirc.org/) for more information.
|
||||
|
||||
A [specialized version of Tasmota](Tasmota-IR) can be compiled which supports almost all of the IR protocols available in the [`IRremoteESP8266` library](https://github.com/crankyoldgit/IRremoteESP8266).
|
||||
|
||||
|
||||
<a id="tb-irremote">Command|Parameters
|
||||
:---|:---
|
||||
IRsend`<x>`<a id="IRsend"></a>|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.**_<BR>`<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>}`<BR><BR>`"Protocol"` (select one of the following):<ul><li>`"NEC"`</li><li>`"SONY"`</li><li>`"RC5"`</li><li>`"RC6"`</li><li>`"DISH"`</li><li>`"JVC"`</li><li>`"PANASONIC"`</li><li>`"SAMSUNG"`</li><li>`"PIONEER"`</li></ul>`"Bits":1..32` = required number of data bits<BR> for PANASONIC protocol this parameter is the the address, not the number of bits<BR><BR>`"Data":1..(2^32)-1` = data frame as 32 bit decimal.<BR> e.g., `IRsend {"Protocol":"NEC","Bits":32,"Data":2170978686}`<BR>**or**<BR>`"Data":0x1..0xFFFFFFFF` = data frame as 32 bit hexadecimal.<BR> e.g., `IRsend {"Protocol":"NEC","Bits":32,"Data":0x8166817E}`<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)
|
||||
|
|
|
@ -0,0 +1,65 @@
|
|||
IR Remote driver enables sending IR codes through an IR transmitter and receiving them through an IR receiver via [IRremoteESP8266 library](https://github.com/crankyoldgit/IRremoteESP8266).
|
||||
|
||||
A [specialized version of Tasmota](Tasmota-IR) can be compiled which supports almost all of the IR protocols available in the [`IRremoteESP8266` library](https://github.com/crankyoldgit/IRremoteESP8266).
|
||||
|
||||
|
||||
# IR Transmitter
|
||||
## Configuration
|
||||
The prebuilt transmitter modules have a weak IR LED, effective transmit distance is really short. If you need range, either look for a breakout board with a TSAL6x00 LED or build your own.
|
||||
|
||||
## Wiring
|
||||
| IR | ESP266 |
|
||||
|---|---|
|
||||
|S |GPIOx |
|
||||
|+ | 5v |
|
||||
|- |GND |
|
||||
|
||||
## Tasmota
|
||||
In the _Configuration -> Configure Module_ page assign:
|
||||
- GPIOx to `IRsend (8)`
|
||||
|
||||
See [IR commands](Commands#ir-remote) for use.
|
||||
|
||||
# IR Receiver
|
||||
<img src="https://user-images.githubusercontent.com/5904370/68152195-7443c180-ff43-11e9-95dc-0268d5e5dd3c.png" align=right></img>
|
||||
|
||||
IR Receiver is used to capture IR codes. Those codes can be sent using [`IRSend`](commands#irsend) or used as a [rule](Rules) trigger.
|
||||
|
||||
> Example uses the widely available [KY-022](https://arduinomodules.info/ky-022-infrared-receiver-module/) breakout board.
|
||||
|
||||
## Wiring
|
||||
| KY-022 | ESP266 |
|
||||
|---|---|
|
||||
|S |GPIOx |
|
||||
|+ | 5v |
|
||||
|- |GND |
|
||||
|
||||
## Tasmota
|
||||
In the _Configuration -> Configure Module_ page assign:
|
||||
- GPIOx to `IRrecv (51)`
|
||||
|
||||
On a captured code IR receiver sends a `tele/%topic%/RESULT` JSON reponse:
|
||||
|
||||
```json
|
||||
{
|
||||
"Time": "2019-01-01T00:00:00",
|
||||
"IrReceived": {
|
||||
"Protocol": "NEC",
|
||||
"Bits": 32,
|
||||
"Data": "0x00FF00FF"
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
### Further Reading
|
||||
This covers only the basic IR protocols. Read [Complete IR Remote Protocols](Tasmota-IR) for more advanced applications.
|
||||
|
||||
[IR Send RAW configuration and use](IRSend-RAW-Encoding)
|
||||
|
||||
User maintained [codes database for IR](Codes-for-IR-Remotes-(for-YTF-IR-Bridge))
|
||||
|
||||
[Linux Infrared Remote Control (LIRC)](http://www.lirc.org/) for more information.
|
||||
|
||||
### Other Projects
|
||||
- [IR Blaster with Tasmota](http://www.asknoone.com/ir-blaster-with-tasmota/)
|
||||
- [Sonoff Basic IR "hat"](https://github.com/altelch/SonoffIR)
|
|
@ -29,7 +29,7 @@ More about [general configuration](Sensor-Configuration).
|
|||
- **HTU21** - Temperature and Humidity sensor (I<sup>2</sup>C)
|
||||
- **HX711** - Load Cell sensor (single wire)
|
||||
- **INA219** - High-Side DC Current and Voltage sensor (I<sup>2</sup>C)
|
||||
- [**IR Remote Control**](https://github.com/altelch/SonoffIR) - DIY IR transmitter
|
||||
- [**IR Remote**](IR-Remote) - IR transmitter and receiver
|
||||
- **K30, K70, S8** - CO<sub>2</sub> sensor (I<sup>2</sup>C) -
|
||||
- [**LM75AD**](LM75AD) - Temperature Sensor (I<sup>2</sup>C)
|
||||
- **MAX31855** - Thermocouple Sensor (SPI)
|
||||
|
|
Loading…
Reference in New Issue