Package org.openhab.binding.zwave.internal.protocol.event

Examples of org.openhab.binding.zwave.internal.protocol.event.ZWaveNodeStatusEvent


    // Reset the resend counter
    this.resendCount = 0;

    // Alert anyone who wants to know...
    ZWaveEvent zEvent = new ZWaveNodeStatusEvent(this.getNodeId(), ZWaveNodeStatusEvent.State.Alive);
    controller.notifyEventListeners(zEvent);
  }
View Full Code Here


      this.deadTime = Calendar.getInstance().getTime();
      this.queryStageTimeStamp = Calendar.getInstance().getTime();
      logger.debug("NODE {}: Retry count exceeded. Node is DEAD.", this.nodeId);

      if(nodeStageAdvancer.isInitializationComplete() == true) {
        ZWaveEvent zEvent = new ZWaveNodeStatusEvent(this.getNodeId(), ZWaveNodeStatusEvent.State.Dead);
        controller.notifyEventListeners(zEvent);
      }
      else {
        logger.debug("NODE {}: Initialisation incomplete, not signalling DEAD node.", this.nodeId);       
      }
View Full Code Here

          }
          if (networkEvent.getState() == State.Success) {
            logger.debug("NODE {}: Marking node as failed because its on the controllers failed node list.", networkEvent.getNodeId());
            getNode(networkEvent.getNodeId()).setNodeStage(NodeStage.FAILED);
           
            ZWaveEvent zEvent = new ZWaveNodeStatusEvent(networkEvent.getNodeId(), ZWaveNodeStatusEvent.State.Failed);
            this.notifyEventListeners(zEvent);
            break;
          }
        case DeleteNode:
          if(getNode(networkEvent.getNodeId()) == null) {
View Full Code Here

      for(ZWaveNode node : this.getNodes()) {
        logger.debug("NODE {}: Checking completion state - {}.", node.getNodeId(), node.getNodeStage());
        if (node.isDead()) {
          logger.debug("NODE {}: DEAD node.", node.getNodeId());

          zEvent = new ZWaveNodeStatusEvent(node.getNodeId(), ZWaveNodeStatusEvent.State.Dead);
          this.notifyEventListeners(zEvent);
        }
      }
    }
  }
View Full Code Here

        return;

      logger.debug("NODE {}: Heal WakeUp EVENT {}", node.nodeId, node.state);
      nextHealStage(node);
    } else if (event instanceof ZWaveNodeStatusEvent) {
      ZWaveNodeStatusEvent statusEvent = (ZWaveNodeStatusEvent) event;

      logger.debug("NODE {}: Node Status event - Node is {}", statusEvent.getNodeId(), statusEvent.getState());

      switch (statusEvent.getState()) {
      case Dead:
      case Failed:
        ZWaveNode node = zController.getNode(statusEvent.getNodeId());
        if (node == null) {
          logger.error("NODE {}: Status event received, but node not found.", statusEvent.getNodeId());
          return;
        }

        // If this is a DEAD notification, then ask the controller if it's really FAILED
        if(statusEvent.getState() == ZWaveNodeStatusEvent.State.Dead) {
          zController.requestIsFailedNode(node.getNodeId());
        }

        // The node is dead, but we may have already started a Heal
        // If so, don't start it again!
        if (!isNodeHealing(node.getNodeId())) {
          logger.debug("NODE {}: {} node - requesting network heal.", node.getNodeId(), statusEvent.getState());

          healNode(node.getNodeId());

          // Reset the node stage to PING.
          // This will also set the state back to DONE in
          // resetResendCount if the node
          // has already completed initialisation.
          // node.setNodeStage(NodeStage.PING);

          node.resetResendCount();
        } else {
          logger.debug("NODE {}: {} node - already healing.", node.getNodeId(), statusEvent.getState());
        }
        break;
      case Alive:
        break;
      }
View Full Code Here

TOP

Related Classes of org.openhab.binding.zwave.internal.protocol.event.ZWaveNodeStatusEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.