Search in sources :

Example 1 with Method

use of org.openhab.binding.tellstick.internal.JNA.Method in project openhab1-addons by openhab.

the class TellstickBinding method refreshFromTellstick.

private void refreshFromTellstick() {
    logger.trace("Update with telldus state");
    for (TellstickBindingProvider prov : providers) {
        for (String name : prov.getItemNames()) {
            TellstickDevice dev = prov.getDevice(name);
            if (dev != null) {
                Method method = Method.getMethodById(dev.getStatus());
                sendToOpenHab(name, resolveCommand(method, dev.getData()));
            }
        }
    }
    lastRefresh = System.currentTimeMillis();
}
Also used : TellstickDevice(org.openhab.binding.tellstick.internal.device.TellstickDevice) Method(org.openhab.binding.tellstick.internal.JNA.Method) TellstickBindingProvider(org.openhab.binding.tellstick.TellstickBindingProvider)

Aggregations

TellstickBindingProvider (org.openhab.binding.tellstick.TellstickBindingProvider)1 Method (org.openhab.binding.tellstick.internal.JNA.Method)1 TellstickDevice (org.openhab.binding.tellstick.internal.device.TellstickDevice)1