# ReachableDevicesHandler | Local Home SDK

# - [smarthome](https://developers.home.google.com/reference/local-home/modules/smarthome.html).
- [IntentFlow](https://developers.home.google.com/reference/local-home/modules/smarthome.intentflow.html).
- ReachableDevicesHandler

Callback registered with the [App](https://developers.home.google.com/reference/local-home/classes/smarthome.app.html) via [App.onReachableDevices](https://developers.home.google.com/reference/local-home/classes/smarthome.app.html#onreachabledevices) to
discover additional devices connected to a proxy or hub.

When a device that is discovered by the [IdentifyHandler](https://developers.home.google.com/reference/local-home/interfaces/smarthome.intentflow.identifyhandler) is a proxy
which enables indirect access to other devices (identified by the
[isProxy](https://developers.home.google.com/reference/local-home/interfaces/smarthome.intentflow.identifyresponsepayload#device) flag in the
[IdentifyResponse](https://developers.home.google.com/reference/local-home/modules/smarthome.intentflow.html#identifyresponse)), the local home platform sends a
`REACHABLE_DEVICES` intent to discover the additional devices visible
to the proxy.

To learn more about how the platform verifies reachable devices,
see the [developer guide](https://developers.home.google.com/local-home/overview).

    const devicesHandler = (request: IntentFlow.ReachableDevicesRequest):
      IntentFlow.ReachableDevicesResponse => {

        // Reference to the local proxy device
        const proxyDevice = request.inputs[0].payload.device.proxyDevice;

        // Query local proxy device for additional visible ids
        // ...
        const reachableDevices = [
          // Each verificationId must match one of the otherDeviceIds
          // in the SYNC response
          { verificationId: "local-device-id-1" },
          { verificationId: "local-device-id-2" },
        ];

        // Return a response
        const response: IntentFlow.ReachableDevicesResponse = {
          intent: Intents.REACHABLE_DEVICES,
          requestId: request.requestId,
          payload: {
            devices: reachableDevices,
          },
        };
        return response;
      };

### Callable

- __call ( request : [ReachableDevicesRequest](https://developers.home.google.com/reference/local-home/modules/smarthome.intentflow.html#reachabledevicesrequest) ) : Promise \< [ReachableDevicesResponse](https://developers.home.google.com/reference/local-home/modules/smarthome.intentflow.html#reachabledevicesresponse) \> \| [ReachableDevicesResponse](https://developers.home.google.com/reference/local-home/modules/smarthome.intentflow.html#reachabledevicesresponse)
- Callback function for the intent.

  Implement this function to handle each intent request and return
  a response.

  #### Parameters

  -

    ##### request: [ReachableDevicesRequest](https://developers.home.google.com/reference/local-home/modules/smarthome.intentflow.html#reachabledevicesrequest)

  #### Returns Promise\<[ReachableDevicesResponse](https://developers.home.google.com/reference/local-home/modules/smarthome.intentflow.html#reachabledevicesresponse)\> \| [ReachableDevicesResponse](https://developers.home.google.com/reference/local-home/modules/smarthome.intentflow.html#reachabledevicesresponse)