Search in sources :

Example 1 with TinkerforgeValue

use of org.openhab.binding.tinkerforge.internal.types.TinkerforgeValue in project openhab1-addons by openhab.

the class TinkerforgeBinding method processValue.

private void processValue(MBrickd brickd, Notification notification, String subId) {
    TinkerforgeValue newValue = (TinkerforgeValue) notification.getNewValue();
    String uid = brickd.getHost() + ":" + ((Integer) brickd.getPort()).toString();
    logger.trace("{} Notifier found brickd value uid {} subid {}", LoggerConstants.TFMODELUPDATE, uid, subId);
    postUpdate(uid, subId, newValue);
}
Also used : TinkerforgeValue(org.openhab.binding.tinkerforge.internal.types.TinkerforgeValue)

Example 2 with TinkerforgeValue

use of org.openhab.binding.tinkerforge.internal.types.TinkerforgeValue in project openhab1-addons by openhab.

the class TinkerforgeBinding method processValue.

/**
     * Processes changed device values to post them to the openHAB event bus.
     *
     * @param device The {@link MBaseDevice} device, which has a changed value.
     * @param notification The {@link Notification} about changes to the {@link Ecosystem}.
     */
private void processValue(MBaseDevice device, Notification notification) {
    TinkerforgeValue newValue = (TinkerforgeValue) notification.getNewValue();
    String uid = device.getUid();
    String subId = null;
    if (device instanceof MSubDevice<?>) {
        subId = ((MSubDevice<?>) device).getSubId();
        logger.trace("{} Notifier found MSubDevice sensor value for: {}", LoggerConstants.TFMODELUPDATE, subId);
    } else {
        logger.trace("{} Notifier found mDevice sensor value for: {}", LoggerConstants.TFMODELUPDATE, uid);
    }
    postUpdate(uid, subId, newValue);
}
Also used : TinkerforgeValue(org.openhab.binding.tinkerforge.internal.types.TinkerforgeValue) MSubDevice(org.openhab.binding.tinkerforge.internal.model.MSubDevice)

Aggregations

TinkerforgeValue (org.openhab.binding.tinkerforge.internal.types.TinkerforgeValue)2 MSubDevice (org.openhab.binding.tinkerforge.internal.model.MSubDevice)1