{"id":13790081,"url":"https://github.com/scrool/xled","last_synced_at":"2025-05-12T07:31:27.707Z","repository":{"id":27907953,"uuid":"114569346","full_name":"scrool/xled","owner":"scrool","description":"🎄Unofficial control for Twinkly - Smart Decoration LED lights.","archived":false,"fork":false,"pushed_at":"2023-11-02T21:24:03.000Z","size":238,"stargazers_count":225,"open_issues_count":18,"forks_count":47,"subscribers_count":17,"default_branch":"develop","last_synced_at":"2025-04-25T11:05:49.963Z","etag":null,"topics":["internet-of-things","iot","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scrool.png","metadata":{"files":{"readme":"README.rst","changelog":"HISTORY.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"docs/supported_devices.rst","governance":null,"roadmap":null,"authors":"AUTHORS.rst","dei":null}},"created_at":"2017-12-17T21:18:19.000Z","updated_at":"2025-04-01T20:45:21.000Z","dependencies_parsed_at":"2024-04-14T01:49:39.415Z","dependency_job_id":"7f70b552-85da-49bc-b324-c1463ac2edbb","html_url":"https://github.com/scrool/xled","commit_stats":{"total_commits":218,"total_committers":9,"mean_commits":24.22222222222222,"dds":"0.18807339449541283","last_synced_commit":"febce9229e89331eb178e8727aa64779959280f8"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scrool%2Fxled","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scrool%2Fxled/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scrool%2Fxled/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scrool%2Fxled/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scrool","download_url":"https://codeload.github.com/scrool/xled/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253695145,"owners_count":21948820,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["internet-of-things","iot","python"],"created_at":"2024-08-03T22:00:36.775Z","updated_at":"2025-05-12T07:31:27.223Z","avatar_url":"https://github.com/scrool.png","language":"Python","funding_links":[],"categories":["Gadgets"],"sub_categories":[],"readme":"==================================================================\nXLED - unofficial control of Twinkly - Smart Decoration LED lights\n==================================================================\n\nXLED is a python library and command line interface (CLI) to control\n`Twinkly`_ - Smart Decoration LED lights for Christmas.\n\nOfficial materials says:\n\n    Twinkly is a LED light device that you can control via smartphone. It\n    allows you to play with colouful and animated effects, or create new ones.\n    Decoration lights, not suitable for household illumination.\n\nSince its `Kickstarter project`_ in 2016 many products were introduced with\nvarying properties and features. Most notably products released since September\n2019 are identified as Generation II. Older products are since then referred as\nGeneration I.\n\nLibrary and CLI are free software available under MIT license.\n\n\nInstallation\n------------\n\nBoth library and CLI tool are supported on Linux, primarily Fedora.\n\n#. First make sure that you have `pip installed`_. E.g. for Fedora:\n\n   ::\n\n       $ sudo dnf install python3-pip python3-wheel\n\n#. You might want to `create and activate a virtual environment`_. E.g.:\n\n   ::\n\n       $ mkdir -p ~/.virtualenvs\n       $ python3 -m venv ~/.virtualenvs/xled\n       $ source ~/.virtualenvs/xled/bin/activate\n\n#. Install `xled from PyPI`_:\n\n   ::\n\n       $ python3 -m pip install --upgrade xled\n\nUsage\n-----\n\nIf you have installed the project into virtual environment, activate it first. E.g.\n\n.. code-block::\n\n    $ source ~/.virtualenvs/xled/bin/activate\n\nUse of the library:\n\n.. code-block:: python\n\n    \u003e\u003e\u003e import xled\n    \u003e\u003e\u003e discovered_device = xled.discover.discover()\n    \u003e\u003e\u003e discovered_device.id\n    'Twinkly_33AAFF'\n    \u003e\u003e\u003e control = xled.ControlInterface(discovered_device.ip_address, discovered_device.hw_address)\n    \u003e\u003e\u003e control.set_mode('movie')\n    \u003cApplicationResponse [1000]\u003e\n    \u003e\u003e\u003e control.get_mode()['mode']\n    'movie'\n    \u003e\u003e\u003e control.get_device_info()['number_of_led']\n    210\n\n`Documentation for the library can be found online`_.\n\nUse of the CLI:\n\n.. code-block:: console\n\n    $ xled on\n    Looking for any device...\n    Working on device: Twinkly_33AAFF\n    Turned on.\n\nFor more commands and options see `xled --help`.\n\n\nWhy?\n----\n\nMy first Twinkly was 105 LEDs starter light set. That was the latest available\nmodel in 2017: TW105S-EU. As of December 2017 there are only two ways to\ncontrol lights: mobile app on Android or iOS or hardware button on the cord.\n\nAndroid application didn't work as advertised on my Xiaomi Redmi 3S phone. On\nfirst start it connected and disconnected in very fast pace (like every 1-2\nseconds) to the hardware. I wasn't able to control anything at all. Later I\nwanted to connect it to my local WiFi network. But popup dialog that shouldn't\nhave appear never did so.\n\nPublic API was `promised around Christmas 2016`_ for next season. Later update\nfrom October 2016 it seems `API won't be available any time soon`_:\n\n    API for external control are on our dev check list, we definitely need some\n    feedback from the community to understand which could be a proper core set\n    to start with.\n\nIt turned out that application uses HTTP to control lights. I ended up with\ncapturing network traffic and `documented this private API`_. In the end I'm\nable to configure the device pretty easilly.\n\nAs of 2020 Twinkly devices can be controlled by Amazon Alexa and Google\nAssistant as well. Mobile application now requires an account to operate lights\neven locally. No sign of public API for local devices though. Therefore with my\nsecond device - Twinkly 210 RGB+W Wall I keep improving this library and CLI\ndocumentation to be able to operate my devices locally and not rely on\navailability of manufacturer's servers.\n\nRelated projects\n----------------\n\nUnofficial documentation of private protocol and API is `available online`_.\n\nFor other projects that might be more suitable for your needs see `section client implementations in xled-docs`_.\n\nCredits\n---------\n\nThis package was created with Cookiecutter_ and the\n`audreyr/cookiecutter-pypackage`_ project template.\n\n.. _`Twinkly`: https://www.twinkly.com/\n.. _`Kickstarter project`: https://www.kickstarter.com/projects/twinkly/twinkly-smart-decoration-for-your-christmas\n.. _`available online`: https://xled-docs.readthedocs.io\n.. _`documented this private API`: https://xled-docs.readthedocs.io\n.. _`promised around Christmas 2016`: https://www.kickstarter.com/projects/twinkly/twinkly-smart-decoration-for-your-christmas/comments?cursor=15497325#comment-15497324\n.. _`API won't be available any time soon`: https://www.kickstarter.com/projects/twinkly/twinkly-smart-decoration-for-your-christmas/comments?cursor=14619713#comment-14619712\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`documented this private API`: https://xled-docs.readthedocs.io\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n.. _`pip installed`: https://packaging.python.org/guides/installing-using-linux-tools/\n.. _`create and activate a virtual environment`: https://packaging.python.org/tutorials/installing-packages/#creating-virtual-environments\n.. _`xled from PyPI`: https://pypi.org/project/xled/\n.. _`Documentation for the library can be found online`: https://xled.readthedocs.io\n.. _`section client implementations in xled-docs`: https://xled-docs.readthedocs.io/en/latest/readme.html#client-implementations\n\n.. image:: https://badges.gitter.im/xled-community/chat.svg\n   :alt: Join the chat at https://gitter.im/xled-community/chat\n   :target: https://gitter.im/xled-community/chat?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscrool%2Fxled","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscrool%2Fxled","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscrool%2Fxled/lists"}