Broadlink Listener
Broadlink IR codes listener and SmartIR json generator.
This project will install a broadlink-listener command line tool that can be used to generate a climate SmartIR
compatible json, starting from an initial structure that defines climate behavior, putting Broadlink IR remote to
listening state, until all IR code combination will being scan.
- Documentation: https://gpongelli.github.io/broadlink-listener
- GitHub: https://github.com/gpongelli/broadlink-listener
- PyPI: https://pypi.org/project/broadlink-listener/
- Free software: MIT
Features
- Discover Broadlink IR remote
- Starting from SmartIR json structure like
{
"supportedController": "Broadlink",
"minTemperature": 16,
"maxTemperature": 31,
"precision": 1,
"operationModes": [
"op_a",
"op_b"
],
"fanModes": [
"fan_a",
"fan_b"
],
"swingModes": [
"swing_a",
"swing_b"
]
}
it helps you listen all the defined IR codes to create a json like
{
"supportedController": "Broadlink",
"minTemperature": 16,
"maxTemperature": 31,
"precision": 1,
"operationModes": [
"op_a",
"op_b"
],
"fanModes": [
"fan_a",
"fan_b"
],
"swingModes": [
"swing_a",
"swing_b"
],
"commands": {
"off": "...",
"op_a": {
"fan_a": {
"swing_a": {
"16": "....",
"31": "...."
},
"swing_b": {
"16": "....",
"31": "...."
}
},
"fan_b": {
"swing_a": {
"16": "....",
"31": "...."
},
"swing_b": {
"16": "....",
"31": "...."
}
}
},
"op_b": {
"fan_a": {
"swing_a": {
"16": "....",
"31": "...."
},
"swing_b": {
"16": "....",
"31": "...."
}
},
"fan_b": {
"swing_a": {
"16": "....",
"31": "...."
},
"swing_b": {
"16": "....",
"31": "...."
}
}
}
}
}
- Mandatory fields into starting json
supportedController,minTemperature,maxTemperature,precision
- Optional fields (at least one must be present or nothing will be listened):
operationModes,fanModes,swingModes
- Generated file can be used into SmartIR HomeAssistant component
- It's possible to interrupt with CTRL-C at any moment, a temporary file will be saved
- Temporary files are also saved at the end of each temperature range
- In case of existing temporary file, the already learnt combination will be skipped
Example
Example of cli command:
$ broadlink-listener generate-smart-ir ./real_data/1124.json <DEVICE_TYPE> <IP> <MAC_ADDR> -n dry -n fan_only -s eco_cool
real_data/1124.json file is this one from SmartIR GitHub repo
in which I've added the missing "swingModes" array, supported by climate but not present on json:
"swingModes": [
"auto",
"high",
"mid_high",
"middle",
"mid_low",
"low",
"swing"
],
<DEVICE_TYPE>, <IP>, <MAC_ADDR> parameter can be obtained running:
$ broadlink-listener discover_ir
Credits
This package was created with Cookiecutter and the gpongelli/cookiecutter-pypackage project template.
Release files for broadlink-listener 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| broadlink_listener-1.2.0.tar.gz | 19.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| broadlink_listener-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 32.5 kB
Release files / broadlink_listener-1.2.0.tar.gz
| Download URL | broadlink_listener-1.2.0.tar.gz |
|---|---|
| Size | 19.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
da8e9b10f2820615825531a2518f85a2162b422be22586d6d02d95be97482567
|
|
BLAKE2b-256 checksum How to use checksums |
38d6d0e76501a21ceee60d029a6211d092c2ea2fec2e0f7f6d76948e492df844
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.2
|
Release files / broadlink_listener-1.2.0-py3-none-any.whl
| Download URL | broadlink_listener-1.2.0-py3-none-any.whl |
|---|---|
| Size | 13.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f454a2d88747e4491658b24fab261099fa030a8391381b0b92bea72912a9d804
|
|
BLAKE2b-256 checksum How to use checksums |
d44b553867e6a265f8baf56e6b4e0a361c4c673a29ebb843155271cdc507d960
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.2
|