Hue Namespace Reference

Classes

struct  User
 Information about user. More...
 
class  Bridge
 
class  ColourDevice
 
class  Device
 
class  DeviceListEnumerator
 
class  DimmableDevice
 
class  OnOffDevice
 
struct  Stats
 

Typedefs

using UserMap = HashMap< String, User >
 List of users, key is user name. More...
 
using DeviceList = Vector< Device >
 

Enumerations

enum class  Model { LWB004 , LWB007 }
 
enum class  Error { XX }
 
enum class  Status { success , pending , error }
 Status of a setAttribute request. More...
 

Functions

String toString (Error error)
 
JsonObject createSuccess (JsonDocument &result)
 
JsonObject createError (JsonDocument &result, const String &path, Error error, String description)
 
String toString (Device::Attribute attr)
 
String toString (Device::Attributes attr)
 
bool fromString (const char *tag, Device::Attribute &attr)
 
String toString (Device::ColorMode mode)
 

Typedef Documentation

◆ DeviceList

using Hue::DeviceList = typedef Vector<Device>

◆ UserMap

using Hue::UserMap = typedef HashMap<String, User>

List of users, key is user name.

Enumeration Type Documentation

◆ Error

enum Hue::Error
strong
Enumerator
XX 

◆ Model

enum Hue::Model
strong
Enumerator
LWB004 

Dimmable white.

LWB007 

Colour.

◆ Status

enum Hue::Status
strong

Status of a setAttribute request.

Enumerator
success 

The action was performed immediately without error.

pending 

The action was accepted but requires further processing.

Use this to perform requests asynchronously. You MUST invoked the provided Callback function to complete the request.

When controlling remote devices, for example connected via serial link, you might issue the command immediately and then return pending. When the serial response is received, or a timeout occurs, then the request can be completed. Note that the error code passed to the callback is optional and will be specific to your application: it will be output in verbose debug mode so may be useful.

error 

Action could not be completed.

If the Attribute not supported by your device, or an internal I/O error occurred then return this value.

Function Documentation

◆ createError()

JsonObject Hue::createError ( JsonDocument &  result,
const String path,
Error  error,
String  description 
)

◆ createSuccess()

JsonObject Hue::createSuccess ( JsonDocument &  result)

◆ fromString()

bool Hue::fromString ( const char *  tag,
Device::Attribute attr 
)

◆ toString() [1/4]

String Hue::toString ( Device::Attribute  attr)

◆ toString() [2/4]

String Hue::toString ( Device::Attributes  attr)

◆ toString() [3/4]

String Hue::toString ( Device::ColorMode  mode)

◆ toString() [4/4]

String Hue::toString ( Error  error)