Package org.openhab.binding.intertechno

Examples of org.openhab.binding.intertechno.IntertechnoBindingConfig


    String address = parser.parseAddress(addressParts
        .toArray(new String[addressParts.size()]));
    String commandOn = parser.getCommandValueON();
    String commandOff = parser.getCOmmandValueOFF();

    IntertechnoBindingConfig config = new IntertechnoBindingConfig(address,
        commandOn, commandOff);

    addBindingConfig(item, config);
  }
View Full Code Here


  /**
   * @{inheritDoc
   */
  @Override
  protected void internalReceiveCommand(String itemName, Command command) {
    IntertechnoBindingConfig config = null;
    for (CULIntertechnoBindingProvider provider : providers) {
      config = provider.getConfigForItemName(itemName);
      if (config != null) {
        break;
      }
    }
    if (config != null && command instanceof OnOffType) {
      OnOffType type = (OnOffType) command;
      String commandValue = null;
      switch (type) {
      case ON:
        commandValue = config.getCommandValueON();
        break;
      case OFF:
        commandValue = config.getCommandValueOFF();
        break;
      }
      if (commandValue != null) {
        try {
          cul.send("is" + config.getAddress() + commandValue);
        } catch (CULCommunicationException e) {
          logger.error("Can't write to CUL", e);
        }
      } else {
        logger.error("Can't determine value to send for command "
View Full Code Here

TOP

Related Classes of org.openhab.binding.intertechno.IntertechnoBindingConfig

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.