Amazon Echo support for groups

So the groups are now somewhat usable with an Amazon Echo. This is a bit of a workaround:
The group gets presented to the Echo as another fake light. For that to work you must manually enable this feature for every room by adding "exposeAsLight":"192.168.0.30" to the room in group.db (restart ha-bridge afterwards). Use the ip-address of your echo. No need to do that for other devices, because these can handle rooms directly. The fake light for the group will only be shown/usable to the specified ip-addresses.
This commit is contained in:
Florian Förderreuther
2017-07-30 16:28:01 +02:00
parent cb9312f6c3
commit 95c342b548
6 changed files with 123 additions and 17 deletions

View File

@@ -34,15 +34,16 @@ public class GroupDescriptor{
@SerializedName("comments")
@Expose
private String comments;
@SerializedName("action")
@Expose
private DeviceState action;
@SerializedName("groupState")
@Expose
private GroupState groupState;
@SerializedName("lights")
@Expose
private String[] lights;
@SerializedName("exposeAsLight")
@Expose
private String exposeAsLight;
public String getName() {
@@ -136,4 +137,12 @@ public class GroupDescriptor{
public void setLights(String[] lights) {
this.lights = lights;
}
public void setExposeAsLight(String exposeFor) {
this.exposeAsLight = exposeFor;
}
public String getExposeAsLight() {
return exposeAsLight;
}
}