Saltar al contenido principal

Integración domótica Twinkly, gratuita y de código abierto

Integración Twinkly para Gladys Assistant

Control your Twinkly smart LED lights over your local network.

info

La documentación de esta integración la escribe su autor y, por ahora, solo está disponible en inglés.

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.

Parámetros de configuración​

Estos son los parámetros que Twinkly te pide en su pantalla de configuración en Gladys.

ParámetroTipoObligatorioDescripción
Getting startedsectionNoSet 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 addressesstringNoIP 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 scanbooleanNoLook 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 intervalselectNoHow often Gladys reads each Twinkly, to follow changes made from the app.
When turned on, playselectNoWhat a Twinkly shows when Gladys turns it on.

Cómo instalar Twinkly en Gladys​

  1. En Gladys, abre Integraciones: Twinkly aparece en el catálogo junto a las integraciones nativas, con una insignia de comunidad.
  2. Haz clic en Instalar. Gladys descarga la imagen Docker (ghcr.io/prohand/gladys-twinkly:1.0.1), la ejecuta en un entorno aislado del núcleo y genera la interfaz de la integración (dispositivos, descubrimiento y configuración).
  3. Abre la pantalla de Configuración de la integración, rellena los parámetros y guarda.
  4. También puedes instalarla directamente desde la URL de su repositorio: https://github.com/prohand/gladys-twinkly.

Twinkly requiere Gladys >=5.1.0. El catálogo de Gladys se actualiza cada hora, así que una nueva versión está disponible como máximo una hora después de publicarse.

¿Todavía no usas Gladys? Es gratuito y de código abierto: sigue la guía de instalación para empezar.

Sobre las integraciones externas​

Twinkly es una integración externa: una integración comunitaria empaquetada como contenedor Docker y publicada en GitHub. Gladys la instala con un clic y la ejecuta en un entorno aislado del núcleo. La publica y mantiene prohand, no el equipo principal de Gladys.

Suscríbete a la newsletter de Gladys Assistant

Unos pocos correos al mes sobre nuevas versiones y novedades del proyecto. Enviados por Pierre-Gilles Leymarie, fundador del proyecto. Puedes darte de baja cuando quieras 🙂