From 3dae0496ef2c91aa00479f2f698bb1318150073c Mon Sep 17 00:00:00 2001
From: Michael Ingraham <34340210+meingraham@users.noreply.github.com>
Date: Fri, 19 Jul 2019 09:16:29 -0400
Subject: [PATCH] IR Protocols
---
Commands.md | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Commands.md b/Commands.md
index dfaa70b4..a6a0ff77 100644
--- a/Commands.md
+++ b/Commands.md
@@ -269,7 +269,7 @@ Command | Parameters
AdcParam|ADC0 analog input parameters for NTC (Temperature) or LDR (Light)
`2..3` = Set default parameters based on current ADC type
`2,32000,10000,3350` = Set Steinhart-Hart formula NTC parameters for Bridge Resistance, NTC Resistance, and Beta Coefficient
`3,10000,12518931,-1.405` = Set parameters for Bridge Resistance, Lux Scalar, and Lux Exponent
Altitude|`-30000..30000` - altitude in meters
AmpRes | Current sensor resolution
`0..3` = maximum number of decimal places
-Counter\|`0` = reset Counter\
`1..64900` = preset Counter\
`-1..-64900` = decrease Counter\
`+1..+64900` = increase Counter\
In order to define and use a Counter, _**you must configure one of the free device GPIO as 'Counter'**_
+Counter\|`0` = reset Counter\
`1..64900` = preset Counter\
`-1..-64900` = decrease Counter\
`+1..+64900` = increase Counter\
In order to define and use a Counter, _**you must configure one of the free device GPIO as `Counter`**_
CounterDebounce|`0` = turn off counter debounce
`1..3200` = set counter debounce time in msec
CounterType\|`0` = set Counter\ as pulse Counter
`1` = set Counter\ as pulse Timer
EnergyRes | Energy sensor resolution
`0..5` = maximum number of decimal places
@@ -369,11 +369,11 @@ See also | [`SetOption28`](#SetOption28) - Set RF received data format
### IRremote
-See [Linux Infrared Remote Control (LIRC)](http://www.lirc.org/) for more information.
+See [Linux Infrared Remote Control (LIRC)](http://www.lirc.org/) for more information. Edit [`lib/IRremoteESP8266-2.6.0`](https://github.com/arendst/Sonoff-Tasmota/blob/development/lib/IRremoteESP8266-2.6.0/src/IRremoteESP8266.h#L230) to disable (set to `false`) any unneeded/unwanted protocols and compile your own firmware. Every protocol included consumes program memory and increases the time to decode the IR signal. The air conditioner protocols are the most expensive memory-wise.
Command | Parameters
:--- | :---
-IRsend | 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 cannot be used.**_
`{"Protocol":"","Bits":,"Data":}`
`"Protocol":"NEC"\|"SONY"\|"RC5"\|"RC6"\|"DISH"\|"JVC"\|"PANASONIC"\|"SAMSUNG"`
`"Bits":1..32` = required number of data bits
for PANASONIC protocol this parameter is the the address, not the number of bits
`"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 [RAW command encoding](IRSend-RAW-Encoding).
Information on [Receiving Infrared Data](Receiving-Infrared-Remote-Control-Data)
+IRsend | 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.**_
`{"Protocol":"","Bits":,"Data":}`
`"Protocol":"NEC"\|"SONY"\|"RC5"\|"RC6"\|"DISH"\|"JVC"\|"PANASONIC"\|"SAMSUNG"`
`"Bits":1..32` = required number of data bits
for PANASONIC protocol this parameter is the the address, not the number of bits
`"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 [RAW command encoding](IRSend-RAW-Encoding).
Information on [Receiving Infrared Data](Receiving-Infrared-Remote-Control-Data)
IRhvac | Send HVAC IR remote control code as JSON payload
`{"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
[`SetOption38`](#SetOption38) - Set IR received protocol sensitivity
[`SetOption58`](#SetOption58) - [IR Raw data in JSON payload](https://github.com/arendst/Sonoff-Tasmota/issues/2116#issuecomment-440716483)