« Back to Product

Documentation

YC_SearchDevices

Require: IP-Symcon >= 5.3

 array YC_SearchDevices (int $InstanceID, string $SearchTarget) 

Parameters

InstanceID

ID of the SSDP control to be requested

SearchTarget

.

Returns

Returns all information about found devices as an array.

Description

Sends a request via the SSDP Control with the ID InstanceID and the matching search target SearchTarget.

---param2---

SearchTarget Description
"ssdp:all" All devices responding to the SSDP
"upnp:rootdevice" All devices with the subtype "rootdevice"
"uuid:<UID>" All devices with unique ID UID
"urn:<URN>" All devices with the unique URN URN

Example

YC_SearchDevices(27253, "ssdp:all");
 
// Sample output
var_dump(YC_SearchDevices(27253, "ssdp:all"));
/*
array(97) {
[...]
    [11]=>
    array(9) {
        ["CacheControl"]=>
        string(14) "max-age = 1800"
        ["Date"]=>
        string(0) ""
        ["Ext"]=>
        string(0) ""
        ["Location"]=>
        string(52) "http://172.17.31.142:1400/xml/device_description.xml"
        ["Server"]=>
        string(38) "Linux UPnP/1.0 Sonos/53.2-70210 (ZPS5)"
        ["ST"]=>
        string(47) "urn:schemas-upnp-org:service:DeviceProperties:1"
        ["USN"]=>
        string(78) "uuid:RINCON_000E58507DEA01400::urn:schemas-upnp-org:service:DeviceProperties:1"
        ["Fields"]=>
        array(5) {
            [0]=>
            string(52) "X-RINCON-HOUSEHOLD: HHID_tZkieK2lkPYES3tycishsbwfXIz"
        [1]=>
        string(21) "X-RINCON-BOOTSEQ: 636"
        [2]=>
        string(20) "X-RINCON-WIFIMODE: 0"
        [3]=>
        string(19) "X-RINCON-VARIANT: 0"
        [4]=>
        string(83) "HOUSEHOLD.SMARTSPEAKER.AUDIO: HHID_tZkieK2lkPYES3tycishsbwfXIz.hPqvaa7W35eMY2P3XidJ"
    }
    ["IPv4"]=>
    string(13) "172.17.31.142"
    )
[...]
}
*/
Any questions?