use of org.openhab.binding.zwave.internal.protocol.serialmessage.ControllerSetDefaultMessageClass in project openhab1-addons by openhab.
the class ZWaveController method requestHardReset.
/**
* Sends a request to perform a hard reset on the controller.
* This will reset the controller to its default, resetting the network completely
*/
public void requestHardReset() {
logger.info("Performing hard reset on controller");
// Clear the queues
// If we're resetting, there's no point in queuing messages!
sendQueue.clear();
recvQueue.clear();
// Hard reset the stick - everything will be reset to factory default
SerialMessage msg = new ControllerSetDefaultMessageClass().doRequest();
msg.attempts = 1;
this.enqueue(msg);
// Clear all the nodes and we'll reinitialise
this.zwaveNodes.clear();
this.enqueue(new SerialApiGetInitDataMessageClass().doRequest());
}
Aggregations