Skip to content

Commit

Permalink
Updated upnp listener logging. Fixed issue with HUE emulation for
Browse files Browse the repository at this point in the history
configuration. HUE mobile app now connects.
  • Loading branch information
bwssytems committed Dec 17, 2015
1 parent b27bb5e commit 2b335d6
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.bwssystems.HABridge</groupId>
<artifactId>ha-bridge</artifactId>
<version>1.2.2a</version>
<version>1.2.3</version>
<packaging>jar</packaging>

<name>HA Bridge</name>
Expand Down
30 changes: 30 additions & 0 deletions src/main/java/com/bwssystems/HABridge/api/hue/HueApiResponse.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,17 @@ public class HueApiResponse {
private Map<String, DeviceResponse> lights;
private Map<String, String> scenes;
private Map<String, String> groups;
private Map<String, String> schedules;
private Map<String, String> sensors;
private Map<String, String> rules;
private HueConfig config;

public HueApiResponse(String name, String ipaddress, String devicetype, String userid) {
super();
this.setConfig(HueConfig.createConfig(name, ipaddress, devicetype, userid));
this.setRules(new HashMap<>());
this.setSensors(new HashMap<>());
this.setSchedules(new HashMap<>());
this.setGroups(new HashMap<>());
this.setScenes(new HashMap<>());
}
Expand Down Expand Up @@ -45,6 +51,30 @@ public void setGroups(Map<String, String> groups) {
this.groups = groups;
}

public Map<String, String> getSchedules() {
return schedules;
}

public void setSchedules(Map<String, String> schedules) {
this.schedules = schedules;
}

public Map<String, String> getSensors() {
return sensors;
}

public void setSensors(Map<String, String> sensors) {
this.sensors = sensors;
}

public Map<String, String> getRules() {
return rules;
}

public void setRules(Map<String, String> rules) {
this.rules = rules;
}

public HueConfig getConfig() {
return config;
}
Expand Down
7 changes: 4 additions & 3 deletions src/main/java/com/bwssystems/HABridge/upnp/UpnpListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,10 @@ else if (!strict)
return true;
}
}
log.debug("isSSDPDiscovery found message to be an M-SEARCH message.");
log.debug("isSSDPDiscovery found message to not be valid - strict: " + strict);
log.debug("SSDP packet from " + packet.getAddress().getHostAddress() + ":" + packet.getPort() + ", body: " + packetString);
else {
// log.debug("isSSDPDiscovery found message to not be valid - strict: " + strict);
// log.debug("SSDP packet from " + packet.getAddress().getHostAddress() + ":" + packet.getPort() + ", body: " + packetString);
}
return false;
}

Expand Down

0 comments on commit 2b335d6

Please sign in to comment.