Package org.openhab.binding.fritzaha.internal.hardware

Examples of org.openhab.binding.fritzaha.internal.hardware.FritzahaWebInterface


  @Override
  public void setEventPublisher(EventPublisher eventPublisher) {
    super.setEventPublisher(eventPublisher);
    for (Host currentHostData : hostCache.values()) {
      currentHostData.eventPublisher = eventPublisher;
      FritzahaWebInterface currentHost = currentHostData.getConnection();
      currentHost.setEventPublisher(eventPublisher);
    }
  }
View Full Code Here


  @Override
  public void unsetEventPublisher(EventPublisher eventPublisher) {
    super.unsetEventPublisher(eventPublisher);
    for (Host currentHostData : hostCache.values()) {
      currentHostData.eventPublisher = null;
      FritzahaWebInterface currentHost = currentHostData.getConnection();
      currentHost.unsetEventPublisher(eventPublisher);
    }
  }
View Full Code Here

      for (String currentItem : currentProvider.getItemNames()) {
        FritzahaDevice currentDevice = currentProvider.getDeviceConfig(currentItem);
        String currentHostId = currentDevice.getHost();
        if (!hostCache.containsKey(currentHostId))
          continue;
        FritzahaWebInterface currentHost = hostCache.get(currentHostId).getConnection();
        if (currentDevice instanceof FritzahaSwitchedOutlet) {
          FritzahaSwitchedOutlet currentSwitch = (FritzahaSwitchedOutlet) currentDevice;
          currentSwitch.updateSwitchState(currentItem, currentHost);
        } else if (currentDevice instanceof FritzahaOutletMeter) {
          FritzahaOutletMeter currentMeter = (FritzahaOutletMeter) currentDevice;
View Full Code Here

    }
    if (command instanceof OnOffType) {
      String deviceHostID = switchDevice.getHost();
      Host host = hostCache.get(deviceHostID);
      if(host!=null) {
        FritzahaWebInterface deviceHost = host.getConnection();
        boolean valueToSet = (command == OnOffType.ON);
        switchDevice.setSwitchState(valueToSet, itemName, deviceHost);
      }
    } else {
      logger.debug("Unsupported command type for item " + itemName);
View Full Code Here

     * @return Connection
     */
    FritzahaWebInterface getConnection() {
      if (connection == null) {
        logger.debug("New connection to " + host + " with timeouts ("+synctimeout+"|"+asynctimeout+").");
        connection = new FritzahaWebInterface(host, port, protocol, username, password, synctimeout, asynctimeout);
        connection.setEventPublisher(eventPublisher);
      }
      return connection;
    }
View Full Code Here

TOP

Related Classes of org.openhab.binding.fritzaha.internal.hardware.FritzahaWebInterface

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.