Skip to content

Commit

Permalink
Updated Hue Device emulation to be Lux bulbs as most things this bridge
Browse files Browse the repository at this point in the history
will emulate will not be color friendly....
  • Loading branch information
bwssytems committed Oct 23, 2015
1 parent 23f2d27 commit c872f35
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 16 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>0.4.9</version>
<version>0.4.10</version>
<packaging>jar</packaging>

<name>HA Bridge</name>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/bwssystems/HABridge/HABridge.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public static void main(String[] args) {
String addressString;
BridgeSettings bridgeSettings;

log.info("HA Bridge (v0.4.10) starting setup....");
//get ip address for upnp requests
try {
address = InetAddress.getLocalHost();
Expand All @@ -65,7 +66,6 @@ public static void main(String[] args) {
port(Integer.valueOf(bridgeSettings.getServerPort()));
// sparkjava config directive to set html static file location for Jetty
staticFileLocation("/public");
log.info("Starting setup....");
// setup the class to handle the resource setup rest api
theResources = new DeviceResource(bridgeSettings);
// setup the class to handle the hue emulator rest api
Expand Down
17 changes: 4 additions & 13 deletions src/main/java/com/bwssystems/HABridge/api/hue/DeviceResponse.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package com.bwssystems.HABridge.api.hue;

import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;

/**
Expand Down Expand Up @@ -104,20 +102,13 @@ public static DeviceResponse createResponse(String name, String id){
deviceState.setEffect("none");
deviceState.setAlert("none");
deviceState.setBri(254);
deviceState.setHue(15823);
deviceState.setSat(88);
deviceState.setCt(313);

List<Double> xv = new LinkedList<>();
xv.add(Double.valueOf("0.4255"));
xv.add(Double.valueOf("0.3998"));
deviceState.setXy(xv);
deviceState.setColormode("ct");
deviceState.setSat(254);

response.setName(name);
response.setUniqueid(id);
response.setManufacturername("Philips");
response.setType("Extended color light");
response.setModelid("LCT001");
response.setType("Dimmable light");
response.setModelid("LWB004");
response.setSwversion("65003148");

return response;
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
<li><a href="http://www.bwssystems.com" target="_blank">Developed by BWS Systems</a></li>
<li><a href="http://www.amazon.com/echo" target="_blank">Amazon Echo</a></li>
<li><a href="">HA Bridge Version 0.4.9</a></li>
<li><a href="">HA Bridge Version 0.4.10</a></li>
</ul>
</li>
</ul>
Expand Down

0 comments on commit c872f35

Please sign in to comment.