diff --git a/Commands.md b/Commands.md index d804a095..d8f2690f 100644 --- a/Commands.md +++ b/Commands.md @@ -358,19 +358,11 @@ See also | [`SetOption28`](#SetOption28) - Set RF received data format ### IRremote -Using IRsend it is possible to send the same IR code in decimal, hexadecimal and two RAW formats: -``` -IRsend {"Protocol":"NEC","Bits":32,"Data":2170978686} -IRsend {"Protocol":"NEC","Bits":32,"Data":0x8166817E} -IRsend 0,926,844,958,832,1798,868,902,848,900,870,900,852,908,918,958,794,934,874,928,1738,934,856,1764 -IRSend raw,0,8620,4260,544,411,1496,010101101000111011001110000000001100110000000001100000000000000010001100 -``` -See [Linux Infrared Remote Control (LIRC)](http://www.lirc.org/) for more information. +Using IRsend it is possible to send the same IR code in decimal, hexadecimal and several RAW formats. See [Linux Infrared Remote Control (LIRC)](http://www.lirc.org/) for more information. |Command | Parameters |:--- | :--- -|IRsend | Send IR remote control code as JSON payload. Data can be either a decimal or hexadecimal string
`{"Protocol":"","Bits":,"Data":}`
`"Protocol":"NEC"\|"SONY"\|"RC5"\|"RC6"\|"DISH"\|"JVC"\|"PANASONIC"\|"SAMSUNG"`
`"Bits":1..32` = required number of data bits (for PANASONIC the address))

`"Data":1..(2^32)-1` = data frame as 32 bit decimal.
**or**
`"Data":0x1..0xFFFFFFFF` = data frame as 32 bit hexadecimal.
-| | Send IR remote control code as a RAW command
`,,,..`
**or**
`raw,,,,,,,`
Where
`` = carrier frequency (default 0 = 38kHz)
`` = header mark (ms)
`` = header space (ms)
`` = bit mark (ms)
`` = zero space (ms)
`` = one space (ms)
`` = bit stream data (stream of ones and zeroes)

This command makes use of the output of the raw IR decoder from [ToniA/Raw-IR-decoder-for-Arduino](https://github.com/ToniA/Raw-IR-decoder-for-Arduino)

[IRSend RAW encoding examples](IRSend-RAW-Encoding#examples) +|IRsend | Send IR remote control code as JSON payload. Data can be either a decimal or hexadecimal string
`{"Protocol":"","Bits":,"Data":}`

`"Protocol":"NEC"\|"SONY"\|"RC5"\|"RC6"\|"DISH"\|"JVC"\|"PANASONIC"\|"SAMSUNG"`
`"Bits":1..32` = required number of data bits (for PANASONIC the address))

`"Data":1..(2^32)-1` = data frame as 32 bit decimal.
    e.g., `IRsend {"Protocol":"NEC","Bits":32,"Data":2170978686}`
**or**
`"Data":0x1..0xFFFFFFFF` = data frame as 32 bit hexadecimal.
    e.g., `IRsend {"Protocol":"NEC","Bits":32,"Data":0x8166817E}`

Alternatively, you can send IR remote control codes using as a [RAW command encoding](IRSend-RAW-Encoding). |IRhvac | Send HVAC IR remote control code as JSON string
`{"Vendor":"","Power":,"Mode":””, "FanSpeed":””,"Temp":}`
`"Vendor":"Toshiba"\|"Mitsubishi"\|"LG"\|"Fujitsu"`
`"Power":0\|1`
`"Mode":"Hot"\|"Cold"\|"Dry"\|"Auto"`
`"FanSpeed":"1"\|"2"\|"3"\|"4"\|"5"\|"Auto"\|"Silence"`
`"Temp":17..30` | See also | [`SetOption29`](#SetOption29) - Set IR received data format
[`SetOption58`](#SetOption58) - [IR Raw data in JSON message](https://github.com/arendst/Sonoff-Tasmota/issues/2116#issuecomment-440716483)