...
For example, for a ThermostatDevice, you could interact with it as follows:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
final Device d = gw.getDevice(id); if (d instanceof ThermostatDevice) { final ThermostatDevice device = (ThermostatDevice) d; device.readMode(); device.changeMode(SystemMode.AUTO); } else { System.out.println("device is not a thermostat"); } |
...