Skip to main content

build_read_request

Function build_read_request 

Source
pub fn build_read_request(ids: &[(u64, u64)]) -> String
Expand description

Build the path+query for GET /characteristics?id=....

ids is a list of (aid, iid) pairs. The query is rendered in the order given, comma-joined, e.g. /characteristics?id=1.9,1.10.

This deliberately does NOT request meta=1: a value read returns only the values, and the controller types them from the accessory database fetched via parse_accessories. Per-read meta=1 responses are unreliable across accessories — some shipping HomeKit firmware (e.g. LIFX) serializes the metadata fields as malformed JSON — so metadata is sourced from the well-formed /accessories tree instead.