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

Examples of org.openhab.binding.zwave.internal.protocol.SerialMessage


  @Override
  void executeRefresh(ZWaveNode node,
      ZWaveThermostatSetpointCommandClass commandClass, int endpointId,
      Map<String, String> arguments) {
    logger.debug("NODE {}: Generating poll message for {}, endpoint {}", node.getNodeId(), commandClass.getCommandClass().getLabel(), endpointId);
    SerialMessage serialMessage;
    String setpointType = arguments.get("setpoint_type");
   
    if (setpointType != null) {
      serialMessage = node.encapsulate(commandClass.getMessage(SetpointType.getSetpointType(Integer.parseInt(setpointType))), commandClass, endpointId);
    } else {
View Full Code Here


    if (converter == null) {
      logger.warn("NODE {}: No converter found for item = {}, endpoint = {}, ignoring command.", node.getNodeId(), item.getName(), endpointId);
      return;
    }
   
    SerialMessage serialMessage;
   
    if (setpointType != null) {
      serialMessage = node.encapsulate(commandClass.setMessage(scale, SetpointType.getSetpointType(Integer.parseInt(setpointType)),(BigDecimal)converter.convertFromCommandToValue(item, command)), commandClass, endpointId);
    } else {
      serialMessage = node.encapsulate(commandClass.setMessage(scale, (BigDecimal)converter.convertFromCommandToValue(item, command)), commandClass, endpointId);
View Full Code Here

public class IsFailedNodeMessageClass  extends ZWaveCommandProcessor {
  private static final Logger logger = LoggerFactory.getLogger(IsFailedNodeMessageClass.class);
   
  public SerialMessage doRequest(int nodeId) {
    logger.debug("NODE {}: Requesting IsFailedNode status from controller.", nodeId);
    SerialMessage newMessage = new SerialMessage(nodeId, SerialMessageClass.IsFailedNodeID, SerialMessageType.Request, SerialMessageClass.IsFailedNodeID, SerialMessagePriority.High);
      byte[] newPayload = { (byte) nodeId };
      newMessage.setMessagePayload(newPayload);
      return newMessage;
  }
View Full Code Here

   * Gets a SerialMessage with the ALARM_GET command
   * @return the serial message
   */
  public SerialMessage getMessage(AlarmType alarmType) {
    logger.debug("NODE {}: Creating new message for application command ALARM_GET", this.getNode().getNodeId());
    SerialMessage result = new SerialMessage(this.getNode().getNodeId(), SerialMessageClass.SendData, SerialMessageType.Request, SerialMessageClass.ApplicationCommandHandler, SerialMessagePriority.Get);
      byte[] newPayload = {   (byte) this.getNode().getNodeId(),
                  3,
                (byte) getCommandClass().getKey(),
                (byte) ALARM_GET,
                (byte) alarmType.getKey()
              };
      result.setMessagePayload(newPayload);
      return result;   
  }
View Full Code Here

  public SerialMessage doRequest(int nodeId, int callbackId) {
    logger.debug("NODE {}: Assigning SUC return route", nodeId);

    // Queue the request
    SerialMessage newMessage = new SerialMessage(SerialMessageClass.AssignSucReturnRoute, SerialMessageType.Request,
        SerialMessageClass.AssignSucReturnRoute, SerialMessagePriority.High);
    byte[] newPayload = {
        (byte) nodeId,
        (byte) callbackId
    };
    newMessage.setMessagePayload(newPayload);
      return newMessage;
  }
View Full Code Here

 
  private int homeId = 0;
  private int ownNodeId = 0;

  public SerialMessage doRequest() {
    return new SerialMessage(SerialMessageClass.MemoryGetId, SerialMessageType.Request, SerialMessageClass.MemoryGetId, SerialMessagePriority.High);
  }
View Full Code Here

   * {@inheritDoc}
   */
  @Override
  public SerialMessage getValueMessage() {
    logger.debug("NODE {}: Creating new message for application command THERMOSTAT_FAN_MODE_GET", this.getNode().getNodeId());
    SerialMessage result = new SerialMessage(this.getNode().getNodeId(), SerialMessageClass.SendData, SerialMessageType.Request, SerialMessageClass.SendData, SerialMessagePriority.Get);
    byte[] payload = {
        (byte) this.getNode().getNodeId(),
        2,
        (byte) getCommandClass().getKey(),
        THERMOSTAT_FAN_MODE_GET
    };
    result.setMessagePayload(payload);
    return result;
  }
View Full Code Here

   * @return the serial message, or null if the supported command is not supported.
   */
  public SerialMessage getSupportedMessage() {
    logger.debug("NODE {}: Creating new message for application command THERMOSTAT_FAN_MODE_SUPPORTED_GET", this.getNode().getNodeId());

    SerialMessage result = new SerialMessage(this.getNode().getNodeId(), SerialMessageClass.SendData, SerialMessageType.Request, SerialMessageClass.ApplicationCommandHandler, SerialMessagePriority.High);
    byte[] newPayload = {   (byte) this.getNode().getNodeId(),
        2,
        (byte) getCommandClass().getKey(),
        (byte) THERMOSTAT_FAN_MODE_SUPPORTED_GET };
    result.setMessagePayload(newPayload);
    return result;   
  }
View Full Code Here

      return null;
    }

    logger.debug("NODE {}: Creating new message for application command THERMOSTAT_FAN_MODE_SET", this.getNode().getNodeId());

    SerialMessage result = new SerialMessage(this.getNode().getNodeId(), SerialMessageClass.SendData, SerialMessageType.Request, SerialMessageClass.SendData, SerialMessagePriority.Set);
    byte[] newPayload = {   (byte) this.getNode().getNodeId(),
        3,
        (byte) getCommandClass().getKey(),
        (byte) THERMOSTAT_FAN_MODE_SET,
        (byte) value
    };
    result.setMessagePayload(newPayload);
    return result;   
  }
View Full Code Here

 
  public SerialMessage doRequest() {
    logger.debug("Get SUC NodeID");

    // Queue the request
    SerialMessage newMessage = new SerialMessage(SerialMessageClass.GetSucNodeId, SerialMessageType.Request,
        SerialMessageClass.GetSucNodeId, SerialMessagePriority.High);

      return newMessage;
  }
View Full Code Here

TOP

Related Classes of org.openhab.binding.zwave.internal.protocol.SerialMessage

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.