Skip to content

Commit 4e44770

Browse files
committed
Logitech Harmony Support
1 parent 57ed40e commit 4e44770

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/main/java/com/armzilla/ha/hue/HueMulator.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ public ResponseEntity<Map<String, String>> getUpnpConfiguration(@PathVariable(va
6363
return new ResponseEntity<>(deviceResponseMap, null, HttpStatus.OK);
6464
}
6565

66+
@RequestMapping(value = "/*", method = RequestMethod.POST, produces = "application/json")
67+
public ResponseEntity<String> postAPI(HttpServletRequest request) {
68+
return new ResponseEntity<String>("[{\"success\":{\"username\":\"lights\"}}]", HttpStatus.OK);
69+
}
70+
6671
@RequestMapping(value = "/{userId}", method = RequestMethod.GET, produces = "application/json")
6772
public ResponseEntity<HueApiResponse> getApi(@PathVariable(value = "userId") String userId, HttpServletRequest request) {
6873
log.info("hue api root requested: " + userId + " from " + request.getRemoteAddr());

src/main/java/com/armzilla/ha/upnp/UpnpListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ protected boolean isSSDPDiscovery(String body){
103103
"LOCATION: http://%s:%s/upnp/amazon-ha-bridge/setup.xml\r\n" +
104104
"OPT: \"http://schemas.upnp.org/upnp/1/0/\"; ns=01\r\n" +
105105
"01-NLS: %s\r\n" +
106-
"ST: urn:Belkin:device:**\r\n" +
106+
"ST: urn:schemas-upnp-org:device:basic:1\r\n" +
107107
"USN: uuid:Socket-1_0-221438K0100073::urn:Belkin:device:**\r\n\r\n";
108108
protected void sendUpnpResponse(DatagramSocket socket, InetAddress requester, int sourcePort) throws IOException {
109109
String discoveryResponse = String.format(discoveryTemplate, responseAddress, httpServerPort, getRandomUUIDString());

0 commit comments

Comments
 (0)