Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public enum RemoteKeyEnum implements CharacteristicEnum {
BACK(9),
EXIT(10),
PLAY_PAUSE(11),
INFO(115);
INFO(15);

private static final Map<Integer, RemoteKeyEnum> reverse;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,15 @@ public HomekitStandaloneAccessoryServer createStandaloneAccessory(
return new HomekitStandaloneAccessoryServer(accessory, http, localAddress, authInfo);
}
}
public HomekitStandaloneAccessoryServer createStandaloneAccessory(
HomekitAuthInfo authInfo, HomekitAccessory accessory, int category)
throws IOException, ExecutionException, InterruptedException {
if (jmdns != null) {
return new HomekitStandaloneAccessoryServer(accessory, http, jmdns, authInfo, category);
} else {
return new HomekitStandaloneAccessoryServer(accessory, http, localAddress, authInfo, category);
}
}

/**
* Creates a bridge accessory, capable of holding multiple child accessories. This has the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,28 @@ public class HomekitStandaloneAccessoryServer {
root = new HomekitRoot(accessory.getName().get(), webHandler, jmdns, authInfo);
root.addAccessory(accessory);
}

HomekitStandaloneAccessoryServer(
HomekitAccessory accessory,
HomekitWebHandler webHandler,
InetAddress localhost,
HomekitAuthInfo authInfo,
int category)
throws UnknownHostException, IOException, ExecutionException, InterruptedException {
root = new HomekitRoot(accessory.getName().get(), category, webHandler, localhost, authInfo);
root.addAccessory(accessory);
}

HomekitStandaloneAccessoryServer(
HomekitAccessory accessory,
HomekitWebHandler webHandler,
JmDNS jmdns,
HomekitAuthInfo authInfo,
int category)
throws UnknownHostException, IOException, ExecutionException, InterruptedException {
root = new HomekitRoot(accessory.getName().get(), category, webHandler, jmdns, authInfo);
root.addAccessory(accessory);
}

/** Begins advertising and handling requests for this accessory. */
public void start() {
Expand Down