The goal here is to control a “dumb” TV using virtual assistants via Home Assistant. We tap into the push button of the TV and use a transistor along with ESP8266 to mimic a button press.

GitHub: debsahu/PegasusTV

Goal:

  • Control a “dumb” TV using virtual assistants via Home Assistant

Features:

  • Uses D2 to control 2N2222 transistor
  • Control using Web and MQTT API
  • Completely Async
  • WiFiManager Captive Portal to get WiFi credentials (Compile with -DUSE_EADNS for ESP8266)
  • Connect PIN_CTRL pin to base of 2N2222, collector to Probe and emitter to GND

Hardware

Hardware Setup

Software Overview

Libraries Needed

platformio.ini is included, use PlatformIO and it will take care of installing the following libraries.

LibraryLink
ESPAsyncUDPhttps://github.com/me-no-dev/ESPAsyncUDP
ESPAsyncTCPhttps://github.com/me-no-dev/ESPAsyncTCP
ESPAsyncWiFiManagerhttps://github.com/alanswx/ESPAsyncWiFiManager
ESPAsyncDNSServerhttps://github.com/devyte/ESPAsyncDNSServer
ESP Async WebServerhttps://github.com/me-no-dev/ESPAsyncWebServer
AsyncMqttClienthttps://github.com/marvinroger/async-mqtt-client

Software Setup