Zum Hauptinhalt springen

Android TV Remote Smart-Home-Integration, kostenlos und Open Source

Android TV Remote-Integration für Gladys Assistant

Gladys-Assistant-Integration für Android TV und Google TV über das Protokoll Remote v2.

Info

Die Dokumentation dieser Integration wird von ihrem Autor geschrieben und ist bisher nur auf Englisch verfügbar.

Control your Android TV and Google TV sets and boxes from Gladys Assistant, over the local network, through the Remote v2 protocol (TLS, ports 6466 and 6467): the one the Google TV app of your phone uses. No developer mode, no ADB to enable.

Features​

For every paired TV, a Gladys device with:

  • Power on / off, with state feedback: a TV that stops answering the network is marked off.
  • Volume (percent) and Mute, followed in real time.
  • The navigation keys (up, down, left, right, OK, back, home, menu) and the playback keys (play, pause, stop, previous, next, fast forward, rewind).
  • An Application select to launch YouTube, Netflix, Prime Video, Disney+, Spotify, Plex, Twitch, Crunchyroll, YouTube Music, Apple TV, Arte, Molotov or myCANAL, and your own applications. The foreground app shows there.
  • Optional Wake-on-LAN: with the MAC address of the TV, "turn on" wakes a TV that is fully powered off.

Pairing​

Everything is typed in the actions of the configuration page, nothing to save in between.

  1. Turn the TV on.
  2. Step 1 — Start pairing: type the IP address of the TV (e.g. 192.168.1.50), a name if you like (e.g. Living Room TV) and its MAC address for Wake-on-LAN, then run the action. A PIN code shows up on the TV.
  3. Step 2 — Confirm the PIN: type the code and run the action right away, the code expires.
  4. Run a device scan (Discovery tab) to add the TV to your devices.

Repeat for every TV. Reserve the IP address of the TV in your router (DHCP reservation): it identifies the device in Gladys.

The "Set the MAC address", "Remove a paired TV" and "Test the connection" actions list your TVs.

Dashboard widgets​

With Gladys 5.1 or newer, four widgets (Edit dashboard → Add a widget). Each has a TV setting; left empty, it shows the first paired TV. They show the last state the TV reported and refresh as soon as it reports a change.

  • Remote — power (On, Off, Unreachable), volume, mute, foreground app, and the Turn on / Turn off, Home, Back, OK keys.
  • Playback — the foreground app and the Play / Pause, Stop, Previous, Next keys.
  • Apps — up to four buttons. Without a setting, the first four apps of the launcher; else type in Application 1 to 4 the name of an app (case and accents do not matter). An unknown name is reported with the known ones. The foreground app is ticked. For more than four buttons, add a second widget.
  • Volume — a tile bound to the Volume feature of the TV (live), the mute state, and the Vol −, Vol +, Mute keys (ticked while mute is on).

Good to know​

  • The Power and Mute keys are toggles on the TV: the integration only sends them when the known state differs from the requested one.
  • The protocol has no absolute volume: the requested level is reached key by key.
  • Without Wake-on-LAN, "turn on" only works on a TV in network standby. A USB-Ethernet adapter never allows a wake-up: leave the box in standby rather than off.
  • An application the TV does not have is refused by the TV, which drops the connection on the way: hide it ("Applications to hide") or fix its link ("Custom applications").
  • "The TV refused the pairing": the TV revoked the certificate, pair it again.

Limits​

  • A TV fully powered off, without a stored MAC address, can only be turned on with its remote or through HDMI-CEC.
  • The foreground app is only recognized when it is part of the launcher; a custom app only when it replaces a catalog entry.
  • The widgets need Gladys 5.1: an older installation no longer receives the updates of the integration.

Konfigurationseinstellungen​

Diese Einstellungen fragt Android TV Remote in seinem Konfigurationsbildschirm in Gladys ab.

EinstellungTypPflichtfeldBeschreibung
Android TV / Google TV koppelnsectionNeinAlles, was du eingeben musst, steht in den zwei nummerierten Aktionen unten auf dieser Seite — dazwischen ist nichts zu speichern. Schalte den Fernseher ein, führe Schritt 1 und dann Schritt 2 aus und suche anschließend nach Geräten. Wiederhole das für jeden Fernseher, den du hinzufügen möchtest.
App-Starter aktivierenbooleanNeinFügt jedem Fernseher eine App-Auswahl hinzu (Netflix, YouTube, Prime Video, Disney+, Spotify, Plex, Twitch, Crunchyroll, YouTube Music, Apple TV, Arte, Molotov, myCANAL). Gilt für alle gekoppelten Fernseher beim nächsten Gerätescan.
Auszublendende AppsstringNeinApps der integrierten Liste, die aus der Auswahl entfernt werden sollen, durch Kommas getrennt — z. B. „Spotify, Arte“. Ein Fernseher verweigert den Start einer App, die nicht installiert ist. Gilt ab dem nächsten Gerätescan.
Eigene AppsstringNeinApps, die der Auswahl hinzugefügt werden, als Einträge „Name = Link“, durch Semikolons getrennt — z. B. „France TV = https://www.france.tv ; VLC = vlc://“. Der Link ist ein https-App-Link oder das Schema der App. Ein Eintrag mit dem Namen einer integrierten App ersetzt diese (um ihren Link zu korrigieren). Gilt ab dem nächsten Gerätescan.

So installierst du Android TV Remote in Gladys​

  1. Öffne in Gladys Integrationen: Android TV Remote erscheint im Katalog neben den nativen Integrationen, mit einem Community-Badge.
  2. Klicke auf Installieren. Gladys lädt das Docker-Image (ghcr.io/guim31/gladys-integration-android-tv-remote:1.5.0) herunter, startet es in einer vom Kern isolierten Sandbox und erzeugt die Oberfläche der Integration (Geräte, Erkennung und Konfiguration).
  3. Öffne den Bildschirm Konfiguration der Integration, fülle die Einstellungen aus und speichere.
  4. Du kannst sie auch direkt über die URL ihres Repositorys installieren: https://github.com/guim31/gladys-integration-android-tv-remote.

Android TV Remote benötigt Gladys >=5.1.0. Der Katalog in Gladys wird stündlich aktualisiert, eine neue Version ist also spätestens eine Stunde nach ihrer Veröffentlichung verfügbar.

Du nutzt Gladys noch nicht? Es ist kostenlos und Open Source: folge der Installationsanleitung, um loszulegen.

Über externe Integrationen​

Android TV Remote ist eine externe Integration: eine Community-Integration, die als Docker-Container verpackt und auf GitHub veröffentlicht wird. Gladys installiert sie mit einem Klick und führt sie in einer vom Kern isolierten Sandbox aus. Sie wird von guim31 veröffentlicht und gepflegt, nicht vom Gladys-Kernteam.

Abonniere den Newsletter von Gladys Assistant

Ein paar E-Mails im Monat zu neuen Releases und Neuigkeiten aus dem Projekt. Verschickt von Pierre-Gilles Leymarie, dem Gründer des Projekts. Jederzeit abbestellbar 🙂