Skip to content

Commit

Permalink
write hardcoded colorloop effect func w group api
Browse files Browse the repository at this point in the history
  • Loading branch information
insanj authored Oct 5, 2018
1 parent 911564b commit bae43c5
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions RockerObjects.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,21 @@ class RockerNetworker {
});
}

turnOnColorLoop(bridgeUsername) {
var colorLoopLocation = this.config.authLocation + "/api/" + bridgeUsername + "/groups/3/action";
var colorLoopBody = {"on":true,"hue": 25500,"effect":"colorloop"};
var colorLoopString = JSON.stringify(colorLoopBody);

$.ajax({
url: colorLoopLocation,
data: colorLoopString,
method: "PUT",
complete: function (data) {
rocker_log("Attempted to enable colorloop! " + data);
}
});
}

pressLinkButton(bridgeUsername) {
var linkButtonLocation = this.config.authLocation + "/api/" + bridgeUsername + "/config";
var linkButtonBody = {"linkbutton": true};
Expand Down

0 comments on commit bae43c5

Please sign in to comment.