Hue Namespace Reference

Classes

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

Typedefs

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

Enumerations

enum  Model { Model::LWB004, Model::LWB007 }
 
enum  Error { Error::XX }
 
enum  Status { Status::success, Status::pending, Status::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)
 

Detailed Description

Bridge.h

Copyright 2019 mikee47 mike@.nosp@m.sill.nosp@m.yhous.nosp@m.e.ne.nosp@m.t

This file is part of the HueEmulator Library

This library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 or later.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this library. If not, see https://www.gnu.org/licenses/.

ColourDevice.h

Copyright 2019 mikee47 mike@.nosp@m.sill.nosp@m.yhous.nosp@m.e.ne.nosp@m.t

This file is part of the HueEmulator Library

This library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 or later.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this library. If not, see https://www.gnu.org/licenses/.

DeviceList.h

Copyright 2019 mikee47 mike@.nosp@m.sill.nosp@m.yhous.nosp@m.e.ne.nosp@m.t

This file is part of the HueEmulator Library

This library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 or later.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this library. If not, see https://www.gnu.org/licenses/.

DimmableDevice.h

Copyright 2019 mikee47 mike@.nosp@m.sill.nosp@m.yhous.nosp@m.e.ne.nosp@m.t

This file is part of the HueEmulator Library

This library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 or later.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this library. If not, see https://www.gnu.org/licenses/.

OnOffDevice.h

Copyright 2019 mikee47 mike@.nosp@m.sill.nosp@m.yhous.nosp@m.e.ne.nosp@m.t

This file is part of the HueEmulator Library

This library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 or later.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this library. If not, see https://www.gnu.org/licenses/.

Stats.h - Maintain useful statistics for actions performed by a Hue Bridge

Copyright 2019 mikee47 mike@.nosp@m.sill.nosp@m.yhous.nosp@m.e.ne.nosp@m.t

This file is part of the HueEmulator Library

This library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 or later.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this library. If not, see https://www.gnu.org/licenses/.

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 occured 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 ( Error  error)

◆ toString() [2/4]

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

◆ toString() [3/4]

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

◆ toString() [4/4]

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