use of org.openhab.binding.zwave.internal.protocol.SerialInterfaceException in project openhab1-addons by openhab.
the class ZWaveActiveBinding method initialise.
/**
* Initialises the binding. This is called after the 'updated' method
* has been called and all configuration has been passed.
*
* @throws ConfigurationException
*/
private void initialise() throws ConfigurationException {
try {
logger.debug("Initialising zwave binding");
this.setProperlyConfigured(true);
this.deactivate();
this.zController = new ZWaveController(masterController, isSUC, port, timeout, softReset);
this.converterHandler = new ZWaveConverterHandler(this.zController, this.eventPublisher);
zController.addEventListener(this);
// The network monitor service needs to know the controller...
this.networkMonitor = new ZWaveNetworkMonitor(this.zController);
if (healtime != null) {
this.networkMonitor.setHealTime(healtime);
}
if (aliveCheckPeriod != null) {
this.networkMonitor.setPollPeriod(aliveCheckPeriod);
}
if (softReset != false) {
this.networkMonitor.resetOnError(softReset);
}
// The config service needs to know the controller and the network monitor...
this.zConfigurationService = new ZWaveConfiguration(this.zController, this.networkMonitor);
zController.addEventListener(this.zConfigurationService);
return;
} catch (SerialInterfaceException ex) {
this.setProperlyConfigured(false);
throw new ConfigurationException("port", ex.getLocalizedMessage(), ex);
}
}
Aggregations