114115116117118119120121122123124
String command = StringUtils.trim(configParts[0]); String tvId = StringUtils.trim(configParts[1]); String tvCommand = StringUtils.trim(configParts[2]); Key key = Key.valueOf(tvCommand); if (key == null) { throw new BindingConfigParseException("Unregonized value '" + tvCommand + "'"); }
4546474849505152535455
RemoteSession remoteController = null; try { remoteController = RemoteSession.create("openHAB", "openHAB", ip, port); Key key = Key.valueOf(cmd); logger.debug("Try to send command: {}", cmd); remoteController.sendKey(key); } catch (Exception e) {