FauxmoESP v2.0.0
Loading...
Searching...
No Matches
Light Struct Reference

Detailed Description

Represents a light device that can be controlled by the Hue API.

Definition at line 12 of file Light.h.

#include <Light.h>

Public Member Functions

 Light (const String &deviceName, uint deviceId)
 Creates a new light device.
 
String toJson () const
 Converts the light device to a JSON string.
 

Public Attributes

String name
 The name of the device.
 
ushort deviceId
 The id of the device.
 
char uniqueId [DEVICE_UNIQUE_ID_LENGTH] {}
 Unique id of the device.
 
LightState state = LightState()
 The current state of the device.
 
LightCapabilities capabilities = LightCapabilities()
 The capabilities of the device.
 
String type = "Extended color light"
 The type of the device.
 
String modelid = "LCT015"
 The model id of the device.
 
String manufacturername = "FauxmoESP"
 The manufacturer name of the device.
 
String productname = "E4"
 The product name of the device.
 
String swversion = "5.105.0.21169"
 The software version of the device.
 

Constructor & Destructor Documentation

◆ Light()

Light::Light ( const String &  deviceName,
uint  deviceId 
)

Creates a new light device.

Parameters
deviceNameThe name of the device.
deviceIdThe id of the device.

Definition at line 14 of file Light.cpp.

Member Function Documentation

◆ toJson()

String Light::toJson ( ) const

Converts the light device to a JSON string.

Returns
The JSON string.

Definition at line 25 of file Light.cpp.

Member Data Documentation

◆ capabilities

LightCapabilities Light::capabilities = LightCapabilities()

The capabilities of the device.

Definition at line 47 of file Light.h.

◆ deviceId

ushort Light::deviceId

The id of the device.

Max possible is FF:FF -> 65535 (MAX_DEVICES)

Definition at line 30 of file Light.h.

◆ manufacturername

String Light::manufacturername = "FauxmoESP"

The manufacturer name of the device.

Default: FauxmoESP

Definition at line 65 of file Light.h.

◆ modelid

String Light::modelid = "LCT015"

The model id of the device.

Default: LCT015

Definition at line 59 of file Light.h.

◆ name

String Light::name

The name of the device.

Definition at line 24 of file Light.h.

◆ productname

String Light::productname = "E4"

The product name of the device.

Default: E4

Definition at line 71 of file Light.h.

◆ state

LightState Light::state = LightState()

The current state of the device.

Definition at line 42 of file Light.h.

◆ swversion

String Light::swversion = "5.105.0.21169"

The software version of the device.

Default: 5.105.0.21169

Definition at line 77 of file Light.h.

◆ type

String Light::type = "Extended color light"

The type of the device.

Default: Extended color light

Definition at line 53 of file Light.h.

◆ uniqueId

char Light::uniqueId[DEVICE_UNIQUE_ID_LENGTH] {}

Unique id of the device.

The MAC address of the device with a unique endpoint id in the form: AA:BB:CC:DD:EE:FF:00:11-XX

Definition at line 37 of file Light.h.


The documentation for this struct was generated from the following files: