Search in sources :

Example 6 with InsteonHubProxy

use of org.openhab.binding.insteonhub.internal.hardware.InsteonHubProxy in project openhab1-addons by openhab.

the class InsteonHubBinding method execute.

@Override
protected void execute() {
    logger.debug(BINDING_NAME + " execute");
    Set<InsteonHubBindingDeviceInfo> deviceInfos = InsteonHubBindingConfigUtil.getConfiguredDevices(providers);
    // loop through all configured devices
    for (InsteonHubBindingDeviceInfo deviceInfo : deviceInfos) {
        // lookup proxy for device
        InsteonHubProxy proxy = proxies.get(deviceInfo.getHubId());
        if (proxy != null) {
            // request device level from proxy
            // this will callback in AsyncEventPublisher if device exists
            proxy.requestDeviceLevel(deviceInfo.getDeviceId());
        }
    }
    logger.debug(BINDING_NAME + " execute complete");
}
Also used : InsteonHubProxy(org.openhab.binding.insteonhub.internal.hardware.InsteonHubProxy)

Aggregations

InsteonHubProxy (org.openhab.binding.insteonhub.internal.hardware.InsteonHubProxy)6 HashMap (java.util.HashMap)2 Map (java.util.Map)1 BindingType (org.openhab.binding.insteonhub.internal.InsteonHubBindingConfig.BindingType)1 InsteonHubAdjustmentType (org.openhab.binding.insteonhub.internal.hardware.InsteonHubAdjustmentType)1 InsteonHubSerialProxy (org.openhab.binding.insteonhub.internal.hardware.api.serial.InsteonHubSerialProxy)1 IncreaseDecreaseType (org.openhab.core.library.types.IncreaseDecreaseType)1 OnOffType (org.openhab.core.library.types.OnOffType)1 StopMoveType (org.openhab.core.library.types.StopMoveType)1 UpDownType (org.openhab.core.library.types.UpDownType)1