...
Code Block | ||
---|---|---|
| ||
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()); } |
...