Skip to content

Commit 7e0fd6c

Browse files
committed
Updated the register with hue function to not send a user name when
linking as this has been deprecated by Philips. Fixes #99
1 parent 3bf52f5 commit 7e0fd6c

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>com.bwssystems.HABridge</groupId>
77
<artifactId>ha-bridge</artifactId>
8-
<version>2.0.2</version>
8+
<version>2.0.3</version>
99
<packaging>jar</packaging>
1010

1111
<name>HA Bridge</name>

src/main/java/com/bwssystems/hue/HueUtil.java

+1-5
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,7 @@ public class HueUtil {
2121

2222
public static final String registerWithHue(HttpClient anHttpClient, String ipAddress, String aName, String theUser, HueErrorStringSet errorStringSet) {
2323
UserCreateRequest theLogin = new UserCreateRequest();
24-
theLogin.setDevicetype("HA Bridge");
25-
if(theUser == null)
26-
theLogin.setUsername("habridge");
27-
else
28-
theLogin.setUsername(theUser);
24+
theLogin.setDevicetype("HABridge#MyMachine");
2925
HttpPost postRequest = new HttpPost("http://" + ipAddress + HUE_REQUEST);
3026
ContentType parsedContentType = ContentType.parse("application/json");
3127
StringEntity requestBody = new StringEntity(new Gson().toJson(theLogin), parsedContentType);

0 commit comments

Comments
 (0)