Updated with new Configurator changes and cleaned up imports
This commit is contained in:
parent
6109f66ea0
commit
e1618604c9
66 changed files with 297 additions and 198 deletions
|
|
@ -16,11 +16,6 @@
|
|||
|
||||
package se.hal.plugin.assistant.google;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.*;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.google.actions.api.smarthome.*;
|
||||
import com.google.auth.oauth2.AccessToken;
|
||||
import com.google.auth.oauth2.GoogleCredentials;
|
||||
|
|
@ -38,6 +33,11 @@ import zutil.db.DBConnection;
|
|||
import zutil.log.LogUtil;
|
||||
import zutil.net.http.page.oauth.OAuth2Registry.TokenRegistrationListener;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.*;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
||||
public class SmartHomeImpl extends SmartHomeApp implements TokenRegistrationListener {
|
||||
private static final Logger logger = LogUtil.getLogger();
|
||||
|
|
|
|||
|
|
@ -24,21 +24,17 @@
|
|||
|
||||
package se.hal.plugin.assistant.google;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.google.actions.api.smarthome.SmartHomeApp;
|
||||
import se.hal.plugin.assistant.google.SmartHomeImpl;
|
||||
import zutil.io.IOUtil;
|
||||
import zutil.log.LogUtil;
|
||||
import zutil.net.http.HttpHeader;
|
||||
import zutil.net.http.HttpPage;
|
||||
import zutil.net.http.HttpPrintStream;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
* Handles Google SMartHome request received via HTTP POST.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -7,7 +7,8 @@ import se.hal.intf.*;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.*;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
|
||||
public class DummyController implements HalSensorController, HalEventController, Runnable, HalDaemon {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
package se.hal.plugin.dummy;
|
||||
|
||||
import se.hal.intf.*;
|
||||
import se.hal.intf.HalDeviceData;
|
||||
import se.hal.intf.HalSensorConfig;
|
||||
import se.hal.intf.HalSensorController;
|
||||
import se.hal.intf.HalSensorData;
|
||||
import se.hal.struct.devicedata.HumiditySensorData;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
package se.hal.plugin.dummy;
|
||||
|
||||
import se.hal.intf.*;
|
||||
import se.hal.intf.HalDeviceData;
|
||||
import se.hal.intf.HalEventConfig;
|
||||
import se.hal.intf.HalEventController;
|
||||
import se.hal.intf.HalEventData;
|
||||
import se.hal.struct.devicedata.OnOffEventData;
|
||||
|
||||
public class DummySwitchEvent implements DummyDevice, HalEventConfig {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
package se.hal.plugin.dummy;
|
||||
|
||||
import se.hal.intf.*;
|
||||
import se.hal.intf.HalDeviceData;
|
||||
import se.hal.intf.HalSensorConfig;
|
||||
import se.hal.intf.HalSensorController;
|
||||
import se.hal.intf.HalSensorData;
|
||||
import se.hal.struct.devicedata.TemperatureSensorData;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,6 @@
|
|||
|
||||
package se.hal.plugin.mqtt.device;
|
||||
|
||||
import se.hal.intf.HalDeviceConfig;
|
||||
import se.hal.intf.HalEventConfig;
|
||||
import se.hal.intf.HalEventController;
|
||||
import se.hal.intf.HalEventData;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
package se.hal.plugin.netscan;
|
||||
|
||||
import se.hal.intf.HalDeviceConfig;
|
||||
import se.hal.intf.HalEventConfig;
|
||||
import se.hal.intf.HalEventController;
|
||||
import se.hal.intf.HalEventData;
|
||||
import se.hal.struct.devicedata.OnOffEventData;
|
||||
import zutil.ui.Configurator;
|
||||
import zutil.ui.conf.Configurator;
|
||||
|
||||
public class NetworkDevice implements HalEventConfig {
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,10 @@
|
|||
package se.hal.plugin.nutups;
|
||||
|
||||
import se.hal.HalContext;
|
||||
import se.hal.intf.*;
|
||||
import se.hal.intf.HalAutoScannableController;
|
||||
import se.hal.intf.HalDeviceConfig;
|
||||
import se.hal.intf.HalDeviceReportListener;
|
||||
import se.hal.intf.HalSensorController;
|
||||
import zutil.log.LogUtil;
|
||||
import zutil.osal.linux.app.NutUPSClient;
|
||||
|
||||
|
|
|
|||
|
|
@ -48,13 +48,12 @@
|
|||
|
||||
package se.hal.plugin.nutups;
|
||||
|
||||
import se.hal.intf.HalDeviceConfig;
|
||||
import se.hal.intf.HalSensorConfig;
|
||||
import se.hal.intf.HalSensorController;
|
||||
import se.hal.intf.HalSensorData;
|
||||
import se.hal.struct.devicedata.PowerConsumptionSensorData;
|
||||
import zutil.osal.linux.app.NutUPSClient;
|
||||
import zutil.ui.Configurator;
|
||||
import zutil.ui.conf.Configurator;
|
||||
|
||||
public class NutUpsDevice implements HalSensorConfig{
|
||||
|
||||
|
|
|
|||
|
|
@ -24,10 +24,9 @@
|
|||
|
||||
package se.hal.plugin.nvr.rtsp;
|
||||
|
||||
import se.hal.intf.HalDeviceConfig;
|
||||
import se.hal.intf.HalDeviceData;
|
||||
import se.hal.plugin.nvr.intf.HalCameraController;
|
||||
import se.hal.plugin.nvr.intf.HalCameraConfig;
|
||||
import se.hal.plugin.nvr.intf.HalCameraController;
|
||||
|
||||
public class RTSPCameraConfig implements HalCameraConfig {
|
||||
|
||||
|
|
|
|||
|
|
@ -25,9 +25,9 @@
|
|||
package se.hal.plugin.nvr.struct;
|
||||
|
||||
import se.hal.intf.HalAbstractController;
|
||||
import se.hal.intf.HalAbstractDevice;
|
||||
import se.hal.plugin.nvr.intf.HalCameraConfig;
|
||||
import se.hal.plugin.nvr.intf.HalCameraData;
|
||||
import se.hal.intf.HalAbstractDevice;
|
||||
import zutil.db.DBConnection;
|
||||
import zutil.db.bean.DBBean;
|
||||
|
||||
|
|
|
|||
|
|
@ -25,18 +25,17 @@
|
|||
package se.hal.plugin.powerchallenge.daemon;
|
||||
|
||||
import se.hal.HalContext;
|
||||
import se.hal.intf.HalDaemon;
|
||||
import se.hal.page.HalAlertManager;
|
||||
import se.hal.plugin.powerchallenge.daemon.PCDataSynchronizationDaemon.PeerDataRspDTO;
|
||||
import se.hal.plugin.powerchallenge.daemon.PCDataSynchronizationDaemon.SensorDTO;
|
||||
import se.hal.plugin.powerchallenge.daemon.PCDataSynchronizationDaemon.SensorDataDTO;
|
||||
import se.hal.plugin.powerchallenge.daemon.PCDataSynchronizationDaemon.SensorDataListDTO;
|
||||
import se.hal.intf.HalDaemon;
|
||||
import se.hal.page.HalAlertManager;
|
||||
import se.hal.struct.Sensor;
|
||||
import se.hal.struct.User;
|
||||
import zutil.db.DBConnection;
|
||||
import zutil.log.LogUtil;
|
||||
import zutil.parser.json.JSONParser;
|
||||
import zutil.ui.UserMessageManager;
|
||||
|
||||
import java.io.ObjectInputStream;
|
||||
import java.io.ObjectOutputStream;
|
||||
|
|
|
|||
|
|
@ -25,9 +25,9 @@
|
|||
package se.hal.plugin.powerchallenge.daemon;
|
||||
|
||||
import se.hal.HalContext;
|
||||
import se.hal.intf.HalDaemon;
|
||||
import se.hal.plugin.powerchallenge.daemon.PCDataSynchronizationClient.PeerDataReqDTO;
|
||||
import se.hal.plugin.powerchallenge.daemon.PCDataSynchronizationClient.SensorDataReqDTO;
|
||||
import se.hal.intf.HalDaemon;
|
||||
import se.hal.struct.Sensor;
|
||||
import se.hal.struct.User;
|
||||
import zutil.db.DBConnection;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
package se.hal.plugin.raspberry;
|
||||
|
||||
import se.hal.intf.HalDeviceConfig;
|
||||
import se.hal.intf.HalSensorConfig;
|
||||
import se.hal.intf.HalSensorController;
|
||||
import se.hal.intf.HalSensorData;
|
||||
import se.hal.struct.devicedata.PowerConsumptionSensorData;
|
||||
import zutil.ui.Configurator;
|
||||
import zutil.ui.conf.Configurator;
|
||||
|
||||
public class RPiPowerConsumptionSensor implements HalSensorConfig {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
package se.hal.plugin.raspberry;
|
||||
|
||||
import se.hal.intf.HalDeviceConfig;
|
||||
import se.hal.intf.HalSensorConfig;
|
||||
import se.hal.intf.HalSensorController;
|
||||
import se.hal.intf.HalSensorData;
|
||||
import se.hal.struct.devicedata.TemperatureSensorData;
|
||||
import zutil.ui.Configurator;
|
||||
import zutil.ui.conf.Configurator;
|
||||
|
||||
public class RPiTemperatureSensor implements HalSensorConfig {
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@
|
|||
|
||||
package se.hal.plugin.tellstick.device;
|
||||
|
||||
import se.hal.intf.HalDeviceConfig;
|
||||
import se.hal.intf.HalEventConfig;
|
||||
import se.hal.intf.HalEventController;
|
||||
import se.hal.intf.HalEventData;
|
||||
|
|
@ -31,7 +30,7 @@ import se.hal.plugin.tellstick.TellstickDeviceGroup;
|
|||
import se.hal.plugin.tellstick.TellstickSerialComm;
|
||||
import se.hal.plugin.tellstick.protocol.NexaSelfLearningProtocol;
|
||||
import se.hal.struct.devicedata.OnOffEventData;
|
||||
import zutil.ui.Configurator;
|
||||
import zutil.ui.conf.Configurator;
|
||||
|
||||
/**
|
||||
* Created by Ziver on 2015-02-18.
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@
|
|||
|
||||
package se.hal.plugin.tellstick.device;
|
||||
|
||||
import se.hal.intf.HalDeviceConfig;
|
||||
import se.hal.intf.HalEventConfig;
|
||||
import se.hal.intf.HalEventController;
|
||||
import se.hal.intf.HalEventData;
|
||||
|
|
@ -30,7 +29,7 @@ import se.hal.plugin.tellstick.TellstickDevice;
|
|||
import se.hal.plugin.tellstick.TellstickSerialComm;
|
||||
import se.hal.plugin.tellstick.protocol.NexaSelfLearningProtocol;
|
||||
import se.hal.struct.devicedata.DimmerEventData;
|
||||
import zutil.ui.Configurator;
|
||||
import zutil.ui.conf.Configurator;
|
||||
|
||||
/**
|
||||
* Created by Ziver on 2015-02-18.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package se.hal.plugin.tellstick.device;
|
||||
|
||||
import se.hal.intf.HalDeviceConfig;
|
||||
import se.hal.intf.HalSensorConfig;
|
||||
import se.hal.intf.HalSensorController;
|
||||
import se.hal.intf.HalSensorData;
|
||||
|
|
@ -12,7 +11,7 @@ import se.hal.struct.devicedata.LightSensorData;
|
|||
import se.hal.struct.devicedata.PowerConsumptionSensorData;
|
||||
import se.hal.struct.devicedata.TemperatureSensorData;
|
||||
import zutil.log.LogUtil;
|
||||
import zutil.ui.Configurator;
|
||||
import zutil.ui.conf.Configurator;
|
||||
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
|
|
|||
|
|
@ -24,9 +24,9 @@ package se.hal.plugin.tellstick.protocol;
|
|||
|
||||
import se.hal.intf.HalEventConfig;
|
||||
import se.hal.intf.HalEventData;
|
||||
import se.hal.plugin.tellstick.TellstickProtocol;
|
||||
import se.hal.plugin.tellstick.cmd.TellstickCmd;
|
||||
import se.hal.plugin.tellstick.cmd.TellstickCmdExtendedSend;
|
||||
import se.hal.plugin.tellstick.TellstickProtocol;
|
||||
import se.hal.plugin.tellstick.device.NexaSelfLearning;
|
||||
import se.hal.plugin.tellstick.device.NexaSelfLearningDimmer;
|
||||
import se.hal.struct.devicedata.DimmerEventData;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,9 @@ package se.hal.plugin.tellstick;
|
|||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import se.hal.intf.*;
|
||||
import se.hal.intf.HalDeviceReportListener;
|
||||
import se.hal.intf.HalEventConfig;
|
||||
import se.hal.intf.HalEventData;
|
||||
import se.hal.plugin.tellstick.test.TestEventDevice;
|
||||
import se.hal.plugin.tellstick.test.TestProtocol;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,9 @@ package se.hal.plugin.tellstick;
|
|||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import se.hal.intf.*;
|
||||
import se.hal.intf.HalDeviceReportListener;
|
||||
import se.hal.intf.HalSensorConfig;
|
||||
import se.hal.intf.HalSensorData;
|
||||
import se.hal.plugin.tellstick.test.TestProtocol;
|
||||
import se.hal.plugin.tellstick.test.TestSensorDevice;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,9 @@
|
|||
package se.hal.plugin.tellstick.test;
|
||||
|
||||
import se.hal.intf.HalDeviceConfig;
|
||||
import se.hal.intf.HalEventConfig;
|
||||
import se.hal.intf.HalEventController;
|
||||
import se.hal.intf.HalEventData;
|
||||
import se.hal.plugin.tellstick.TellstickDevice;
|
||||
import se.hal.plugin.tellstick.TellstickSerialCommEventTest;
|
||||
|
||||
public class TestEventDevice implements TellstickDevice, HalEventConfig {
|
||||
public int testData;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,9 @@
|
|||
package se.hal.plugin.tellstick.test;
|
||||
|
||||
import se.hal.intf.HalDeviceConfig;
|
||||
import se.hal.intf.HalSensorConfig;
|
||||
import se.hal.intf.HalSensorController;
|
||||
import se.hal.intf.HalSensorData;
|
||||
import se.hal.plugin.tellstick.TellstickDevice;
|
||||
import se.hal.plugin.tellstick.TellstickSerialCommSensorTest;
|
||||
|
||||
public class TestSensorDevice implements HalSensorConfig, TellstickDevice {
|
||||
public int testData;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@ package se.hal.plugin.zigbee.deconz.zigbee.deconz.rest;
|
|||
import zutil.net.ws.WSInterface.WSPath;
|
||||
import zutil.net.ws.WSInterface.WSRequestType;
|
||||
|
||||
import static zutil.net.ws.WSInterface.RequestType.*;
|
||||
import static zutil.net.ws.WSInterface.RequestType.DELETE;
|
||||
import static zutil.net.ws.WSInterface.RequestType.GET;
|
||||
|
||||
/**
|
||||
* Rules provide the ability to trigger actions of lights or groups when a specific sensor condition is met.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@ package se.hal.plugin.zigbee.deconz.zigbee.deconz.rest;
|
|||
import zutil.net.ws.WSInterface.WSPath;
|
||||
import zutil.net.ws.WSInterface.WSRequestType;
|
||||
|
||||
import static zutil.net.ws.WSInterface.RequestType.*;
|
||||
import static zutil.net.ws.WSInterface.RequestType.GET;
|
||||
import static zutil.net.ws.WSInterface.RequestType.POST;
|
||||
|
||||
/**
|
||||
* The touchlink endpoint allows to communicate with near by located devices.
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ package se.hal.plugin.zigbee;
|
|||
|
||||
|
||||
import com.zsmartsystems.zigbee.*;
|
||||
import com.zsmartsystems.zigbee.app.basic.ZigBeeBasicServerExtension;
|
||||
import com.zsmartsystems.zigbee.app.discovery.ZigBeeDiscoveryExtension;
|
||||
import com.zsmartsystems.zigbee.app.iasclient.ZigBeeIasCieExtension;
|
||||
import com.zsmartsystems.zigbee.app.otaserver.ZigBeeOtaUpgradeExtension;
|
||||
|
|
@ -12,20 +11,19 @@ import com.zsmartsystems.zigbee.dongle.xbee.ZigBeeDongleXBee;
|
|||
import com.zsmartsystems.zigbee.security.ZigBeeKey;
|
||||
import com.zsmartsystems.zigbee.serialization.DefaultDeserializer;
|
||||
import com.zsmartsystems.zigbee.serialization.DefaultSerializer;
|
||||
import com.zsmartsystems.zigbee.transport.*;
|
||||
import com.zsmartsystems.zigbee.transport.TransportConfig;
|
||||
import com.zsmartsystems.zigbee.transport.TransportConfigOption;
|
||||
import com.zsmartsystems.zigbee.transport.ZigBeePort;
|
||||
import com.zsmartsystems.zigbee.transport.ZigBeeTransportTransmit;
|
||||
import com.zsmartsystems.zigbee.zcl.clusters.*;
|
||||
import com.zsmartsystems.zigbee.zdo.command.NetworkAddressRequest;
|
||||
import com.zsmartsystems.zigbee.zdo.field.NodeDescriptor;
|
||||
import se.hal.HalContext;
|
||||
import se.hal.intf.*;
|
||||
import se.hal.intf.HalAbstractDevice;
|
||||
import zutil.log.LogUtil;
|
||||
|
||||
import java.nio.channels.Channel;
|
||||
import java.util.*;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
|
|||
|
|
@ -24,12 +24,11 @@
|
|||
|
||||
package se.hal.plugin.zigbee;
|
||||
|
||||
import com.fazecast.jSerialComm.SerialPort;
|
||||
import com.zsmartsystems.zigbee.transport.ZigBeePort;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.fazecast.jSerialComm.SerialPort;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package se.hal.plugin.zwave;
|
|||
import org.zwave4j.*;
|
||||
import se.hal.HalContext;
|
||||
import se.hal.intf.*;
|
||||
import se.hal.intf.HalAbstractDevice;
|
||||
import zutil.log.LogUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue