Broadlink Hacktools is a Python module for decrypting, filtering and analyzing packets captured from Broadlink devices to better integrate them with home automation platforms.
- This is not an official Broadlink application.
- For now, only universal remote devices are supported.
Use the package manager pip to install broadlinkhacktools.
pip install broadlinkhacktools
from broadlinkhacktools import PacketDecryptor, PacketPrinter, PersistenceHandler
from broadlinkhacktools.protocol.const import DEFAULT_IV, DEFAULT_KEY
# Load packets from binary files.
src_folder = 'some_folder'
packets = PersistenceHandler.load_packets(src_folder)
# Decrypt packets using default key.
decryptor = PacketDecryptor(DEFAULT_KEY, DEFAULT_IV)
decryptor.decrypt(packets)
# Print packets to a file.
printer = PacketPrinter()
with open('packets.txt', 'w+') as file:
for packet in packets:
printer.print(packet, file=file)
For more examples, see examples folder.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.