...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
final Property p = device.getProperty("OnOff").getFuture().get(5, TimeUnit.SECONDS); System.out.println("name: " + p.getName() + ", value: " + p.getValue()); |
...
The Gateway API will return a specific type of class for certain devices. Specific device classes, such as LightDevice, will have their own convenience methods that allow you to skip using the getProperty/updateProperty API's.
...
The Gateway API will return a specific type of class for certain devices. Specific device classes, such as ThermostatDevice, will have their own convenience methods that allow you to skip using the getProperty/updateProperty API's.
...