}
     $cmd = $sonos->getCmd(null, 'play_radio');
     $cmd->execCmd(array('title' => init('radio')));
     ajax::success();
 }
 if (init('action') == 'addSpeaker') {
     $sonos = sonos3::byId(init('id'));
     if (!is_object($sonos)) {
         ajax::success();
     }
     $cmd = $sonos->getCmd(null, 'add_speaker');
     $cmd->execCmd(array('title' => init('speaker')));
     ajax::success();
 }
 if (init('action') == 'removeSpeaker') {
     $sonos = sonos3::byId(init('id'));
     if (!is_object($sonos)) {
         ajax::success();
     }
     $cmd = $sonos->getCmd(null, 'remove_speaker');
     $cmd->execCmd(array('title' => init('speaker')));
     ajax::success();
 }
 if (init('action') == 'getSonos') {
     if (init('object_id') == '') {
         $object = object::byId($_SESSION['user']->getOptions('defaultDashboardObject'));
     } else {
         $object = object::byId(init('object_id'));
     }
     if (!is_object($object)) {
         $object = object::rootObject();