Skip to main content

Twinkly smart home integration, free and open source

Twinkly integration for Gladys Assistant

Control your Twinkly smart LED lights over your local network.

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.

Configuration settings​

These are the settings Twinkly asks for in its configuration screen in Gladys.

SettingTypeRequiredDescription
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.

How to install Twinkly in Gladys​

  1. In Gladys, open Integrations: Twinkly appears in the catalog, next to the native integrations, with a community badge.
  2. Click Install. Gladys pulls the Docker image (ghcr.io/prohand/gladys-twinkly:1.0.1), starts it in a sandbox isolated from the core, and generates the integration's interface (devices, discovery and configuration).
  3. Open the Configuration screen of the integration, fill in the settings, and save.
  4. You can also install it directly from its repository URL: https://github.com/prohand/gladys-twinkly.

Twinkly requires Gladys >=5.1.0. The catalog inside Gladys refreshes every hour, so a new version becomes available at most one hour after its release.

Not running Gladys yet? It is free and open source: follow the installation guide to get started.

About external integrations​

Twinkly is an external integration: a community integration packaged as a Docker container and published on GitHub, that Gladys installs in one click and runs in a sandbox isolated from its core. It is published and maintained by prohand, not by the Gladys core team.

Subscribe to the Gladys Assistant newsletter

A few emails per month about new releases and project news. Sent by Pierre-Gilles Leymarie, founder of the project. Unsubscribe anytime 🙂