Skip to main content

List Devices

GET 

/devices

Paginated device information query, supporting filter by space, online status, associated gateway, device type, and device name. Filtering by protocol instance ID, instance name, public protocol type, and network protocol mask is supported.

Multiple values within the same list are combined with OR; multiple bits in the mask are OR’ed; different filter types and existing query conditions are combined with AND. Filtering is performed first, followed by totalCount calculation, sorting, and pagination.

If no filter is provided, the default behavior is preserved; if all three lists are empty, there’s no restriction; unknown values will not match. protocolNames requires a complete and case-sensitive match; Home Assistant does not match Home Assistant(1).

You may call /devices/filter-options first to obtain currently available instances; use the name for display, but we recommend using the stable id for persistent storage or specifying an instance. Protocol types are determined by server configuration, not all instances are required to have a type or networkProtocolMask. networkProtocolMask filters according to the type configuration of the instance, and does not read device's real-time NetworkProtocolSupport Trait. If omitted, there’s no restriction; if set to 0 or there’s no match, the result is empty.

For each device, protocolId and networkProtocolMask are returned if available: the former is the associated protocol instance ID, the latter is the complete configured mask for that instance type (bits are not trimmed to match the query). If there is no associated instance, both fields are omitted; if there is an instance but no configured mask, only protocolId is returned. For ordinary queries or those filtered only by instance ID/name, an invalid mapping will only omit the mask in the response; filtering by type or nonzero mask still requires valid configuration.

gatewayId—when omitted, empty, or contains only whitespace—does not participate in filtering; if a non-empty value is provided, leading and trailing whitespace are trimmed and an exact match is performed. Gateway filtering is applied together with other query conditions and takes effect before pagination.

Request​

Responses​

Request succeeded