Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Presets do not work properly if there is a playlist setup #5

Open
osxster opened this issue Dec 4, 2021 · 3 comments
Open

Presets do not work properly if there is a playlist setup #5

osxster opened this issue Dec 4, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@osxster
Copy link

osxster commented Dec 4, 2021

With the changes made in previous issues, you can now define the number of presets. However WLED has a feature called playlist which actually shows up as a preset, but it allows you to toggle between different presets. For example, if you have 2 presets, and create a playlist, number 3 in your list of presets will be a playlist. This playlist could alternate between presets 1-2 and have them play for 5 seconds and alternate to the next preset.

The issue here is I defined 3 presets in wled preset and 3 presets show up in HomeKit. I created 2 presets and I created a playlist. My playlist (which shows up in WLED as preset 3) alternates between preset 1 & 2 in WLED. If I select Preset 1 in wled-preset from HomeKit, Preset 1 executes. If I select Preset 2 in wled-preset from HomeKit, Preset 2 executes. If I select Preset 3 in wled-preset, my playlist executes. However once I execute Preset 3 in wled-preset, my wled lights will never stop playing that preset. Selecting Preset 1 or Preset 2 in wled-preset does not work. The Power button does work, but when I power the lights back on, they continue to run the playlist.

I am running WLED 0.13.0-b5 if that helps.

@osxster osxster added the bug Something isn't working label Dec 4, 2021
@agoodshort
Copy link
Owner

Investigated a bit, and it does not seem that the XML response from WLED contains any details regarding the preset being a playlist or not.

I need to reproduce this and see the behaviour. Based on the behaviour of the plugin, it might be possible from the setActiveIdentifier to recognize if a preset is a playlist or not based on a pattern.

@osxster
Copy link
Author

osxster commented Dec 22, 2021

Is there any opportunity to treat the Playlist like a Preset (especially since it is in the same menu) and allow Wled-preset to select both a Preset and a Playlist? Been setting up Christmas lights and the playlists allow your spectators watch through various animations. Would be nice to automate this into HomeKit so you can turn all these on when it gets dark and shut off after a certain time. It will probably work because of the current bug as long as you have it last selected, but it would be nice to give that control into HomeKit through the plugin.

@Cryptophunk
Copy link

Cryptophunk commented Feb 21, 2022

I think this should shed some light on how to approach this. Here is the link to the JSON API call for playlists. I've included a sample response below. There's also this discussion on WLED github that shows how to get presets and use the api to call one.

[WLED_IP]/presets.json
[WLED_IP]/win&PL=<playlist_preset_id>

{
  "playlist": {
    "ps": [26, 20, 18, 20],
    "dur": [30, 20, 10, 50],
    "transition": 0,
    "repeat": 10,
    "end": 21
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants