Examples of HmRemoteControlOptions


Examples of org.openhab.binding.homematic.internal.model.HmRemoteControlOptions

   */
  public void setRemoteControlDisplay(String remoteControlAddress, String text, String options)
      throws HomematicClientException {

    RemoteControlOptionParser rcParameterParser = new RemoteControlOptionParser();
    HmRemoteControlOptions rco = rcParameterParser.parse(remoteControlAddress, options);
    rco.setText(text);

    logger.debug("Sending to remote control {}: {}", remoteControlAddress, rco);

    String address = remoteControlAddress + ":18";
    if (StringUtils.isNotBlank(rco.getText())) {
      rpcClient.setDatapointValue(getDefaultInterface(), address, "TEXT", rco.getText());
    }

    rpcClient.setDatapointValue(getDefaultInterface(), address, "BEEP", rco.getBeep());
    rpcClient.setDatapointValue(getDefaultInterface(), address, "UNIT", rco.getUnit());
    rpcClient.setDatapointValue(getDefaultInterface(), address, "BACKLIGHT", rco.getBacklight());

    for (String symbol : rco.getSymbols()) {
      rpcClient.setDatapointValue(getDefaultInterface(), address, symbol, Boolean.TRUE);
    }

    rpcClient.setDatapointValue(getDefaultInterface(), address, "SUBMIT", Boolean.TRUE);
  }
View Full Code Here

Examples of org.openhab.binding.homematic.internal.model.HmRemoteControlOptions

          backlightValueList);
      logger.debug("Remote control {} supports these unit parameter: {}", remoteControlAddress, unitValueList);
      logger.debug("Remote control {} supports these symbols: {}", remoteControlAddress, symbols);
    }

    HmRemoteControlOptions rcd = new HmRemoteControlOptions();

    if (parms != null) {
      for (String parameter : parms) {
        logger.debug("Parsing remote control parameter {}", parameter);
        rcd.setBeep(getIntParameter(beepValueList, rcd.getBeep(), parameter, "BEEP"));
        rcd.setBacklight(getIntParameter(backlightValueList, rcd.getBacklight(), parameter, "BACKLIGHT"));
        rcd.setUnit(getIntParameter(unitValueList, rcd.getUnit(), parameter, "UNIT"));

        if (ArrayUtils.contains(symbols, parameter)) {
          logger.debug("Symbol {} found for remote control {}", parameter, remoteControlAddress);
          rcd.addSymbol(parameter);
        }
      }
    }
    return rcd;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.