Adapter to communicate with the Twinkly lights.
This adapter uses Sentry libraries to automatically report exceptions and code errors to the developers. For more details and for information how to disable the error reporting see Sentry-Plugin Documentation! Sentry reporting is used starting with js-controller 3.0.
The following Settings are available:
In the table you can add all the Twinkly lights you want to control.
Column | Description |
---|---|
Enabled |
Shall this connection be accessed |
Name |
Name of the connection in ioBroker |
IP Address |
IP-Address to the Twinkly Lights |
Mode On |
Which ledMode should be activated when state on is enabled.Color, Effect, Movie, Music Reactive, Playlist or last Mode |
The following additionals States are created per device when checked:
- Device Info
- MQTT
- Network Status
The following States are available:
State | Writable | Description |
---|---|---|
connected |
❌ | Device Connected |
details |
❌ | Device Details |
firmware |
❌ | Firmware Version |
ledBri |
✔️ | Brightness (deactivate control with -1) |
ledColor |
✔️ | Color of LEDs, HSV/RGB(W)/HEX (Color ) |
ledConfig |
✔️ | Configuration of LEDs |
ledEffect |
✔️ | Effects (Effect ) |
ledLayout |
✔️ | Layout of LEDs (disabled for further testing) |
ledMode |
✔️ | Mode: Color, Effect, Movie, Music Reactive, Playlist, Off, RealTime (not yet supported), Demo |
ledMovie |
✔️ | Active Movie, If multiple Movies are added in the Playlist feature then they can be selected here. (Movie ) |
ledPlaylist |
✔️ | Active Playlist Entry, Switch between Movies. (Playlist ) |
ledSat |
✔️ | Saturation 0-100 (deactivate control with -1) |
mqtt |
✔️ | MQTT-Connection |
name |
✔️ | Name |
network |
❌ | Network-Information |
on |
✔️ | On/Off Switch |
paused |
✔️ | Pause Connection to Twinkly so you can do changes in the App. Otherwise you might loose the connection while working in the App |
timer |
✔️ | Update the Timer |
Private API information by Pavol Babinčák
- The maximum length for the movie name is 15 characters
sendTo('twinkly.0', 'uploadMovie', {
connection : 'Fenster',
frames : [
[{"r":18,"g":105,"b":58},{"r":18,"g":105,"b":58}, ...],
[{"r":18,"g":105,"b":58},{"r":18,"g":105,"b":58}, ...],
...
],
delay : 250
});
Upload a predefined movie.
- 0: Twinkle Blue-White
- 1: Twinkle Christmas-Green-Red
sendTo('twinkly.0', 'uploadTemplateMovie', {
connection : 'Fenster',
template : 1
});
sendTo('twinkly.0', 'uploadTwinkleMovie', {
connection : 'Fenster',
baseColor : '#00873f', // or {r: 0, g: 135, b: 62}
secondColor : '#c30F15' // or {r: 195, g: 15, b: 22}
});
Returns a full frame in one color.
By sending the colors in the property colors
you get an array of frames returned.
sendTo('twinkly.0', 'generateFrame', {
connection : 'Fenster',
color : '#12693a' // or {"r": 18,"g":105,"b":58}
});
response => {
// [{"r":18,"g":105,"b":58},{"r":18,"g":105,"b":58}, ...]
...
}
sendTo('twinkly.0', 'generateFrame', {
connection : 'Fenster',
colors : ['#12693a', ...] // or [{"r":18,"g":105,"b":58}, ...]
});
response => {
// [[{"r":18,"g":105,"b":58},{"r":18,"g":105,"b":58}, ...], ..]
...
}
- Update dependencies
- Add formatting to some states (hex-values -> uppercase, uptime in hours)
- Handle Sentry message (IOBROKER-TWINKLY-8P)
- Update dependencies
- Update dependencies
- Slave can write ledBri and ledSat
- Extend Sentry logging for details.groups when "deprecated"
- Cancel active pause not working after startup if active beforehand
- Merge libraries request and twinkly
- Optimized Code in requests
- Updated Sentry logging for better viewability
- Add sendTo message
uploadTwinkleMovie
to upload a twinkle movie with own colors - Update Release Integration in Github Actions and Sentry
- Now detects if Twinkly is in a group (firmware >= 2.8.3). If so, the group can only be controlled by the master, the states from the slave are read-only.
- Add
musicreactive
Mode - Add Ukrainian translation
- Rework how objects are created, objects are now created after first connect after startup and updated after a firmware update
MIT License
Copyright (c) 2024 patrickbs96 patrickbsimon96@gmail.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.