HueSDK.Bridge (HueSDK v0.1.0) View Source
Interface to the Hue Bridge device, required to call functions in the HueSDK.API namespace.
Link to this section Summary
Types
A unique identifier to register with the Hue Bridge API.
Stateless struct containing Hue Bridge device information.
Functions
Authenticates a new devicetype/0 with the Hue Bridge REST API.
For authentication to succeed, the link button on the Hue Bridge
device must be pressed within 30 seconds of invoking this function.
Link to this section Types
Specs
devicetype() :: String.t()
A unique identifier to register with the Hue Bridge API.
Examples
"connorlay#huesdk"
Specs
t() :: %HueSDK.Bridge{
api_version: term(),
bridge_id: term(),
datastore_version: term(),
host: term(),
mac: term(),
model_id: term(),
name: term(),
sw_version: term(),
username: term()
}
Stateless struct containing Hue Bridge device information.
Examples
%HueSDK.Bridge{
api_version: "1.42.0",
bridge_id: "EGB5FAFAFE196528",
datastore_version: "99",
host: "192.168.1.2",
mac: "f0:dd:e5:1f:38:cd",
model_id: "BSB002",
name: "My Hue Bridge",
sw_version: "1943082030",
username: "Ht-Flaev-p7Vk5ryJinxKwlYdQupdEXL4c5lKLXL"
}
Link to this section Functions
Specs
authenticate(t(), devicetype()) :: t()
Authenticates a new devicetype/0 with the Hue Bridge REST API.
For authentication to succeed, the link button on the Hue Bridge
device must be pressed within 30 seconds of invoking this function.
Examples
HueSDK.Bridge.authenticate(bridge, "connorlay#huesdk")
%HueSDK.Bridge{
username: "Ht-Flaev-p7Vk5ryJinxKwlYdQupdEXL4c5lKLXL",
# ...
}