use of org.teleal.cling.model.meta.Service in project openhab1-addons by openhab.
the class SonosZonePlayer method updateMediaInfo.
public boolean updateMediaInfo() {
if (isConfigured()) {
Service service = device.findService(new UDAServiceId("AVTransport"));
Action action = service.getAction("GetMediaInfo");
ActionInvocation invocation = new ActionInvocation(action);
try {
invocation.setInput("InstanceID", "0");
} catch (InvalidValueException ex) {
logger.error("Action Invalid Value Exception {}", ex.getMessage());
} catch (NumberFormatException ex) {
logger.error("Action Invalid Value Format Exception {}", ex.getMessage());
}
executeActionInvocation(invocation);
return true;
}
return false;
}
use of org.teleal.cling.model.meta.Service in project openhab1-addons by openhab.
the class SonosZonePlayer method next.
public boolean next() {
if (isConfigured()) {
Service service = device.findService(new UDAServiceId("AVTransport"));
Action action = service.getAction("Next");
ActionInvocation invocation = new ActionInvocation(action);
executeActionInvocation(invocation);
return true;
} else {
return false;
}
}
use of org.teleal.cling.model.meta.Service in project openhab1-addons by openhab.
the class SonosZonePlayer method updateCurrentZoneName.
public boolean updateCurrentZoneName() {
if (isConfigured()) {
Service service = device.findService(new UDAServiceId("DeviceProperties"));
Action action = service.getAction("GetZoneAttributes");
ActionInvocation invocation = new ActionInvocation(action);
executeActionInvocation(invocation);
return true;
} else {
return false;
}
}
use of org.teleal.cling.model.meta.Service in project openhab1-addons by openhab.
the class SonosZonePlayer method becomeStandAlonePlayer.
public boolean becomeStandAlonePlayer() {
if (isConfigured()) {
Service service = device.findService(new UDAServiceId("AVTransport"));
Action action = service.getAction("BecomeCoordinatorOfStandaloneGroup");
ActionInvocation invocation = new ActionInvocation(action);
executeActionInvocation(invocation);
return true;
} else {
return false;
}
}
use of org.teleal.cling.model.meta.Service in project openhab1-addons by openhab.
the class SonosZonePlayer method saveQueue.
public boolean saveQueue(String name, String queueID) {
if (name != null && queueID != null && isConfigured()) {
Service service = device.findService(new UDAServiceId("AVTransport"));
Action action = service.getAction("SaveQueue");
ActionInvocation invocation = new ActionInvocation(action);
try {
invocation.setInput("Title", name);
invocation.setInput("ObjectID", queueID);
} catch (InvalidValueException ex) {
logger.error("Action Invalid Value Exception {}", ex.getMessage());
} catch (NumberFormatException ex) {
logger.error("Action Invalid Value Format Exception {}", ex.getMessage());
}
executeActionInvocation(invocation);
return true;
} else {
return false;
}
}
Aggregations