From 2b2306bf8f0a308bfca012e188a6cf89e7f4a6db Mon Sep 17 00:00:00 2001
From: s-hadinger <49731213+s-hadinger@users.noreply.github.com>
Date: Tue, 6 Aug 2019 18:02:20 +0200
Subject: [PATCH] Updated IRSend RAW Encoding (markdown)
---
IRSend-RAW-Encoding.md | 37 ++++++++++++++++++++++++++++++++++++-
1 file changed, 36 insertions(+), 1 deletion(-)
diff --git a/IRSend-RAW-Encoding.md b/IRSend-RAW-Encoding.md
index 983be630..5c2dccb9 100644
--- a/IRSend-RAW-Encoding.md
+++ b/IRSend-RAW-Encoding.md
@@ -183,4 +183,39 @@ And so on...
In the end, it will look like:
-`IRSend 36,415,277,166,277,...`
\ No newline at end of file
+`IRSend 36,415,277,166,277,...`
+
+## Converting Broadlink IR codes to Tasmota
+
+Broadlink is another popular device to send and receive IR/RF codes. Unfortunately, it does not run ESP8266, so it cannot be Tasmotized.
+
+Broadlink codes come either in Base64 format or in Hex format. Below will use Hex format which is easier to work by hand.
+
+Example:
+
+`"Code":`
+`"2600700000015692171117111612171116121612161117111735173517361636161117351735173517111636161216121611171116121612163616111735173517351735173517351700053D0001554916000C4E0001554916000C4E0001564817000C4D0001564917000C4C0001564917000D050000000000000000",`
+`"Base64":`
+`"JgBwAAABVpIXERcRFhIXERYSFhIWERcRFzUXNRc2FjYWERc1FzUXNRcRFjYWEhYSFhEXERYSFhIWNhYRFzUXNRc1FzUXNRc1FwAFPQABVUkWAAxOAAFVSRYADE4AAVZIFwAMTQABVkkXAAxMAAFWSRcADQUAAAAAAAAAAA==
+`
+
+The Broadling protocol is described here: [Broadlink RM2 network protocol](https://github.com/mjg59/python-broadlink/blob/master/protocol.md)
+
+Here is a copy of the part specifically describing
+
+|Offset|Contents|
+|------|--------|
+|0x00|0x26 = IR, 0xb2 for RF 433Mhz, 0xd7 for RF 315Mhz|
+|0x01|repeat count, (0 = no repeat, 1 send twice, .....)|
+|0x02-0x03|Length of the following data in little endian|
+|0x04 ....|Pulse lengths in 2^-15 s units (µs * 269 / 8192 works very well)|
+|....|0x0d 0x05 at the end for IR only|
+
+Each value is represented by one byte. If the length exceeds one byte then it is stored big endian with a leading 0.
+
+Example: The header for an Optoma projector is 8920 4450
+8920 * 269 / 8192 = 0x124
+4450 * 269 / 8192 = 0x92
+... which would be encoded as `0x00 0x1 0x24 0x92` in broalink format.
+
+You have all the needed information to convert from Broadlink to Tasmota...