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

Examples of org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveVersionCommandClass


        } else {
          record.value = "MAINS";
        }
        records.add(record);

        ZWaveVersionCommandClass versionCommandClass = (ZWaveVersionCommandClass) node
            .getCommandClass(CommandClass.VERSION);
        if (versionCommandClass != null) {
          record = new OpenHABConfigurationRecord(domain, "LibType", "Library Type", true);
          if (versionCommandClass.getLibraryType() == null)
            record.value = "Unknown";
          else
            record.value = versionCommandClass.getLibraryType().getLabel();
          records.add(record);

          record = new OpenHABConfigurationRecord(domain, "ProtocolVersion", "Protocol Version", true);
          if (versionCommandClass.getProtocolVersion() == null)
            record.value = "Unknown";
          else
            record.value = Double.toString(versionCommandClass.getProtocolVersion());
          records.add(record);

          record = new OpenHABConfigurationRecord(domain, "AppVersion", "Application Version", true);
          if (versionCommandClass.getApplicationVersion() == null)
            record.value = "Unknown";
          else
            record.value = Double.toString(versionCommandClass.getApplicationVersion());
          records.add(record);
        }

        ZWaveDeviceClass devClass = node.getDeviceClass();
        if (devClass != null) {
View Full Code Here


        // This is temporary
        // It should be in the startup code, but that needs refactoring
        if (action.equals("Version")) {
          logger.debug("NODE {}: Get node version", nodeId);
          ZWaveVersionCommandClass versionCommandClass = (ZWaveVersionCommandClass) node
              .getCommandClass(CommandClass.VERSION);

          if (versionCommandClass == null) {
            logger.error("NODE {}: Error getting versionCommandClass in doAction", nodeId);
            return;
          }

          // Request the version report for this node
          this.zController.sendData(versionCommandClass.getVersionMessage());
        }

        // Return here as afterwards we assume there are more elements
        // in the domain array
        return;
View Full Code Here

      logger.warn("NODE {}: does not support MANUFACTURER_SPECIFIC, proceeding to version node stage.",
          this.node.getNodeId());
    case MANSPEC01:
      this.node.setNodeStage(NodeStage.VERSION);
      // try and get the version command class.
      ZWaveVersionCommandClass version = (ZWaveVersionCommandClass) this.node
          .getCommandClass(CommandClass.VERSION);

      boolean checkVersionCalled = false;
      for (ZWaveCommandClass zwaveCommandClass : this.node.getCommandClasses()) {
        if (version != null && zwaveCommandClass.getMaxVersion() > 1) {
          version.checkVersion(zwaveCommandClass); // check version
                                // for this
                                // command
                                // class.
          checkVersionCalled = true;
        } else
View Full Code Here

TOP

Related Classes of org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveVersionCommandClass

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.