public final class Hue extends Object
| Modifier and Type | Class | Description |
|---|---|---|
static class |
Hue.HueBridgeConnectionBuilder |
| Constructor | Description |
|---|---|
Hue(HueBridgeProtocol protocol,
String bridgeIp,
String apiKey) |
A basic constructor for initializing the Hue Bridge connection for this library.
|
Hue(String bridgeIp,
String apiKey) |
The basic constructor for initializing the Hue Bridge connection for this library.
|
| Modifier and Type | Method | Description |
|---|---|---|
Collection<DaylightSensor> |
getDaylightSensors() |
Returns all the daylight sensors configured into the Bridge.
|
Optional<DimmerSwitch> |
getDimmerSwitchByName(String switchName) |
Returns a specific dimmer switch by its name.
|
Collection<DimmerSwitch> |
getDimmerSwitches() |
Returns all the dimmer switches configured into the Bridge.
|
Optional<MotionSensor> |
getMotionSensorByName(String sensorName) |
Returns a specific motion sensor by its name.
|
Collection<MotionSensor> |
getMotionSensors() |
Returns all the motion sensors configured into the Bridge.
|
Root |
getRaw() |
Returns the raw root node information of the REST API.
|
Optional<Room> |
getRoomByName(String roomName) |
Returns a specific room by its name.
|
Collection<Room> |
getRooms() |
Returns all the rooms configured into the Bridge.
|
Optional<TemperatureSensor> |
getTemperatureSensorByName(String sensorName) |
Returns a specific temperature sensor by its name.
|
Collection<TemperatureSensor> |
getTemperatureSensors() |
Returns all the temperature sensors configured into the Bridge.
|
Collection<Sensor> |
getUnknownSensors() |
Returns all the sensors configured into the Bridge.
|
Optional<Room> |
getZoneByName(String zoneName) |
Returns a specific zone by its name.
|
Collection<Room> |
getZones() |
Returns all the zones configured into the Bridge.
|
static Hue.HueBridgeConnectionBuilder |
hueBridgeConnectionBuilder(String bridgeIp) |
The method to be used if you do not have an API key for your application yet.
|
void |
refresh() |
Refreshes the room, lamp, etc.
|
public Hue(String bridgeIp, String apiKey)
hueBridgeConnectionBuilder method if you do not have an API key yet.bridgeIp - The IP address of the Hue Bridge.apiKey - The API key of your application.public Hue(HueBridgeProtocol protocol, String bridgeIp, String apiKey)
hueBridgeConnectionBuilder method if you do not have an API key yet.protocol - The desired protocol for the Bridge connection. HTTP or UNVERIFIED_HTTPS,
as the certificate that the Bridge uses cannot be verified. Defaults to HTTP
when using the other constructor.bridgeIp - The IP address of the Hue Bridge.apiKey - The API key of your application.public void refresh()
public Collection<Room> getRooms()
public Collection<Room> getZones()
public Optional<Room> getRoomByName(String roomName)
roomName - The name of a roomOptional.empty() if a room with the given name does not exist.public Optional<Room> getZoneByName(String zoneName)
zoneName - The name of a zoneOptional.empty() if a zone with the given name does not exist.public Root getRaw()
public Collection<Sensor> getUnknownSensors()
public Collection<TemperatureSensor> getTemperatureSensors()
public Collection<DimmerSwitch> getDimmerSwitches()
public Collection<MotionSensor> getMotionSensors()
public Collection<DaylightSensor> getDaylightSensors()
public Optional<TemperatureSensor> getTemperatureSensorByName(String sensorName)
sensorName - The name of a sensorOptional.empty() if a sensor with the given name does not exist.public Optional<MotionSensor> getMotionSensorByName(String sensorName)
sensorName - The name of a sensorOptional.empty() if a sensor with the given name does not exist.public Optional<DimmerSwitch> getDimmerSwitchByName(String switchName)
switchName - The name of a switchOptional.empty() if a dimmer switch with the given name does not exist.public static Hue.HueBridgeConnectionBuilder hueBridgeConnectionBuilder(String bridgeIp)
HueBridgeConnectionBuilder that initializes the process of
adding a new application to the Bridge.bridgeIp - The IP address of the Bridge.Copyright © 2019. All rights reserved.