Open Mr-Groch opened 2 years ago
twinkly documentation twinkly source (message by IssueLinks)
Hey there @dr1rrb, @robbie1221, mind taking a look at this issue as it has been labeled with an integration (twinkly
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
If you get a message that the issue is stale and reply to that, it wonβt be closed automatically. This saves the trouble of reopening an issue every time.
Anyway this is not a simple fix and my Twinkly is in a box called Christmas decoration, so I wonβt be able to do something before December.
Same here
I created my own plugin for homeseer back in the days, and it depends on the version v1 or v2 twinklys. The use of the on command can be effect, movie and sound if i recall correctly
in addition the integration now pols and upon polling the app is disconnected due to api limitations on login. This causes the mapping and sometimes uploading of new effects to twinklys to fail. This could be solved by a pause polling function or something?
if needed i can provide my dirty homeseer vbscript ;)
Do you happen to have that script @bartbakels
just pulled out my tree
@ntindle
here it is... dont mind the shitty programming but it worked always as a charm :) Twinkly.zip
Would it be possible to make something similar in Home Assistant? Would be awesome if the twinklys would just start on the programmed playlist
Itβs very possible, would require someone to build it. If you are competent with python you could contribute
Unfortunately i am very incompetent with all programming... If i had any skill at all i would be happy to contribute!
It looks like ttls was recently updated to fix this issue https://github.com/jschlyter/ttls/pull/16
It looks like ttls was recently updated to fix this issue jschlyter/ttls#16
How do you use this?
The twinkly component was updated to pull the latest ttls so that's a good start. I installed it and it lets you select any of your saved effects which is really nice. I didn't see a way to do anything with playlists, which is likely coming, but in the meantime you could do this:
if not self._is_on:
await self._client.set_mode("playlist")
self._client.default_mode = "playlist"
await self._client.turn_on()
You are adding the 2 middle lines there. This will make your lights play the playlist whenever they turn on. If you want a color or effect, you can pick it in the gui and it will stay what you chose. To get back to the playlist mode, turn the lights off, then on again. This is certainly not the best way to do this, but I think it will get you what you want until someone who knows what they are doing (not me) adds a playlist mode to the home assistant component.
I created a PR that will add "playlist" to the list of effects. If you select that "effect" it will play the playlist. I don't know if it's an ideal way to handle this or not, but it works. I did not include the edits above that set playlist as the default mode when the lights are turned on.
I created a PR that will add "playlist" to the list of effects. If you select that "effect" it will play the playlist. I don't know if it's an ideal way to handle this or not, but it works. I did not include the edits above that set playlist as the default mode when the lights are turned on.
It really seems you know what you are doing ;)
I have tried your nice 4 steps with creating the twinkly directory and put all the files in there. I also added "the code" you mentioned to light.py but unfortunately whitout any luck. I am not even sure i have done correctly - niether am i sure ive added the version string to the manifest.json file correctly. This one i have just started your file with the suggested They look something like this:
manifest.json:
"version": "1.0.0", )
<!DOCTYPE html>
**light.py (from line 218 to 226)**I have tried your nice 4 steps with creating the twinkly directory and put all the files in there. I also added "the code" you mentioned to light.py but unfortunately whitout any luck. I am not even sure i have done correctly - niether am i sure ive added the version string to the manifest.json file correctly. This one i have just started your file with the suggested They look something like this:
manifest.json:
"version": "1.0.0", )
light.py (from line 218 to 226)
if not self._is_on: await self._client.set_mode("playlist") self._client.default_mode = "playlist" await self._client.turn_on()
Get rid of the right parenthesis in manifest.json. And I probably should have included step 5 of restart home assistant. That's probably all you need.
Edit: just to be clear, here's what it could look like:
{
"domain": "twinkly",
"name": "Twinkly",
"documentation": "https://www.home-assistant.io/integrations/twinkly",
"requirements": ["ttls==1.5.1"],
"codeowners": ["@dr1rrb", "@Robbie1221"],
"version": "1.0.0",
"config_flow": true,
"dhcp": [{ "hostname": "twinkly_*" }],
"iot_class": "local_polling",
"loggers": ["ttls"]
}
You have been very kind! Thanks for your help - will defintely try this!
Just to be sure; i need to add everything from your last edit to manifest.json file right?
@Johndolk when you edit the file I think you'll see you just have an errant ) on the version line that you can delete. What I posted is my entire manifest.json file. After that, restart home assistant. After doing that, your twinkly integration should have a little box on it showing that it's using the custom component
This! It worked like a charm - once i did it right ;)
Thanks so much for your help!
This! It worked like a charm - once i did it right ;)
Thanks so much for your help!
+1. Last year I had to kill the integration from HA and use Alexa instead (yuk) for automations involving our Twinkly tree. Glad to have finally found a solution, albeit temporary. Can't wait to see the official/supported integration updated with this fix!
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment π This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
There is improvement in latest Twinkly integration, but playlist mode is still not supported and it is turned off when changing state from HA
Is the playlist now listed as an effect with the latest official twinkly integration or do I have to add it as above in the custom folder with alterations?
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment π This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
Playlist mode is still not supported and it is turned off when changing state from HA
I think this is fixed in https://github.com/home-assistant/core/pull/83460 which was closed last year. I am currentli in the process of refactoring a bunch of old PRs to make them smaller and more focused and hopefully get them merged.
I know it'll never get merged, but https://github.com/home-assistant/core/pull/83023 fixed this issue as well. I'm running that until an official fix for this issue is merged.
I think this is fixed in #83460 which was closed last year. I am currentli in the process of refactoring a bunch of old PRs to make them smaller and more focused and hopefully get them merged.
It look like it is not this case. That PR introduces support for effects from Twinkly in movie
mode. But playlist
is seperate mode.
Yeah, sorry. I mixed them up. I am currently refactoring a lot of these old PRs so hopefully this will be fixed in a little while.
Bump
Not going to expect a solution this year either, as 2023.12 is already released. But maybe we can hope for a christmas miracle next year.
Just wondering if I can simulate a list with a script calling each of the effects that are stored
The twinkly component was updated to pull the latest ttls so that's a good start. I installed it and it lets you select any of your saved effects which is really nice. I didn't see a way to do anything with playlists, which is likely coming, but in the meantime you could do this:
1. Grab all of the files from https://github.com/home-assistant/core/tree/dev/homeassistant/components/twinkly 2. put them in /config/custom_components/twinkly (you will need to create the twinkly directory) 3. edit the manifest.json file to add a version string (custom components won't load without one, you can use something like "version": "1.0.0", ) 4. edit light.py around line 219 to look like this
if not self._is_on: await self._client.set_mode("playlist") self._client.default_mode = "playlist" await self._client.turn_on()
You are adding the 2 middle lines there. This will make your lights play the playlist whenever they turn on. If you want a color or effect, you can pick it in the gui and it will stay what you chose. To get back to the playlist mode, turn the lights off, then on again. This is certainly not the best way to do this, but I think it will get you what you want until someone who knows what they are doing (not me) adds a playlist mode to the home assistant component.
Its a shame because this is not working for me I did exactly as you said but I got an error in my logs
2023-12-13 17:54:33.433 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform twinkly.light: Platform not found (cannot import name 'DeviceInfo' from 'homeassistant.helpers.device_registry' (/home/rob/homeassistant/lib/python3.10/site-packages/homeassistant/helpers/device_registry.py)).
2023-12-13 17:57:48.840 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry LightTree for light Traceback (most recent call last): File "/home/rob/homeassistant/lib/python3.10/site-packages/homeassistant/config_entries.py", line 546, in async_unload result = await component.async_unload_entry(hass, self) File "/home/rob/homeassistant/lib/python3.10/site-packages/homeassistant/components/light/init.py", line 636, in async_unload_entry return await component.async_unload_entry(entry) File "/home/rob/homeassistant/lib/python3.10/site-packages/homeassistant/helpers/entity_component.py", line 202, in async_unload_entry raise ValueError("Config entry was never loaded!") ValueError: Config entry was never loaded!
@dnikles / @Olen : here we are 1 year on. Its cold outside and my kids are waiting for santa to come down the chimmney
Oh and your PR was closed π’ https://github.com/home-assistant/core/pull/83023
Any chance we can revive this? and push for Xmas 2024 π€£
@dnikles / @Olen : here we are 1 year on. Its cold outside and my kids are waiting for santa to come down the chimmney
Oh and your PR was closed π’ #83023
Any chance we can revive this? and push for Xmas 2024 π€£
The PR will never get merged, but it still works perfectly for me. Go look at what's in that PR and it's very little for you to change manually and apply https://github.com/home-assistant/core/pull/83023/files
@dnikles : thanks - I found the issue this commit broke the approach https://github.com/home-assistant/core/commit/045c3279280e542ff1f082af166ab8949dd11a17#diff-6437875f7cb99363435e65f97d8609e33ec1dbeb8cd521eb4b9804d9b4fd7550 (which is after your PR) - its working now
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment π This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
Nope - issue still exists on newest home assistant...
Lol held out hope that this was fixed as the integration detected my twinkles.... Sadly no.... Is there a work around to turn them on with HA then turn the playlist on as an effect?
For workaround, you can copy the twinkly integration from above PR and install it as a custom component.
@matejdro files from here or somewhere else? https://github.com/home-assistant/core/tree/dev/homeassistant/components/twinkly I dont think thats the right place it doesnt include the changes....sorry for my github ignorance
Folder is right, but the author is not. This is just regular HA version.
You have to us @dnikles version: https://github.com/dnikles/core/tree/twinkly_playlist/homeassistant/components/twinkly
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment π This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
Not fixed @bot ;)
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment π This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
Not fixed.
@frenck According to PullRequest #83023 you have some insight in this. Would you like to be Santa Claus π this year and give us a great present and fix this?
(I wanted to do this for 2 years now: if some rings the door - especially Amazon and DHL Drivers - play some fency, colorful lightning effects and then go back to playlist.)
The problem
When I turn off / on Twinkly LEDs using HA intergration - it will disable Twinkly playlist playing.
What version of Home Assistant Core has the issue?
core-2022.6.4
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Container
Integration causing the issue
Twinkly
Link to integration documentation on our website
https://www.home-assistant.io/integrations/twinkly/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
Duplicate of issue #65816, #68699 and #71302 becouse it was closed but not resolved...