Skip to content

Random Notes

ebaauw edited this page Feb 18, 2017 · 2 revisions

Supported Devices Supported Hue bridge attributes Supported HomeKit Characteristics

References

See the Hue Developer's portal for an overview of the types of sensors, lights, and luminaires, supported by the Hue bridge.

See the Homekit API Reference for an overview of HomeKit services and characteristics. Alternatively, you might want to have a look at Apple's HomeKit Accessory Simulator, which is distributed a an additional tool for XCode.

See Hap-NodeJS for an overview of the HomeKit services and characteristics supported by homebridge.

Devices and Hue Bridge Resources

Through the Hue API, a Hue bridge provides access to paired devices, like lights, sensors, and switches. Applications using this RESTful API, like homebridge-hue, connect to the Hue bridge over the Internet protocol (TCP/IP). The Hue bridge communicates with these paired devices over the ZigBee network protocol. There is no direct connection between homebridge-hue and Hue-connected lights, sensors, or switches; the Hue "bridge" acts as a gateway, translating API calls to ZigBee messages. For each paired device, the Hue bridge provides a RESTful resource, a light or sensor, to interact with the device.

Not all resources provided through the API correspond to paired devices, though. The bridge config, CLIP sensors, groups, schedules, rules, scenes, resourcelinks, and capabilities are implemented on the bridge.

Some devices, like the Hue motion sensor, some Hue lamps (like the Hue Beyond), and some dresden elektronik wireless ballasts (like the FLS-PP lp) contain multiple sensors or lights, requiring multiple Hue bridge resources.

HomeKit Accessories

HomeKit is best understood as a distributed database on iPhones, iPads, and/or AppleTVs linked to the same iCloud account. This database contains the configuration and state of your virtual home. These are synced continuously between the iPhones/iPads/AppleTV over iCloud. A HomeKit app communicates with this database using the HomeKit API.

A HomeKit accessory corresponds to a physical device, accessible to HomeKit. It can be placed in a room. An iPhone/iPad/AppleTV communicates with a HomeKit accessory, using the HomeKit Accessory Protocol, HAP, over the Internet protocol (TCP/IP) or Bluetooth Low Energy. The documentation for HAP is available only to Apple's MFI partners, under strict non-disclosure. Luckily this protocol has been reverse-engineered and implemented in HAP-NodeJS, on which homebridge is based. While there is a direct connection between an iPhone/iPad/AppleTV and a HomeKit accessory, there is no direct communication between a HomeKit app and a HomeKit accessory; they communicate by sharing the same HomeKit database, synced over iCloud. This enables an AppleTV/iPad as Home Hub to communicate with a HomeKit accessory on behalf of a HomeKit app running on another iPhone/iPad, as long as both are connected to iCloud.

A HomeKit bridge is a HomeKit accessory that through its connection provides access to other, bridged, HomeKit accessories. Both the bridge and the bridged accessory communicate over HAP, but only the bridge needs to be paired with HomeKit. Note that homebridge provides both a bridge and the bridged accessories to HomeKit. A homebridge plugin, like homebridge-hue, acts as a gateway, translating HAP (through the homebridge API) to the native protocol of the supported device, in case of homebridge-hue: the Hue API.