get_homekit_code
Get the HomeKit setup code from a discovered WeMo device to add it to Apple Home. Input device name or IP to retrieve the code in XXX-XX-XXX format.
Instructions
Get the HomeKit setup code for a WeMo device.
Retrieves the HomeKit setup code (HKSetupCode) for devices that support HomeKit integration. This code can be used to add the device to Apple Home. The device must have been discovered via scan_network first.
Note: Not all WeMo devices support HomeKit. If a device doesn't support HomeKit or doesn't have a setup code, an error will be returned.
Args:
device_identifier: Device name (e.g., "Office Light") or IP address (e.g., "192.168.1.100")Returns:
Dictionary containing:
- success: Boolean indicating if the code was retrieved
- device_name: Name of the device
- homekit_code: The HomeKit setup code (format: XXX-XX-XXX)
- device_ip: IP address of the deviceInput Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device_identifier | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||