wyze_device_info
Retrieve detailed information about a specific Wyze smart home device using its MAC address to access device status and properties.
Instructions
Get detailed information about a specific Wyze device by MAC address
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device_mac | Yes |
Implementation Reference
- src/mcp_wyze_server/server.py:91-117 (handler)The handler function for the 'wyze_device_info' tool. It uses the Wyze SDK to list devices and find the one matching the provided MAC address, returning detailed device information or an error if not found.@mcp.tool() def wyze_device_info(device_mac: str) -> Dict[str, Any]: """Get detailed information about a specific Wyze device by MAC address""" try: client = get_wyze_client() devices = client.devices_list() for device in devices: if device.mac == device_mac: device_info = { "mac": str(device.mac) if device.mac else "Unknown", "nickname": str(device.nickname) if device.nickname else "Unknown", "product_model": str(getattr(device, 'product_model', 'Unknown')) if getattr(device, 'product_model', 'Unknown') else "Unknown", "product_type": str(getattr(device, 'product_type', 'Unknown')) if getattr(device, 'product_type', 'Unknown') else "Unknown", "is_online": bool(getattr(device, 'is_online', True)), "firmware_ver": str(getattr(device, 'firmware_ver', 'N/A')), "device_model": str(getattr(device, 'device_model', 'Unknown')), } return {"status": "success", "device": device_info} return {"status": "error", "message": f"Device with MAC {device_mac} not found"} except WyzeClientConfigurationError as e: return {"status": "error", "message": f"Configuration error: {str(e)}"} except WyzeRequestError as e: return {"status": "error", "message": f"API error: {str(e)}"} except Exception as e: return {"status": "error", "message": f"Unexpected error: {str(e)}"}