mirror of
https://github.com/bwssytems/ha-bridge.git
synced 2025-12-18 00:10:20 +00:00
Merge pull request #625 from ahertz/logitech_pop
Added error message for scene invocation, to allow Logitech Pop to work.
This commit is contained in:
@@ -118,6 +118,17 @@ public class HueMulator {
|
|||||||
log.debug("group add requested from " + request.ip() + " user " + request.params(":userid") + " with body " + request.body());
|
log.debug("group add requested from " + request.ip() + " user " + request.params(":userid") + " with body " + request.body());
|
||||||
return "[{\"success\":{\"id\":\"1\"}}]";
|
return "[{\"success\":{\"id\":\"1\"}}]";
|
||||||
});
|
});
|
||||||
|
// http://ip_address:port/api/:userid/groups/<groupid>/action
|
||||||
|
// Dummy handler
|
||||||
|
// Error forces Logitech Pop to fall back to individual light control
|
||||||
|
// instead of scene-based control.
|
||||||
|
put(HUE_CONTEXT + "/:userid/groups/:groupid/action", "application/json", (request, response) -> {
|
||||||
|
response.header("Access-Control-Allow-Origin", request.headers("Origin"));
|
||||||
|
response.type("application/json");
|
||||||
|
response.status(HttpStatus.SC_OK);
|
||||||
|
log.debug("put to groups API from " + request.ip() + " user " + request.params(":userid") + " with body " + request.body());
|
||||||
|
return "[{\"error\":{\"address\": \"/groups/0/action/scene\", \"type\":7, \"description\": \"invalid value, dummy for parameter, scene\"}}]";
|
||||||
|
});
|
||||||
// http://ip_address:port/api/{userId}/scenes returns json objects of
|
// http://ip_address:port/api/{userId}/scenes returns json objects of
|
||||||
// all scenes configured
|
// all scenes configured
|
||||||
get(HUE_CONTEXT + "/:userid/scenes", "application/json", (request, response) -> {
|
get(HUE_CONTEXT + "/:userid/scenes", "application/json", (request, response) -> {
|
||||||
|
|||||||
Reference in New Issue
Block a user