updated debugging and included new Broadlink api build

This commit is contained in:
bsamuels
2018-02-15 13:31:04 -06:00
parent 4f5d4acf56
commit 4b40b03da4
3 changed files with 9 additions and 4 deletions

View File

@@ -5,7 +5,7 @@
<groupId>com.bwssystems.HABridge</groupId>
<artifactId>ha-bridge</artifactId>
<version>5.2.0RC18</version>
<version>5.2.0RC19</version>
<packaging>jar</packaging>
<name>HA Bridge</name>
@@ -129,7 +129,7 @@
<dependency>
<groupId>com.github.bwssytems</groupId>
<artifactId>broadlink-java-api</artifactId>
<version>52f6bcb628</version>
<version>c105234547</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>

View File

@@ -236,7 +236,11 @@ public class BroadlinkHome implements Home {
}
DatagramPacket thePacket = theDevice.sendCmdPkt(Configuration.BROADLINK_DISCONVER_TIMEOUT, thePayload);
String returnData = DatatypeConverter.printHexBinary(thePacket.getData());
String returnData = null;
if(thePacket != null)
returnData = DatatypeConverter.printHexBinary(thePacket.getData());
else
returnData = "No Data - null";
log.debug("RM2 Device data return: <<<" + returnData + ">>>");
} catch (IOException e) {
log.error("Call to " + broadlinkCommand.getId() + " - " + _rm2 + " device failed with exception.", e);

View File

@@ -198,7 +198,8 @@ public class LifxHome implements Home {
log.debug("Home is already closed....");
return;
}
client.close();
if(client != null)
client.close();
closed = true;
}
private static class MyLightListener implements LFXLightCollectionListener {