Use the iOS sample app

The sample app showcases the basic capabilities of device access and control using the Home APIs for the device types it supports.

Once account authorization is complete and a structure has been selected, the sample app loads all local devices found in that structure. If the device is in a room, it will be listed under that room. The sample app supports these device types:

  • Color Temperature Light
  • Dimmable Light
  • Door Lock
  • Extended Color Light
  • Fan
  • Occupancy Sensor
  • On/Off Light
  • On/Off Plug-in Unit
  • Temperature Sensor
  • Thermostat
  • Window Covering

Actions on existing devices and automations

The sample app consists of two tabs - Devices and Automations. Each tab provides information about the structure and lets you perform tasks.

Devices tab

The Devices tab (Figure 1) shows the rooms in the structure (Bathroom, Den, Office) and the devices for each room, along with the status of each device. You can also disconnect your device or update permissions by clicking the more_horiz icon at the top right of the screen (Figure 2).

Devices tab of the Home iOS APIs sample app.
Figure 1: Devices tab view
Device controls of the Home iOS APIs sample app.
Figure 2: Disconnect or update permissions

Automations tab

The Automations tab (Figure 3) shows a list of all automations for the structure. Each automation shows its starters and actions. Multiple starters and actions are supported.

Tap an automation to view its details, as shown in the example in Figure 4. In this detailed view, you can see the detailed description of the starters, conditions, and actions.

Automations tab of the Home iOS APIs sample app.
Figure 3: Automations tab view
Detailed view of a selected automation.
Figure 4: Detailed automation view

Create an automation

To create a new automation, tap the +Add button from the automations list view (Figure 3). The next screen will show a list of suggested automations. Select the automation you want (Figure 5). If nothing auto-populates, then the structure doesn't contain the sufficient devices needed for automation. For example, if you would like to turn on the fan and light, the structure should contain both the fan and light devices, otherwise the automations will not display.

After selecting your automation, you will see the Starters, Conditions and Actions (Figure 6). Click Save to add your automation (Figure 7).

Sample app screen for suggested automations
Figure 5: Automation suggestions
Sample app screen of automation.
Figure 6: Save automation
Sample app screen of created automation.
Figure 7: Automation created

Edit an automation

To edit the Automation name and description, from the detailed automation view (Figure 4), click the settings icon and click Edit name (Figure 8). As shown in Figure 9, edit the name and description and go back once completed (Figure 8). To save, click the settings icon and then click Save.

Sample app screen for selecting edit name button.
Figure 8: Edit automation name
Sample app screen for editing name and description of automation.
Figure 9: Name and description editor

Delete an Automation

To delete an automation, go to the automation overview (Figure 7). Swipe left on the automation you want to delete and click the delete icon (Figure 10).

Sample app screen for deleting an automation.
Figure 10: Delete an automation

Generic automation editor

The generic editor lets you select any devices in the structure to use in starters and actions, with supporting traits as conditions, when creating automation scripts.

To add a generic automation, tap Generic Automation from the Automation Suggestions screen (Figure 5).

On the next screen, you can edit the name and description of the automation.

Add starter candidate

To add a starter candidate, tap Add Starter and Condition (Figure 11). The starter candidate screen displays available starters in the structure (Figure 12). Select one of the starter candidates to continue (Figure 13).

Add a starter.
Figure 11: Generic Editor screen
List of starters candidates.
Figure 12: List of starter candidates
Select a starter.
Figure 13: Select a starter

Select Turns on or off or Changes brightness (Figure 14 and Figure 15) and either toggle on or off or change the brightness. Once you are done with the configuration, tap Done to return to the generic editor screen. You will see your selected starter on the generic editor screen (Figure 16).

Turn lights on or off.
Figure 14: Turn the light on or off
Change brightness
Figure 15: Change brightness
List of starters.
Figure 16: Starter added

Add action candidate

To add an action candidate, tap Add Action (Figure 17). The Action Candidates screen displays available action candidates (Figure 18). Select one of the action candidates to continue (Figure 19).

Add action
Figure 17: Add action
List of action candidates
Figure 18: List of action candidates
Select an action.
Figure 19: Select an action
Turn lights on or off
Figure 20: LevelControlTrait is not supported for actions

Select Turns on or off and choose to have the device turn on or off. Tap Done to return to the generic editor screen (Figure 21). Tap Save to create the automation (Figure 22). Your automation will display on the automation tab (Figure 23).

Turn lights on or off
Figure 21: Turn the light on or off
Added starter and action.
Figure 22: Added starter and action
Generic automation created
Figure 23: Generic automation created