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

Introduce Playlists / JSON Post #219

Open
ScumbagSteve opened this issue Jun 1, 2021 · 2 comments
Open

Introduce Playlists / JSON Post #219

ScumbagSteve opened this issue Jun 1, 2021 · 2 comments

Comments

@ScumbagSteve
Copy link

WLED supports playlists, that are quite useful.
I have not found a way to control these over the ioBroker.wled adapter.

It would be great if we could get either native support for this feature, or a possibility to transmit json to the wled device via the adapter.

@DutchmanNL
Copy link
Contributor

Hmm look like this Feature is only available nu http api call

Sample playlist API call:

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

We coul implement it as State handling a JSON but for most User That will be to complex to use

@ScumbagSteve
Copy link
Author

I found a good way to send json via blockly.
Use "execute javascript funktion" in bluckly and then paste something like this:

var request = require('request');
var options = {
url: 'http://192.168.178.26/json/state',
method: 'POST',
json: {
"on": true,
"bri": 16,
"transition": 30,
"ps": 4,
}
};

request(options, function (error, response, body) {
if (!error && response.statusCode == 200) {
console.log(body.id) // Print the shortened url.
}
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants