Metadata-Version: 2.4
Name: irremote
Version: 2026.11.14.0
Summary: This service exposes an API to control a broadlink IR remote device reachable over the network.
Author-email: Ernesto Alfonso <erjoalgo@gmail.com>
Maintainer-email: Ernesto Alfonso <erjoalgo@gmail.com>
License-Expression: GPL-3.0-or-later
Project-URL: Homepage, https://github.com/erjoalgo/dotfiles/tree/master/bin/irremote
Project-URL: Documentation, https://github.com/erjoalgo/dotfiles/tree/master/bin/irremote/README.md
Project-URL: Repository, https://github.com/erjoalgo/dotfiles/tree/master/bin/irremote
Project-URL: Bug Tracker, https://github.com/erjoalgo/dotfiles/issues
Keywords: ir,broadlink,RM4C,infrared,http,api,tv,brightness
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: Operating System :: POSIX
Classifier: Topic :: Home Automation
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Requires-Dist: broadlink
Requires-Dist: requests

This service exposes an API to control a broadlink IR remote device reachable over the network.

I specifically use a Broadlink RM4C Universal IR remote, although other models may
also work if they are supported by the broadlink python library bindings.

It makes it possible to programmatically press an IR remote button,
but also listen for and learn new buttons, and save button-press contents under memorable names.

To install:

`$ pip install irremote`

Connect to broadlink device at 10.0.0.12, then repeatedly prompt to listen and save new buttons:

`$ irremote --ip 10.0.0.12 -L`

These are persisted by default under ~/.config/ir-buttons/

List learned buttons:

`$ irremote -l`

Run the HTTP API service on the default port 2727 after connecting to the same broadlink device:

`$ irremote --ip 10.0.0.12`
`$ irremote --ip 10.0.0.12 -p2727`

The service has no authentication, so by default it only accepts connections
from the same machine. To press buttons from other machines on your network,
listen on all interfaces:

`$ irremote --ip 10.0.0.12 --host 0.0.0.0`

Run as a client, pressing the button named `LG_VOLUP`:

`$ irremote -b LG_VOLUP`

or

`curl http://localhost:2727/LG_VOLUP_UP`


Press the LG_POWER button, followed by 10 presses of the LG_VOLUP button.

`$ irremote -b LG_POWER,LG_VOLUPx10`

Create a button called "TCL_BRIGHTNESS_UP" that consists of a comma-separated list of other button names.

echo "TCL_MENU,TCL_DOWN,TCL_RIGHT,TCL_RIGHT,TCL_UP,TCL_ENTER,TCL_DOWN,TCL_RIGHT,TCL_UP,TCL_ENTER,TCL_BACKx2" > ~/.config/ir-buttons/TCL_BRIGHTNESS_UP

Press the more complex TCL_BRIGHTNESS_UP button as it if were a regular button:

`$ irremote -b TCL_BRIGHTNESS_UP`

If the IP address argument is omitted in a non-client mode, the broadlink API may try to scan the network for the device, although this can be slower and less reliable.
