New in firmware version 2.0.22.
Device sends messages with its states to a broker with MQTT. By default broker is set to mqtt.twinkly.com.
Firmware family "D" use HTTP and "G" use TLS.
Last topic levels are always client ID which are by default derived from MAC address of the device as uppercased hexadecimal digits.
Device publishes these messages to a broker.
Topic xled/status/ followed by client ID
- online
- ip - IP address. Added in firmware 2.1.0.
- ssid - SSID to which device is connected. Added in firmware 2.1.0.
- offline
Online (firmware 2.0.22):
{"status": "online"}
Online (since firmware 2.1.0):
{"status": "online", "ip": "192.168.4.1", "ssid": "home"}
Offline:
{"status": "offline"}
Device publishes these messages to a broker.
xled/appstatus/ followed by client ID
- off
- movie
- collision
- rainbow
- twinkle
- snake
Rainbow:
{"appstatus": "rainbow"}
Parameters published by a device to broker.
xled/params/ followed by client ID
- brightness
- (number), brightness value in percent
- filters
- (list), contains a string "brightness" if brightness is set.
{"brightness": 50, "filters": ["brightness"]}
Device listens to these messages.
xled/command/ followed by client ID
- changeeffect
- each message switches to next of default effects or movie. Same as pressing the button on the device.
- setmovie
- sets to uploaded movie effect
- setcollision
- sets default effect "collision"
- setrainbow
- sets default effect "rainbow"
- setsnake
- sets default effect "snake"
- settwinkle
- sets default effect "twinkle"
- setwaves
- sets default effect "waves"
- switchoff
- switches off the device
- switchon
- switches on the device
- setbrightnessdelta
- changes brightness by amount set by value. Parameter value is signed number.
- setbrightness
- changes brightness to value. Parameter value is a number between 0..255 but only up to 100 has a dimming effect.
Switch on:
{"command": "switchon"}
Lower brightness value by 20 percents:
{"command": "setbrightnessdelta", "value", -20}