I found many tutorials to install and configure python-broadlink, but all of them are for python 2, and the script has been ported to python3, so I decided to write this little howto.
Tested on a freshly installed Debian Buster container.
Run all commands with root privileges:
apt update
apt upgrade
apt install python3-dev python3-pip git
git clone https://github.com/mjg59/python-broadlink.git
cd python-broadlink/
pip3 install -r requirements.txt
pip3 install broadlink
Now you can test everything is working by going to the cli folder and choosing to learn a new command or send any of the commands you already have detected.
cd cli/
./broadlink_cli -h
./broadlink_cli --host 192.168.2.XX --mac 780f77XXXXXX --type 0x2712 --learnfile patata.txt
./broadlink_cli --host 192.168.2.XX --mac 780f77XXXXXX --type 0x2712 --send @patata.txt
./broadlink_cli --host 192.168.2.XX --mac 780f77XXXXXX --type 0x2712 --send 26004800000125941113103810141038103810131137111310381014103810131113103811121137113810381013111310131137111310131113101311131038101410131014103811000d05
If you already use the Broadlink e-Control app, you can use this tool to extract all the devices' codes to be used as above: https://github.com/NightRang3r/Broadlink-e-control-db-dump
This page was a lifesaver for me. Many thanks.