Source:
protected void internalReceiveUpdate(String itemName, State newState) { logger.debug("internalReceiveUpdate({},{}) is called!", itemName, newState); for (PowerDogLocalApiBindingProvider provider : providers) { if (!provider.providesBindingFor(itemName)) continue; if (provider.getOutBindingItemNames().contains(itemName)) { Long lastUpdateTimeStamp = lastUpdateMap.get(itemName); if (lastUpdateTimeStamp == null) { lastUpdateTimeStamp = 0L; } long age = System.currentTimeMillis() - lastUpdateTimeStamp; boolean itemMayUpdate = (age >= provider .getRefreshInterval(itemName)); if (itemMayUpdate) { String value = "0"; if (newState instanceof OnOffType) { if (newState == OnOffType.ON) value = "1"; } else if (newState instanceof OpenClosedType) { if (newState == OpenClosedType.OPEN) value = "1"; } else if (newState instanceof PercentType) { value = newState.toString(); } else if (newState instanceof DecimalType) { value = newState.toString(); } String unit = provider.getServerId(itemName); PowerDogLocalApiServerConfig server = serverList.get(unit); try { logger.debug("PowerDogLocalApi sending to PowerDog"); PowerDog powerdog = (PowerDog) XmlRpcProxy.createProxy( server.url(), "", new Class[] { PowerDog.class }, false); XmlRpcStruct response = powerdog.setLinearSensorDevice( server.password, provider.getValueId(itemName), value); lastUpdateMap.put(itemName, System.currentTimeMillis()); logger.debug("PowerDog.setLinearSensorDevice() result: " + response.toString()); } catch (Exception e) { logger.warn("PowerDogLocalApi sending to PowerDog failed"); logger.warn(e.getMessage()); } } } } }

Target:
protected void internalReceiveUpdate(String itemName, State newState) { logger.debug("internalReceiveUpdate({},{}) is called!", itemName, newState); for (PowerDogLocalApiBindingProvider provider : providers) { if (!provider.providesBindingFor(itemName)) { continue; } if (provider.getOutBindingItemNames().contains(itemName)) { Long lastUpdateTimeStamp = lastUpdateMap.get(itemName); if (lastUpdateTimeStamp == null) { lastUpdateTimeStamp = 0L; } long age = System.currentTimeMillis() - lastUpdateTimeStamp; boolean itemMayUpdate = (age >= provider.getRefreshInterval(itemName)); if (itemMayUpdate) { String value = "0"; if (newState instanceof OnOffType) { if (newState == OnOffType.ON) { value = "1"; } } else if (newState instanceof OpenClosedType) { if (newState == OpenClosedType.OPEN) { value = "1"; } } else if (newState instanceof PercentType) { value = newState.toString(); } else if (newState instanceof DecimalType) { value = newState.toString(); } String unit = provider.getServerId(itemName); PowerDogLocalApiServerConfig server = serverList.get(unit); try { logger.debug("PowerDogLocalApi sending to PowerDog"); PowerDog powerdog = (PowerDog) XmlRpcProxy.createProxy(server.url(), "", new Class[] { PowerDog.class }, false); XmlRpcStruct response = powerdog.setLinearSensorDevice(server.password, provider.getValueId(itemName), value); lastUpdateMap.put(itemName, System.currentTimeMillis()); logger.debug("PowerDog.setLinearSensorDevice() result: {}", response.toString()); } catch (Exception e) { logger.warn("PowerDogLocalApi sending to PowerDog failed"); logger.warn(e.getMessage()); } } } } }