use of org.openhab.binding.tellstick.TellstickBindingProvider in project openhab1-addons by openhab.
the class TellstickBinding method registerListeners.
private void registerListeners() {
for (TellstickBindingProvider prov : providers) {
prov.addListener(new TellstickDeviceEventHandler());
prov.addListener(new TellstickSensorEventHandler());
}
}
use of org.openhab.binding.tellstick.TellstickBindingProvider 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();
}
Aggregations