Join us online for the "Hey Google" Smart Home Summit on July 8th! Register here to learn what's new, and what's coming up for Google Smart Home.

Data payload returned with a UPnP scan result. For UPnP discovery, the platform initiates an M-SEARCH request according to Simple Service Discovery Protocol (SSDP) and returns devices or services matching your scan configuration. The scan data contains the search response from the local device.

const identifyHandler = (request: IntentFlow.IdentifyRequest):
  Promise<IntentFlow.IdentifyResponse> => {

    // Obtain scan data from protocol defined in your scan config
    const device = request.inputs[0].payload.device;
    const scanData = device.upnpScanData;

    // UUID advertised by the device over UPnP
    const localDeviceId = scanData.deviceId;

    // Path to the UPnP device description
    const deviceDescription = scanData.location;
    ...
  };

Index

Properties

deviceId

deviceId: string

UUID provided in the USN field of the search response.

Optional deviceType

deviceType: undefined | string

Device type provided in the ST field of the search response. Present only if the search request includes a device type.

location

location: string

Path component of the URL returned in the LOCATION header.

port

port: number

Port component of the URL returned in the LOCATION header.

Optional serviceType

serviceType: undefined | string

Service type provided in the ST field of the search response. Present only if the search request includes a service type.