public class EzControlT10 extends Object implements IHarcHardware, IWeb
Modifier and Type | Class and Description |
---|---|
static class |
EzControlT10.Command
An enum consisting of the commands this class understands.
|
static class |
EzControlT10.EZSystem |
static class |
EzControlT10.Interface
Interfaces that can be used to command an T10
|
Modifier and Type | Field and Description |
---|---|
static String |
defaultEzcontrolIP |
static int |
t10NumberPresets |
static int |
t10NumberTimers |
Constructor and Description |
---|
EzControlT10(String hostname) |
EzControlT10(String hostname,
boolean verbose,
EzControlT10.Interface interfaze) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
generateXml(File file) |
void |
getConfiguration(File file) |
String |
getPresetName(int n) |
String |
getPresetStatus(int n) |
String |
getPresetString(int n) |
String |
getStatus() |
int |
getStatus(int n) |
static String |
getStatus(String hostname) |
String |
getTimer(int n) |
String |
getTimer(String name) |
static String |
getTimer(String hostname,
int n) |
static String |
getTimer(String hostname,
String name) |
String |
getTimers() |
static String |
getTimers(String hostname) |
URI |
getUri(String user,
String password)
Returns an URI to be used for browsing the device, possibly containing user and password information.
|
String |
getVersion()
Dummy implementation.
|
boolean |
isValid()
Dummy implementation, always returns true
|
static void |
main(String[] args) |
void |
open()
Opens the device with previously set parameters.
|
String |
powerToggle(String preset) |
boolean |
sendManual(EzControlT10.EZSystem system,
String house,
int device,
EzControlT10.Command cmd,
int arg,
int n) |
boolean |
sendManual(EzControlT10.EZSystem system,
String house,
int device,
EzControlT10.Command cmd,
int power,
int arg,
int n) |
boolean |
sendManual(EzControlT10.EZSystem system,
String house,
int device,
int value,
int arg,
int n) |
boolean |
sendPreset(int switchNumber,
EzControlT10.Command cmd) |
boolean |
sendPreset(int switchNumber,
EzControlT10.Command cmd,
int count) |
boolean |
sendPreset(int switchNumber,
int value) |
boolean |
sendPreset(int switchNumber,
int value,
int count) |
void |
setDebug(int debug)
Sets a debug parameter.
|
void |
setInterface(EzControlT10.Interface interfaze) |
void |
setTimeout(int timeout)
Set timeout in milliseconds.
|
void |
setVerbosity(boolean verbosity)
Sets a verbosity flag, causing commands to be executed verbosely.
|
String |
urlManual(EzControlT10.EZSystem system,
String house,
int device,
int value,
int arg,
int n) |
String |
urlManual(String systemName,
String house,
int device,
int value,
int arg,
int n) |
String |
urlPreset(int switchNumber,
EzControlT10.Command cmd) |
String |
urlPreset(int switchNumber,
int value) |
Document |
xmlConfig() |
public static final String defaultEzcontrolIP
public static final int t10NumberPresets
public static final int t10NumberTimers
public EzControlT10(String hostname, boolean verbose, EzControlT10.Interface interfaze)
public EzControlT10(String hostname)
public static void main(String[] args)
public void close()
close
in interface Closeable
close
in interface AutoCloseable
public URI getUri(String user, String password)
IWeb
public void open()
IHarcHardware
open
in interface IHarcHardware
public void setDebug(int debug)
IHarcHardware
setDebug
in interface IHarcHardware
public void setTimeout(int timeout)
IHarcHardware
setTimeout
in interface IHarcHardware
timeout
- Timeout in milliseconds.public String getVersion()
getVersion
in interface IHarcHardware
public boolean isValid()
isValid
in interface IHarcHardware
public void setVerbosity(boolean verbosity)
IHarcHardware
setVerbosity
in interface IHarcHardware
verbosity
- on or offpublic void setInterface(EzControlT10.Interface interfaze)
public boolean sendManual(EzControlT10.EZSystem system, String house, int device, int value, int arg, int n) throws HarcHardwareException
HarcHardwareException
public boolean sendManual(EzControlT10.EZSystem system, String house, int device, EzControlT10.Command cmd, int power, int arg, int n) throws HarcHardwareException
HarcHardwareException
public boolean sendManual(EzControlT10.EZSystem system, String house, int device, EzControlT10.Command cmd, int arg, int n) throws HarcHardwareException
HarcHardwareException
public String urlManual(String systemName, String house, int device, int value, int arg, int n)
public String urlManual(EzControlT10.EZSystem system, String house, int device, int value, int arg, int n)
public String powerToggle(String preset) throws HarcHardwareException
HarcHardwareException
public boolean sendPreset(int switchNumber, EzControlT10.Command cmd) throws HarcHardwareException
HarcHardwareException
public boolean sendPreset(int switchNumber, EzControlT10.Command cmd, int count) throws HarcHardwareException
HarcHardwareException
public boolean sendPreset(int switchNumber, int value) throws IllegalArgumentException, HarcHardwareException
public boolean sendPreset(int switchNumber, int value, int count) throws HarcHardwareException
HarcHardwareException
public String urlPreset(int switchNumber, EzControlT10.Command cmd)
public String urlPreset(int switchNumber, int value) throws IllegalArgumentException
IllegalArgumentException
public String getStatus()
public int getStatus(int n)
public String getPresetStatus(int n)
public String getPresetName(int n)
public String getPresetString(int n)
public String getTimers()
public String getTimer(int n)
public Document xmlConfig()
public void generateXml(File file) throws FileNotFoundException
FileNotFoundException
public void getConfiguration(File file)
Copyright © 2016. All rights reserved.