How to find connected devices
Use endpoint_query for lights, switches/plugs, cameras, thermostats, TVs/speakers, locks, robot vacuums, phones, iPhone, Apple Watch, Find My trackers, Photos/Drive filesystems and reminders. Device capabilities, not the product type alone, establish what you can do.
- Start with a focused name/category query, for example {"query":{"name":{"like":"phone"}}}. If a name search misses a known category, broaden to synonyms/manufacturer/capability, then an unfiltered inventory if necessary. Follow paginationContext.nextToken until matching results are covered. An unfiltered inventory is appropriate for organizing the whole account. If the host lists multiple authorized accounts, use account labels to choose likely candidates and do read-only discovery across relevant connections before saying a device or library is absent. One account's empty result does not establish another account's inventory. Copy the host-provided account selector; never invent a link/account ID or substitute ownerId to cross account boundaries. Retain the account that returned each endpoint/route ID for later calls; clarify account ambiguity before writing.
- Inspect routes, providerName, interfaces and declared commands. A repeated name is not proof of identity. Prefer the intended provider's current route-backed record; old reconnect records may have no routes. Tile/Alexa and Apple Find My trackers are not interchangeable battery sources. Lists without a name filter return whole devices. Parts of one device, for example a range's oven cavity and burners or a fridge's compartments, are listed in the parent's childEndpointIds; query each part by its exact endpointId. A name query also matches parts.
- Copy the full endpoint ID. Query that exact endpointId before constructing the documented control payload. Copy message IDs from messages and routeId from the selected provider. outboundMessages are outputs/events, not commands.
- For current state, expand only declared capabilities and set forceDeviceAttributeQuery=true. A metadata-only query reads no live state. A reading is current only when its
freshnessis FRESH. A STALE value is the last known state: report it with when it was observed (for example "Open as of 1 minute ago"), never as live and never as unknown; a forced read may refresh it. Only an error, a missing value or an invalid value is unknown. Never base a safety claim such as locked or off on a STALE value alone; state its age and suggest a forced read. UNREACHABLE establishes offline when FRESH; a STALE UNREACHABLE is the last known connectivity. Missing sample timestamps do not supply a measurement time. - For ambiguous identities or targets, ask which one. Do not rename, merge or delete endpoint records merely to answer a state question.
For camera images use control with the declared get-snapshot message, payload {"responseFormat":"BASE64"} and waitForResult=true and read the cameras guide. For temperature read the temperature guide: use temperature-sensor ambient measurements rather than thermostat setpoints, and clarify indoor versus outdoor when context is ambiguous. Echo/Alexa endpoints may be VOICE_ASSISTANT with media-player and speaker capabilities; inspect commands before denying music control. For lock/PIN or other sensitive controls inspect the documented payload fields and follow user authorization. Use the lighting, battery, files, media or rooms guide for those workflows.