IRSend RAW Encoding - FengtianGu/Sonoff-Tasmota GitHub Wiki
There are two command syntax forms for sending a remote control code in RAW format with IRsend
:
-
IRSend <frequency>,<rawdata1>,<rawdata2>,..,<rawdataN>
e.g.,
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,<frequency>[,<header_mark>,<header_space>,<bit_mark>],<zero_space>[, [<one_multiple>] | <one_space>],<bit_stream>
Where
Parameter | Description |
---|---|
<frequency> |
carrier frequency (default 0 = 38kHz) |
<header_mark> |
header mark duration (µs) (optional for some protocols) |
<header_space> |
header space duration (µs) (optional for some protocols) |
<bit_mark> |
bit mark duration (µs) (optional for some protocols) |
<zero_space> |
zero space duration (µs) |
<one_multiple> |
used to specify the one space duration if the one space duration is an integral multiple of the zero space duration. This parameter may be omitted if the multiple is 2. Use of this parameter is mutually exclusive with the <one_space> parameter
|
<one_space> |
one space duration (µs). Use this parameter if the one space duration is not an integral multiple of <zero_space> Use of this parameter is mutually exclusive with the <one_multiple> parameter
|
<bit_stream> |
bit stream data (stream of ones and zeroes) |
This command syntax version makes use of the output of the raw IR decoder from ToniA/Raw-IR-decoder-for-Arduino
Number of symbols: 75
Symbols:
Hh010101101000111011001110000000001100110000000001100000000000000010001100
Bytes:
00: 0101|0110 | 6A | 01101010
01: 1000|1110 | 71 | 01110001
02: 1100|1110 | 73 | 01110011
03: 0000|0000 | 00 | 00000000
04: 1100|1100 | 33 | 00110011
05: 0000|0001 | 80 | 10000000
06: 1000|0000 | 01 | 00000001
07: 0000|0000 | 00 | 00000000
08: 1000|1100 | 31 | 00110001
6A,71,73,00,33,80,01,00,31
Timings (in us):
PAUSE SPACE: 0
HEADER MARK: 8620
HEADER SPACE: 4260
BIT MARK: 544
ZERO SPACE: 411
ONE SPACE: 1496
Decoding known protocols...
Unknown protocol
Bytecount: 9
Corresponding command:
IRSend raw,0,8620,4260,544,411,1496,010101101000111011001110000000001100110000000001100000000000000010001100
{8956, 4560, 546, 1710, 588, 616, 584, 618, 584, 1712, 586, 1712, 588, 614, 586, 614, 586, 618, 586, 1706, 590, 616 , 586, 1708, 590, 616, 588, 610, 590, 612, 590, 612, 590, 618, 584, 618, 584, 616, 586, 614, 588, 612, 590, 612, 590, 1712, 586 , 616, 588, 612, 590, 614, 588, 614, 586, 618, 586, 616, 586, 1710, 588, 614, 586, 1708, 590, 610, 592, 612, 590, 1708, 588, 614 , 588, 20084, 548, 612, 590, 614, 588, 614, 588, 616, 586, 654, 546, 616, 586, 616, 586, 614, 588, 612, 588, 610, 592, 612, 590 , 612, 590, 614, 586, 1712, 586, 616, 586, 612, 588, 614, 588, 614, 586, 616, 586, 612, 590, 614, 588, 610, 590, 616, 586, 614 , 588, 612, 590, 612, 590, 614, 588, 614, 588, 614, 588, 1708, 590, 612, 590, 1708, 590}
Arrange the data into pairs:
MARK | SPACE | BIT |
---|---|---|
8956 | 4560 | (header) |
546 | 1710 | 1 |
588 | 616 | 0 |
584 | 618 | 0 |
584 | 1712 | 1 |
586 | 1712 | 1 |
588 | 614 | 0 |
586 | 614 | 0 |
... | ||
590 | 612 | 0 |
590 | 614 | 0 |
588 | 614 | 0 |
588 | 614 | 0 |
588 | 1708 | 1 |
590 | 612 | 0 |
590 | 1708 | 1 |
590 | (ignore) |
The header is always the first pair, the zeroes have the shortest space duration and the ones have the longest space duration.
- header mark is 8956
- header space is 4560
- bit mark, get the average, say 590
- zero space, say 615
- one space, say 1710
Corresponding command:
IRSend raw,0,8956,4560,590,615,1710,1001100 ... 0000101