{"id":17212411,"url":"https://github.com/gpongelli/broadlink-listener","last_synced_at":"2025-10-10T23:36:38.867Z","repository":{"id":64507824,"uuid":"574186078","full_name":"gpongelli/broadlink-listener","owner":"gpongelli","description":"Broadlink IR codes listener and SmartIR json generator.","archived":false,"fork":false,"pushed_at":"2023-02-24T16:26:57.000Z","size":821,"stargazers_count":8,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-08-27T08:58:53.434Z","etag":null,"topics":["broadlink","python","smartir"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gpongelli.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSES/MIT.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.rst","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-12-04T17:33:56.000Z","updated_at":"2025-08-23T12:30:24.000Z","dependencies_parsed_at":"2025-04-13T22:56:11.529Z","dependency_job_id":"0d6af77a-82eb-4925-a468-dc74b0a9efb1","html_url":"https://github.com/gpongelli/broadlink-listener","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/gpongelli/broadlink-listener","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpongelli%2Fbroadlink-listener","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpongelli%2Fbroadlink-listener/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpongelli%2Fbroadlink-listener/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpongelli%2Fbroadlink-listener/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gpongelli","download_url":"https://codeload.github.com/gpongelli/broadlink-listener/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpongelli%2Fbroadlink-listener/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279005572,"owners_count":26083919,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["broadlink","python","smartir"],"created_at":"2024-10-15T02:59:58.374Z","updated_at":"2025-10-10T23:36:38.807Z","avatar_url":"https://github.com/gpongelli.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Broadlink Listener\n\n\n[![pypi](https://img.shields.io/pypi/v/broadlink-listener.svg)](https://pypi.org/project/broadlink-listener/)\n[![python](https://img.shields.io/pypi/pyversions/broadlink-listener.svg)](https://pypi.org/project/broadlink-listener/)\n[![Build Status](https://github.com/gpongelli/broadlink-listener/actions/workflows/dev.yml/badge.svg)](https://github.com/gpongelli/broadlink-listener/actions/workflows/dev.yml)\n[![codecov](https://codecov.io/gh/gpongelli/broadlink-listener/branch/main/graphs/badge.svg)](https://codecov.io/github/gpongelli/broadlink-listener)\n\n\n\nBroadlink IR codes listener and SmartIR json generator.\n\nThis project will install a `broadlink-listener` command line tool that can be used to generate a climate [SmartIR](https://github.com/smartHomeHub/SmartIR)\ncompatible json, starting from an initial structure that defines climate behavior, putting Broadlink IR remote to\nlistening state, until all IR code combination will being scan.\n\n\n* Documentation: \u003chttps://gpongelli.github.io/broadlink-listener\u003e\n* GitHub: \u003chttps://github.com/gpongelli/broadlink-listener\u003e\n* PyPI: \u003chttps://pypi.org/project/broadlink-listener/\u003e\n* Free software: MIT\n\n\n## Features\n\n* Discover Broadlink IR remote\n* Starting from SmartIR json structure like\n```json\n{\n  \"supportedController\": \"Broadlink\",\n  \"minTemperature\": 16,\n  \"maxTemperature\": 31,\n  \"precision\": 1,\n  \"operationModes\": [\n    \"op_a\",\n    \"op_b\"\n  ],\n  \"fanModes\": [\n    \"fan_a\",\n    \"fan_b\"\n  ],\n  \"swingModes\": [\n    \"swing_a\",\n    \"swing_b\"\n  ]\n}\n```\n  it helps you listen all the defined IR codes to create a json like\n```json\n{\n  \"supportedController\": \"Broadlink\",\n  \"minTemperature\": 16,\n  \"maxTemperature\": 31,\n  \"precision\": 1,\n  \"operationModes\": [\n    \"op_a\",\n    \"op_b\"\n  ],\n  \"fanModes\": [\n    \"fan_a\",\n    \"fan_b\"\n  ],\n  \"swingModes\": [\n    \"swing_a\",\n    \"swing_b\"\n  ],\n  \"commands\": {\n    \"off\": \"...\",\n    \"op_a\": {\n        \"fan_a\": {\n            \"swing_a\": {\n                \"16\": \"....\",\n\n                \"31\": \"....\"\n            },\n            \"swing_b\": {\n                \"16\": \"....\",\n\n                \"31\": \"....\"\n            }\n        },\n        \"fan_b\": {\n            \"swing_a\": {\n                \"16\": \"....\",\n\n                \"31\": \"....\"\n            },\n            \"swing_b\": {\n                \"16\": \"....\",\n\n                \"31\": \"....\"\n            }\n        }\n    },\n    \"op_b\": {\n        \"fan_a\": {\n            \"swing_a\": {\n                \"16\": \"....\",\n\n                \"31\": \"....\"\n            },\n            \"swing_b\": {\n                \"16\": \"....\",\n\n                \"31\": \"....\"\n            }\n        },\n        \"fan_b\": {\n            \"swing_a\": {\n                \"16\": \"....\",\n\n                \"31\": \"....\"\n            },\n            \"swing_b\": {\n                \"16\": \"....\",\n\n                \"31\": \"....\"\n            }\n        }\n    }\n  }\n}\n```\n\n* Mandatory fields into starting json\n  * `supportedController`, `minTemperature`, `maxTemperature`, `precision`\n* Optional fields (at least one must be present or nothing will be listened):\n  * `operationModes`, `fanModes`,`swingModes`\n* Generated file can be used into SmartIR HomeAssistant component\n* It's possible to interrupt with CTRL-C at any moment, a temporary file will be saved\n* Temporary files are also saved at the end of each temperature range\n* In case of existing temporary file, the already learnt combination will be skipped\n\n\n## Example\n\nExample of cli command:\n```bash\n$ broadlink-listener generate-smart-ir ./real_data/1124.json \u003cDEVICE_TYPE\u003e \u003cIP\u003e \u003cMAC_ADDR\u003e -n dry -n fan_only -s eco_cool\n```\n\n`real_data/1124.json` file is [this one from SmartIR GitHub repo](https://github.com/smartHomeHub/SmartIR/blob/master/codes/climate/1124.json)\nin which I've added the missing \"swingModes\" array, supported by climate but not present on json:\n```json\n\"swingModes\": [\n  \"auto\",\n  \"high\",\n  \"mid_high\",\n  \"middle\",\n  \"mid_low\",\n  \"low\",\n  \"swing\"\n],\n```\n\n`\u003cDEVICE_TYPE\u003e`, `\u003cIP\u003e`, `\u003cMAC_ADDR\u003e` parameter can be obtained running:\n```bash\n$ broadlink-listener discover_ir\n```\n\n\n## Credits\n\nThis package was created with [Cookiecutter](https://github.com/audreyr/cookiecutter)\nand the [gpongelli/cookiecutter-pypackage](https://github.com/gpongelli/cookiecutter-pypackage) project template.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgpongelli%2Fbroadlink-listener","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgpongelli%2Fbroadlink-listener","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgpongelli%2Fbroadlink-listener/lists"}