Skip to content

Instantly share code, notes, and snippets.

View aalaei's full-sized avatar

Ali Alaei aalaei

  • Swisscom
  • Rotterdam, Netherlands
View GitHub Profile
import configparser
import binascii
import struct
import sys
signature = b'IMAGEWTY'
header_ver = 0x300
header_size = 96
format_ver = 0x100234
@mildsunrise
mildsunrise / README.md
Last active November 1, 2025 13:53
Documentation of Tuya's weird compression scheme for IR codes

[Tuya][]'s IR blasters, like the [ZS08][], have the ability to both learn and blast generic IR codes. These IR codes are given to the user as an opaque string, like this:

A/IEiwFAAwbJAfIE8gSLIAUBiwFAC+ADAwuLAfIE8gSLAckBRx9AB0ADBskB8gTyBIsgBQGLAUALA4sB8gRAB8ADBfIEiwHJAeARLwHJAeAFAwHyBOC5LwGLAeA97wOLAfIE4RcfBYsB8gTyBEAFAYsB4AcrCYsB8gTyBIsByQHgPY8DyQHyBOAHAwHyBEAX4BVfBIsB8gTJoAMF8gSLAckB4BUvAckB4AEDBfIEiwHJAQ==

Not much is known about the format of these IR code strings, which makes it difficult to use codes obtained through other means (such as a