Examples of LgtvBindingProvider


Examples of org.openhab.binding.lgtv.LgtvBindingProvider

   */
  @Override
  protected void internalReceiveCommand(String itemName, Command command) {

    if (itemName != null) {
      LgtvBindingProvider provider = findFirstMatchingBindingProvider(itemName, command.toString());

      if (provider == null) {
        logger.warn("Doesn't find matching binding provider [itemName={}, command={}]", itemName, command);
        return;
      }

      logger.debug("Received command (item='{}', state='{}', class='{}')",
          new Object[] { itemName, command.toString(), command.getClass().toString() });

      String tmp = provider.getDeviceCommand(itemName, command.toString());

      if (tmp == null) {
        tmp = provider.getDeviceCommand(itemName, WILDCARD_COMMAND_KEY);
      }

      String[] commandParts = tmp.split(":");
      String deviceId = commandParts[0];
      String deviceCmd = commandParts[1];
View Full Code Here

Examples of org.openhab.binding.lgtv.LgtvBindingProvider

   *
   * @return the matching binding provider or <code>null</code> if no binding
   *         provider could be found
   */
  private LgtvBindingProvider findFirstMatchingBindingProvider(String itemName, String command) {
    LgtvBindingProvider firstMatchingProvider = null;

    for (LgtvBindingProvider provider : this.providers) {
      String tmp = provider.getDeviceCommand(itemName, command.toString());
      if (tmp != null) {
        firstMatchingProvider = provider;
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.