public function SetSpdifInput($input_instance) { $ip = $this->ReadPropertyString("IPAddress"); $timeout = $this->ReadPropertyString("TimeOut"); if ($timeout && Sys_Ping($ip, $timeout) != true) { throw new Exception("Sonos Box " . $ip . " is not available"); } if (@GetValue($this->GetIDForIdent("MemberOfGroup"))) { $this->SetGroup(0); } include_once __DIR__ . "/sonosAccess.php"; $sonos = new SonosAccess($ip); $sonos->SetAVTransportURI("x-sonos-htastream:" . IPS_GetProperty($input_instance, "RINCON") . ":spdif"); $sonos->Play(); }