Zum Hauptinhalt springen

Twinkly Smart-Home-Integration, kostenlos und Open Source

Twinkly-Integration für Gladys Assistant

Control your Twinkly smart LED lights over your local network.

Info

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

This integration connects Gladys to your Twinkly smart LED lights (strings, curtains, trees, Squares, Flex, Dots…). Gladys drives them locally, on your own network: no account, no cloud.

Before you start​

  • Set up each Twinkly with the Twinkly app first, and connect it to your Wi-Fi.
  • It must be on the same network as Gladys.
  • Recommended: give it a fixed IP (DHCP reservation in your router). If its IP changes, the integration finds it again, but more slowly.

Twinkly has no public cloud API: everything goes through the local network (local transport).

Configuration​

FieldWhat it does
IP addressesIP addresses of your Twinkly devices, comma-separated. Optional when the scan finds them.
Network scanLooks for Twinkly devices on the network (UDP broadcast, port 5555). On by default.
Refresh intervalHow often each Twinkly is read: 10 s, 15 s, 30 s or 1 min.
When turned on, playWhat a Twinkly shows when Gladys turns it on (default: what it played last).

Test the connection looks for the Twinkly devices and lists what answers: name, address, LED count, firmware version, current mode.

Identify a Twinkly plays its demo for 5 seconds, then puts it back as it was: handy to tell which one is which.

The network scan finds nothing?​

The integration container does not see network broadcasts: Gladys sends the scan for it. Some networks block it (separate VLANs, Wi-Fi client isolation). Then just type the IP addresses.

Adding the devices​

In Integrations → Twinkly → Discovery, run a scan and add each Twinkly. Each one becomes a light with:

FeatureWhat it does
On/OffOff (mode off) or back on (see "When turned on, play").
Brightness0 to 100 %. Raising the brightness of a Twinkly that is off turns it on.
ColorSolid color (firmware 2.7.1 or later).
SceneThe movies uploaded from the app, the playlist and the built-in effects.

The device keeps its identity (based on its MAC address): renaming it in the app or a new IP never creates a duplicate.

Uploaded a new movie from the app? Run a scan again so it shows up in the Scene list.

Scenes (Gladys 5.1 and later)​

Triggers​

TriggerWhenVariables
A Twinkly changed modeThe mode changed outside Gladys: the app, its button, its own timer.device_name, mode, previous_mode
A Twinkly is unreachableIt stopped answering (unplugged, Wi-Fi lost…).device_name
A Twinkly answers againIt answers again.device_name

A change Gladys ordered never fires "changed mode": a scene cannot loop.

Changes are seen at each read: with a 30 s interval, a scene reacts within 30 s.

Actions​

ActionParametersOutput
Play a Twinkly movieTwinkly, movie name (or number: 1 = first)movie (name played)
Play a Twinkly effectTwinkly, effect number (1 = first)effect
Change a Twinkly modeTwinkly, mode: on, off, movie, effect, playlist, solid color, demomode (applied)

To set color and brightness in a scene, use the standard Gladys action "Control a device".

Dashboard (Gladys 5.1 and later)​

The Twinkly widget has two views, picked in its settings:

  • No Twinkly chosen: one row per device (what it plays and how bright, or "Unreachable") and two buttons: All on and All off.

  • One Twinkly chosen: its live brightness, its state, the scene playing, its color, IP address, LED count and firmware, and a set of buttons (the Buttons setting):

    ButtonsWhat they do
    Scenes (default)Turn on/off, previous scene, next scene, Identify
    BrightnessTurn on/off, −10 %, +10 %, Max
    ModesTurn on/off and up to 3 modes: movie, playlist, solid color, effect
    ColorsWhite, red, green, blue (solid color, firmware 2.7.1+)

    A card holds 4 buttons at most: add the widget several times to get several sets. Scenes loop in the list order (movies, playlist, effects). Brightness does not go below 10 %: to switch off, use Turn off.

Troubleshooting​

  • "No Twinkly found yet": check that the Twinkly answers in the app, then type its IP in IP addresses.
  • A Twinkly turns "Unreachable": it is unplugged, off the Wi-Fi, or its IP changed. The integration runs a new scan (at most once every 5 minutes). A fixed IP avoids the problem.
  • The Twinkly app and Gladys at the same time: that works. When the app takes over, Gladys reconnects by itself.
  • The integration logs (the Gladys Supervision page) say what was found and what does not answer.

Konfigurationseinstellungen​

Diese Einstellungen fragt Twinkly in seinem Konfigurationsbildschirm in Gladys ab.

EinstellungTypPflichtfeldBeschreibung
Getting startedsectionNeinSet up your Twinkly in the Twinkly app first, on the same network as Gladys. Gladys then drives it locally, without any account or cloud: it finds it by itself (network scan), or you type its IP address below.
IP addressesstringNeinIP addresses of your Twinkly devices, separated by commas. Optional when the network scan finds them; give them a fixed IP (DHCP reservation) in your router.
Network scanbooleanNeinLook for Twinkly devices on the network (UDP broadcast on port 5555, sent by Gladys). Turn it off if your network blocks broadcasts and you typed the IP addresses.
Refresh intervalselectNeinHow often Gladys reads each Twinkly, to follow changes made from the app.
When turned on, playselectNeinWhat a Twinkly shows when Gladys turns it on.

So installierst du Twinkly in Gladys​

  1. Öffne in Gladys Integrationen: Twinkly erscheint im Katalog neben den nativen Integrationen, mit einem Community-Badge.
  2. Klicke auf Installieren. Gladys lädt das Docker-Image (ghcr.io/prohand/gladys-twinkly:1.0.1) 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/prohand/gladys-twinkly.

Twinkly 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​

Twinkly 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 prohand 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 🙂