Zum Hauptinhalt springen

TP-Link Kasa Smart-Home-Integration, kostenlos und Open Source

TP-Link Kasa-Integration für Gladys Assistant

Control your TP-Link Kasa smart plugs, switches and bulbs over your local network.

Info

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

Control your TP-Link Kasa smart plugs, switches and bulbs from Gladys, over your local network. The integration runs in its own container and talks to your devices using the classic Kasa LAN protocol.

Supported devices​

DeviceFeature
Plugs and switchesOn/Off (switch)
BulbsOn/Off (light)

Other TP-Link types are detected during a scan and reported in the logs, but they are not published because they have no controllable feature yet.

Multi-outlet strips are not supported. Kasa power strips (HS300, HS107, KP303, KP400) are detected and deliberately skipped: their outlets are controlled individually, which this integration cannot do yet. Publishing them would offer a single switch that turns the whole strip off at once.

Local-only, legacy protocol. This integration speaks the classic Kasa LAN protocol. Newer Kasa firmware that only exposes the encrypted KLAP protocol is not supported.

How discovery works​

Kasa devices only answer an active discovery probe, and the integration runs in a sandboxed container that cannot broadcast onto your LAN. So the scan is mediated by Gladys: the integration forges the encrypted Kasa discovery request, the Gladys core (which sits on your home network) broadcasts it, and relays the devices' replies back. You do not enter any IP address — the scan finds your devices, and the IP each one answered from is remembered to control it afterwards.

Give your Kasa devices a DHCP reservation on your router so their IP address stays stable; if it changes, a new scan picks up the new address automatically.

Configuration​

  1. Open the Configuration tab of the integration.

  2. Choose a Refresh interval — how often each device is polled to refresh its state (default: every minute). Save.

    This interval is stored on each device when it is discovered. Changing it later does not update the devices you already created: run a new scan to apply the new value.

  3. Open the Discovery tab and click scan: your Kasa devices appear.

  4. Click create on the ones you want. They land in the Devices tab with an On/Off control.

Run a scan again anytime you add a new device.

Troubleshooting​

  • A device does not appear on scan. Make sure it is powered on and on the same network/subnet as your Gladys host, then scan again. Only classic-protocol Kasa devices answer (see below).
  • A device appears but never changes state. Its firmware may only speak the newer KLAP protocol, which is not supported.
  • "Nothing happens" when I click scan. Gladys allows one scan every 10 seconds: wait a moment before scanning again. The error is shown in the integration banner.
  • A device is flagged "unreachable". It is off, unplugged, or its IP address changed. Check it is powered on, then run a new scan to pick up its new address.
  • "Another device now answers at this address". Your router reassigned that device's IP address to something else. Run a new scan: the integration deliberately refuses to control a device whose identity it could not verify, rather than acting on the wrong one.
  • Need more detail? The integration logs everything it does. Check the integration logs from the Gladys UI (or docker logs on the host) with LOG_LEVEL=debug for the full detail.

Konfigurationseinstellungen​

Diese Einstellungen fragt TP-Link Kasa in seinem Konfigurationsbildschirm in Gladys ab.

EinstellungTypPflichtfeldBeschreibung
Refresh intervalselectNeinHow often each device is polled to refresh its state.
  1. Öffne in Gladys Integrationen: TP-Link Kasa erscheint im Katalog neben den nativen Integrationen, mit einem Community-Badge.
  2. Klicke auf Installieren. Gladys lädt das Docker-Image (ghcr.io/cicoub13/gladys-tp-link:1.3.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/cicoub13/gladys-tp-link.

TP-Link Kasa benötigt Gladys >=4.84.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​

TP-Link Kasa 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 cicoub13 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 🙂