Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
GatewayClient gw = new GatewayClient(new ConnectionInfo(ConnectionType.ZIGBEE_UART, "/dev/ttyUSB0"));
...
final Device device = gw.getDevice(idStr);
try {
    final String>String result = device.enableDefaultReporting().get(30, TimeUnit.SECONDS);
    System.out.println("Status for command: " + result);
} catch (IllegalStateException | InterruptedException | ExecutionException | TimeoutException e) {
    System.out.println(e.getMessage());
}

...