Broadlink Reader is a Python command-line interface (CLI) tool designed to interact with Broadlink remotes to learn and capture IR/RF commands.
- Connect to Broadlink remote over a network.
- Learn and capture IR/RF commands
- Save captured commands to a specified file in JSON format
- Generate "commands.json" file that can be integrated to SmartIR.
To get started with Broadlink Reader, clone the repository from GitHub:
git clone https://github.com/JexSrs/broadlink-reader.git
and install the project:
python3 setup.py install
# or
pip install -r requirements.txt
You can run the Broadlink Reader using the reader.py
script. The following options are available to customize your
interaction with the Broadlink device:
python src/reader.py --ip 192.168.1.100 # Remote's IP address
Name | Required | Default | Description |
---|---|---|---|
-h, --help |
No | N/A | Show the help message and exit. |
--ip <ip> |
Yes | N/A | Specify the IP Address of the Broadlink device. |
--port <port> |
No | 80 |
Specify the port of the Broadlink device. |
--timeout <timeout> |
No | 10 |
Set the timeout (in seconds) for device connection. |
--read-type <type> |
No | "ir" |
Specify the capture type: "ir" or "rf" . |
--read-delay <seconds> |
No | 2 |
Set the time to wait (in seconds) for the user to send the command. |
--file <filename> |
No | ./commands.json |
Specify the output file for saving learned commands. |
The default input file, commands.json, can be extended under the commands key to provide the program with additional IR/RF actions.
You can run the Broadlink Writer using the writer.py
script. The following options are available to customize your
commands.json
file:
python src/writer.py --name commands.json --min-temp 17 --max-temp 30 --precision 1 --operations cool heat auto --fan low high auto
Name | Required | Default | Description |
---|---|---|---|
-h, --help |
No | N/A | Show the help message and exit. |
--min-temp <temp> |
No | 16 |
Specify the minimum temperature. |
--max-temp <temp> |
No | 30 |
Specify the maximum temperature. |
--precision <p> |
No | 1 |
Specify the precision step for the temperature (e.g. 0.5). |
--operations <op> |
No | ["cool", "heat", "dry", "fan_only", "auto"] |
Specify the operations. |
--fan <fan> |
No | ["auto", "low", "mid", "high"] |
Specify the fan speed levels. |
--name <filename> |
No | ./commands.json |
Specify the output file. |
- Install PyInstaller:
pip install pyinstaller
- Build
- Reader:
pyinstaller --onefile src/reader.py
- Writer:
pyinstaller --onefile src/writer.py
- Reader:
- Executable files will be created under dist directory
Contributions are welcome! Please feel free to submit a pull request or open an issue if you have any ideas, feature requests, or bugs.
This project is licensed under the MIT License. See the LICENSE file for details.