Renamed some DeviceData classes, added additional data classes also and better handling in zigbee
This commit is contained in:
parent
dc200294be
commit
3edea58f8c
18 changed files with 275 additions and 45 deletions
|
|
@ -7,7 +7,7 @@ import se.hal.plugin.tellstick.TellstickDevice;
|
|||
import se.hal.plugin.tellstick.TellstickSerialComm;
|
||||
import se.hal.plugin.tellstick.protocol.Oregon0x1A2DProtocol;
|
||||
import se.hal.struct.devicedata.HumiditySensorData;
|
||||
import se.hal.struct.devicedata.LightSensorData;
|
||||
import se.hal.struct.devicedata.IlluminanceSensorData;
|
||||
import se.hal.struct.devicedata.PowerConsumptionSensorData;
|
||||
import se.hal.struct.devicedata.TemperatureSensorData;
|
||||
import zutil.log.LogUtil;
|
||||
|
|
@ -78,7 +78,7 @@ public class Oregon0x1A2D implements TellstickDevice, HalSensorConfig {
|
|||
case HUMIDITY:
|
||||
return HumiditySensorData.class;
|
||||
case LIGHT:
|
||||
return LightSensorData.class;
|
||||
return IlluminanceSensorData.class;
|
||||
case POWER:
|
||||
return PowerConsumptionSensorData.class;
|
||||
case TEMPERATURE:
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import se.hal.plugin.tellstick.TellstickSerialComm;
|
|||
import se.hal.plugin.tellstick.device.Oregon0x1A2D;
|
||||
import se.hal.plugin.tellstick.device.Oregon0x1A2D.OregonSensorType;
|
||||
import se.hal.struct.devicedata.HumiditySensorData;
|
||||
import se.hal.struct.devicedata.LightSensorData;
|
||||
import se.hal.struct.devicedata.IlluminanceSensorData;
|
||||
import se.hal.struct.devicedata.PowerConsumptionSensorData;
|
||||
import se.hal.struct.devicedata.TemperatureSensorData;
|
||||
import zutil.converter.Converter;
|
||||
|
|
@ -90,7 +90,7 @@ public class Oregon0x1A2DProtocol extends TellstickProtocol {
|
|||
humidityFound = true;
|
||||
break;
|
||||
case LIGHT:
|
||||
dataObj = new LightSensorData(temperature, timestamp);
|
||||
dataObj = new IlluminanceSensorData(temperature, timestamp);
|
||||
temperatureFound = true;
|
||||
break;
|
||||
case TEMPERATURE:
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ public class TelstickSerialCommNexaOnOffTest {
|
|||
System.out.println("Up and Running");
|
||||
while (true) {
|
||||
Thread.sleep(2000);
|
||||
nexaData.turnOn();
|
||||
nexaData.setOn();
|
||||
nexaDevice.setUnit(0);
|
||||
comm.send(nexaDevice, nexaData);
|
||||
Thread.sleep(2000);
|
||||
|
|
@ -38,7 +38,7 @@ public class TelstickSerialCommNexaOnOffTest {
|
|||
Thread.sleep(2000);
|
||||
|
||||
|
||||
nexaData.turnOff();
|
||||
nexaData.setOff();
|
||||
nexaDevice.setUnit(0);
|
||||
comm.send(nexaDevice, nexaData);
|
||||
Thread.sleep(2000);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue