External integration - Android TV Remote

I can’t stop now :joy: … I also started an Android TV Remote integration.

It allows you to connect and control Android TV and Google TV televisions and set-top boxes (Nvidia Shield, Chromecast with Google TV, Sony, Xiaomi Mi Box, TCL, etc.) directly on your local network.


Key Features

  • Native Remote v2 Protocol (TLS): Secure connection on ports 6466/6467. No need to enable developer mode or ADB on the TV.
  • Easy Pairing with PIN Code: Guided 2-step procedure directly in the Gladys interface (PIN code displayed on the TV screen).
  • Real-Time Status Feedback: Instant feedback in Gladys of the on/off status, volume level, and mute status.
  • Multi-TV Management: Pair and control multiple televisions independently.
  • Full Control:
    • Power On/Off switch
    • Volume and Mute management
    • Navigation Buttons (D-Pad): Up, Down, Left, Right, OK, Back, Home, Menu
    • Media Buttons: Play, Pause, Stop, Previous, Next, Fast Forward, Rewind
  • Application Shortcuts (Optional): Direct launch of your favorite apps (Netflix, YouTube, Prime Video, Disney+, Spotify, Plex, Arte, Molotov, myCANAL). An option in the settings allows you to disable them if you want to clean up your device card.

Ergonomics & Usage Tips (Scenes)

:information_source: Note on Dashboard Display:
Gladys Assistant currently does not have a dedicated « Remote / Media Player » widget with a visual directional pad, so the device appears as the generic « Devices » widget (vertical list of buttons).

For smooth daily use, it is highly recommended to use Gladys Scenes:

  • Create scenes for your key actions (« Turn on TV », « Movie Mode », « Pause », « Launch Plex »).
  • Place Scene cards/buttons on your Gladys dashboard to trigger these actions properly in one click.
  • For quick manual navigation in TV menus (browsing the Netflix catalog, typing text), the official Google TV app or the physical remote control remains the ideal companion.

Examples of Gladys Scenes

  • :popcorn: Movie Mode: Turn on the TV + set volume to 20% + dim the living room lighting.
  • :door: Departure / Night Mode: Automatically turn off the TV when the house switches to away or night mode.
  • :bell: Automatic Pause: Pause the TV when a call or connected doorbell is detected.

Installation & Configuration

  1. Add the external integration to your Gladys Assistant instance:
    https://github.com/guim31/gladys-integration-android-tv-remote
    
  2. Go to Integrations > Android TV Remote:
    • Step 1: Enter the IP address of your TV and launch the action. A 6-digit PIN code is displayed on the TV.
    • Step 2: Enter the PIN code and validate.
  3. Launch a Device Search in the Discovery tab to add the TV to your devices.

Links & Source Code

I remind you that I am not a professional developer, I trust AI because I don’t have the skills to understand everything. Don’t hesitate to tell me if something is wrong or missing … !

You can’t stop us now! Welcome to the developer side, and don’t worry in the age of AI, the only thing that matters is motivation :grin: The technique is perfectly handled by Claude :wink: