The Raspberry Pi infrared remote control for a television sound bar also has a Python Flask web service. This makes the remote control “web enabled”, available over the local wifi network.

endpoints

GET

https://10.0.0.4:5000/api/v1/tv/ping/

POST

Send a remote control command.

https://10.0.0.4:5000/api/v1/tv/mute/
                    /api/v1/tv/power/
                    /api/v1/tv/voice-decrease/
                    /api/v1/tv/voice-increase/
                    /api/v1/tv/volume-decrease/
                    /api/v1/tv/volume-increase/

client

GET requests can be made via a browser such as Firefox or mobile Safari POST requests can be made via clients such as terminal curl or POSTMAN or iOS Remy.app

curl --request POST https://10.0.0.4:5000/api/v1/tv/volume-decrease/

References

Raspberry Pi infrared remote control for a television sound bar

https://beepscore.com/website/2019/02/03/raspberry-pi-infrared-remote-control-tv.html

remy_python

https://github.com/beepscore/remy_python
Make a Raspberry Pi infrared remote control. The device can programmatically control television sound bar audio volume. The Raspberry Pi uses LIRC (Linux Infrared Remote Control) to send commands to an attached infrared transmitter.

The Python app has two parts:

  • Functions to send commands to the infrared transmitter, which then transmits the commands to the television sound bar
  • A Flask web service to accept television command requests (e.g. volume decrease, volume increase).

The README includes links to similar remote control projects, infrared remote control hardware.

Remy

https://github.com/beepscore/Remy
Remote control television by sending commands from iOS device to a server.