<article-heading title="Media center remote" is-published="true" updated-date="2021-09-04" /> <p class="article-description"> The media center remote is a <a data-article="home-automation">home automation</a> integration device for receiving signals from an infrared remote controller and dispatching commands to multiple devices through direct serial connections and webservice calls. This project uses the <a href="https://esphome.io/">ESPHome</a> framework, which has made it so much easier to develop, debug and monitor standalone IoT devices. </p> <section class="hero"> <gallery-video src="/content/articles/media-center-remote/media-center-remote.mp4" type="video/mp4"> Switching HDMI devices and interacting with Kodi </gallery-video> </section> <p> Using an <a href="https://www.jaycar.com.au/wifi-mini-esp8266-main-board/p/XC3802">ESP8266</a>, an <a href="https://www.jaycar.com.au/arduino-compatible-infrared-receiver-module/p/XC4427">infrared receiver module</a>, and a <a href="https://www.jaycar.com.au/rs-232-to-ttl-uart-converter-module/p/XC3724">RS-232 to TTL UART converter module</a>, this integration device is able to: </p> <ul> <li>Recieve and decode a variety of infrared signals</li> <li>Dispatch JSON-RPC calls to a Kodi instance over the network</li> <li>Send RS-232 control codes to a connected television</li> </ul> <section class="gallery previews-large"> <figure> <img src="/content/articles/media-center-remote/media-center-remote-breadboard-diagram.png" alt="A breadboard diagram showing an ESP8266 connected to an infrared receiver module and RS-232 to TTL UART converter module" /> <figcaption>Breadboard diagram</figcaption> </figure> <figure> <img src="/content/articles/media-center-remote/media-center-remote-prototype.jpg" alt="An ESP8266 wired up to an infrared receiver module and RS-232 to TTL UART converter module" /> <figcaption>Wired up prototype</figcaption> </figure> <figure> <img src="/content/articles/media-center-remote/media-center-remote-case.jpg" alt="An ESP8266 and RS-232 to TTL UART converter module in a simple 3D-printed case" /> <figcaption>A simple case to hold it all together</figcaption> </figure> <figure> <img src="/content/articles/media-center-remote/remote-controller.jpg" alt="A generic 21-button remote controller" /> <figcaption>"Car MP3" remote controller</figcaption> </figure> <figure> <img src="/content/articles/media-center-remote/home-assistant-screenshot.png" alt="A Home Assistant dashboard panel, with controls to turn the television on and off, and to change the HDMI input." /> <figcaption>Exposing television controls to Home Assistant</figcaption> </figure> </section> <p>In addition to the individual articles below, the full ESPHome configuratio is available in my <a href="https://gist.github.com/TassSinclair/65fb3ee853937c5ffe37914c4fd4cb71">media-center-remote</a> gist on GitHub. </p> <h2>Stage 1: <a data-article="media-center-remote/infrared-receiver">Infrared receiver</a></h2> <p> Setting up a basic ESPHome configuration to receive and decode infrared signals </p> <h2>Stage 2: <a data-article="media-center-remote/kodi-integration">Kodi integration</a></h2> <p> Automations for reacting to infrared signals by dispatching JSON-RPC calls to Kodi </p> <h2>Stage 3: <a data-article="media-center-remote/television-integration">Television integration</a></h2> <p> Automations for reacting to infrared signals by sending RS-232 control codes to a television </p> <h2>Next steps</h2> <p> The Car MP3 remote controller works, but the grid of identical buttons makes it difficult to use without looking at it. The next step will be to either replace it with another remote controller, or to build a new body around the existing one with a different button layout. </p> <p> If you have any feedback or questions related to this article, please reply to <a href="https://twitter.com/TassSinclair/status/1434156531663048707">my post on Twitter</a>. </p>