> Documentation index: https://developers.home.google.com/apis/ios/structure/llms.txt

The Hub Activation API lets you programmatically discover and activate
a Google Home hub. It is especially useful when the user has no other
way to activate a hub, as in the case of a hub that lacks a screen.

## Use the Hub Activation API

Using the Hub Activation API, you can build an app that can discover and
activate hubs. This API is implemented as methods on the `Home` class.

> [!WARNING]
> **Warning:** The [`Home`](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/Home.md.txt) hub management methods are restricted and aren't available for general use.

1. Identify any hub-capable devices on the Wi-Fi network:

   ```swift
   import GoogleHomeSDK

   // Find available hubs, with a 5-second timeout
   let hubs = try await home.discoverAvailableHubs(duration: .seconds(5))
   ```
2. Activate a hub-capable device:

   ```swift
   try await home.startHubActivation(hub)
   ```

   > [!NOTE]
   > **Note** : Once a hub-capable device becomes an active hub, it is no longer returned by the `discoverAvailableHubs()` method.