Package org.openhab.binding.enocean.internal.profiles

Examples of org.openhab.binding.enocean.internal.profiles.Profile


        EnoceanParameterAddress parameterAddress = enoceanBindingProvider.getParameterAddress(itemName);
        EEPId eep = enoceanBindingProvider.getEEP(itemName);
        esp3Host.addDeviceProfile(parameterAddress.getEnoceanDeviceId(), eep);
        Item item = enoceanBindingProvider.getItem(itemName);
        if (profiles.containsKey(parameterAddress.getAsString())) {
            Profile profile = profiles.get(parameterAddress.getAsString());
            profile.removeItem(item);
        }
        Class<Profile> customProfileClass = enoceanBindingProvider.getCustomProfile(itemName);
        if (customProfileClass != null) {
            Constructor<Profile> constructor;
            Profile profile;
            try {
                constructor = customProfileClass.getConstructor(Item.class, EventPublisher.class);
                profile = constructor.newInstance(item, eventPublisher);
                addProfile(item, parameterAddress, profile);
            } catch (Exception e) {
View Full Code Here


    }

    @Override
    public void valueChanged(ParameterAddress parameterAddress, Value valueObject) {
        logger.debug("Received new value {} for device at {}", valueObject, parameterAddress);
        Profile profile = null;
        if (profiles.containsKey(parameterAddress.getAsString())) {
            profile = profiles.get(parameterAddress.getAsString());
        } else if (profiles.containsKey(parameterAddress.getChannelAsString())) {
            profile = profiles.get(parameterAddress.getChannelAsString());
        } else if (profiles.containsKey(parameterAddress.getDeviceAsString())) {
            profile = profiles.get(parameterAddress.getDeviceAsString());
        } else {
            Item item = getItemForParameter(parameterAddress);
            profile = new StandardProfile(item, eventPublisher);
            addProfile(item, parameterAddress, profile);
        }
        profile.valueChanged(parameterAddress, valueObject);
    }
View Full Code Here

TOP

Related Classes of org.openhab.binding.enocean.internal.profiles.Profile

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.