Categorygithub.com/openhue/openhue-go
modulepackage
0.3.0
Repository: https://github.com/openhue/openhue-go.git
Documentation: pkg.go.dev

# README

OpenHue Go

OpenHue Go Logo Medium Size

Build Maintainability Go Reference

Overview

OpenHue Go is a library written in Goland for interacting with the Philips Hue smart lighting systems. This project is based on the OpenHue API specification. Therefore, most of its code is automatically generated thanks to the oapi-codegen project.

Usage

Use the following command to import the library:

go get -u github.com/openhue/openhue-go

And check the following example that toggles all the rooms of your house:

package main

import (
	"fmt"
	"github.com/openhue/openhue-go"
	"log"
)

func main() {

	home, _ := openhue.NewHome(openhue.LoadConf())
	rooms, _ := home.GetRooms()

	for id, room := range rooms {

		fmt.Printf("> Toggling room %s (%s)\n", *room.Metadata.Name, id)

		for serviceId, serviceType := range room.GetServices() {

			if serviceType == openhue.ResourceIdentifierRtypeGroupedLight {
				groupedLight, _ := home.GetGroupedLightById(serviceId)

				home.UpdateGroupedLight(*groupedLight.Id, openhue.GroupedLightPut{
					On: groupedLight.Toggle(),
				})
			}
		}
	}
}

[!NOTE]
The openhue.LoadConf() function allows loading the configuration from the well-known configuration file. Please refer to this guide for more information.

Bridge Discovery

Bridge Discovery on the local network has been made easy through the BridgeDiscovery helper:

package main

import (
	"fmt"
	"github.com/openhue/openhue-go"
	"log"
	"time"
)

func main() {

	bridge, err := openhue.NewBridgeDiscovery(openhue.WithTimeout(1 * time.Second)).Discover()
	openhue.CheckErr(err)

	fmt.Println(bridge) // Output: Bridge{instance: "Hue Bridge - 1A3E4F", host: "ecb5fa1a3e4f.local.", ip: "192.168.1.xx"}
}

The BridgeDiscovery.Discover() function will first try to discover your local bridge via mDNS, and if that fails then it tries using discovery.meethue.com URL.

Options:

  • openhue.WithTimeout allows setting the mDNS discovery timeout. Default value is 5 seconds.
  • openhue.WithDisabledUrlDiscovery allows disabling the URL discovery.

Authentication

Bridge authentication has been make simple via the Authenticator interface:

package main

import (
	"fmt"
	"github.com/openhue/openhue-go"
	"time"
)

func main() {

	bridge, err := openhue.NewBridgeDiscovery(openhue.WithTimeout(1 * time.Second)).Discover()
	openhue.CheckErr(err)

	authenticator, err := openhue.NewAuthenticator(bridge.IpAddress)
	openhue.CheckErr(err)

	fmt.Println("Press the link button")

	var key string
	for len(key) == 0 {

		// try to authenticate
		apiKey, retry, err := authenticator.Authenticate()

		if err != nil && retry {
			// link button not pressed
			fmt.Printf(".")
			time.Sleep(500 * time.Millisecond)
		} else if err != nil && !retry {
			// there is a real error
			openhue.CheckErr(err)
		} else {
			key = apiKey
		}
	}

	fmt.Println("\n", key)
}

In this example, we wait until the link button is pressed on the bridge. The Authenticator.Authenticate() function returns three values:

  • apiKey string that is not empty when retry = false and err == nil
  • retry bool which indicates that the link button has not been pressed
  • err error which contains the error details

You can consider the authentication has failed whenever the retry value is false and the err is not nil.

License

GitHub License

OpenHue is distributed under the Apache License 2.0, making it open and free for anyone to use and contribute to. See the license file for detailed terms.

# Functions

CheckErr prints the msg with the prefix 'Error:' and exits with error code 1.
LoadConf looks up your Hue Bridge IP and Api Key from the well-known OpenHue standard configuration file.
NewAuthenticateRequest calls the generic Authenticate builder with application/json body.
NewAuthenticateRequestWithBody generates requests for Authenticate with any type of body.
No description provided by the author
No description provided by the author
Creates a new Client, with reasonable defaults.
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling.
NewCreateRoomRequest calls the generic CreateRoom builder with application/json body.
NewCreateRoomRequestWithBody generates requests for CreateRoom with any type of body.
NewCreateSceneRequest calls the generic CreateScene builder with application/json body.
NewCreateSceneRequestWithBody generates requests for CreateScene with any type of body.
NewCreateZoneRequest calls the generic CreateZone builder with application/json body.
NewCreateZoneRequestWithBody generates requests for CreateZone with any type of body.
NewDeleteDeviceRequest generates requests for DeleteDevice.
NewDeleteRoomRequest generates requests for DeleteRoom.
NewDeleteSceneRequest generates requests for DeleteScene.
NewDeleteZoneRequest generates requests for DeleteZone.
NewGetBridgeHomeRequest generates requests for GetBridgeHome.
NewGetBridgeHomesRequest generates requests for GetBridgeHomes.
NewGetBridgeRequest generates requests for GetBridge.
NewGetBridgesRequest generates requests for GetBridges.
NewGetDevicePowerRequest generates requests for GetDevicePower.
NewGetDevicePowersRequest generates requests for GetDevicePowers.
NewGetDeviceRequest generates requests for GetDevice.
NewGetDevicesRequest generates requests for GetDevices.
NewGetGroupedLightRequest generates requests for GetGroupedLight.
NewGetGroupedLightsRequest generates requests for GetGroupedLights.
NewGetLightLevelRequest generates requests for GetLightLevel.
NewGetLightLevelsRequest generates requests for GetLightLevels.
NewGetLightRequest generates requests for GetLight.
NewGetLightsRequest generates requests for GetLights.
NewGetMotionSensorRequest generates requests for GetMotionSensor.
NewGetMotionSensorsRequest generates requests for GetMotionSensors.
NewGetResourcesRequest generates requests for GetResources.
NewGetRoomRequest generates requests for GetRoom.
NewGetRoomsRequest generates requests for GetRooms.
NewGetSceneRequest generates requests for GetScene.
NewGetScenesRequest generates requests for GetScenes.
NewGetTemperatureRequest generates requests for GetTemperature.
NewGetTemperaturesRequest generates requests for GetTemperatures.
NewGetZoneRequest generates requests for GetZone.
NewGetZonesRequest generates requests for GetZones.
NewHome creates a new Home context that is able to manage your different Philips Hue devices.
No description provided by the author
NewUpdateBridgeRequest calls the generic UpdateBridge builder with application/json body.
NewUpdateBridgeRequestWithBody generates requests for UpdateBridge with any type of body.
NewUpdateDeviceRequest calls the generic UpdateDevice builder with application/json body.
NewUpdateDeviceRequestWithBody generates requests for UpdateDevice with any type of body.
NewUpdateGroupedLightRequest calls the generic UpdateGroupedLight builder with application/json body.
NewUpdateGroupedLightRequestWithBody generates requests for UpdateGroupedLight with any type of body.
NewUpdateLightLevelRequest calls the generic UpdateLightLevel builder with application/json body.
NewUpdateLightLevelRequestWithBody generates requests for UpdateLightLevel with any type of body.
NewUpdateLightRequest calls the generic UpdateLight builder with application/json body.
NewUpdateLightRequestWithBody generates requests for UpdateLight with any type of body.
NewUpdateMotionSensorRequest calls the generic UpdateMotionSensor builder with application/json body.
NewUpdateMotionSensorRequestWithBody generates requests for UpdateMotionSensor with any type of body.
NewUpdateRoomRequest calls the generic UpdateRoom builder with application/json body.
NewUpdateRoomRequestWithBody generates requests for UpdateRoom with any type of body.
NewUpdateSceneRequest calls the generic UpdateScene builder with application/json body.
NewUpdateSceneRequestWithBody generates requests for UpdateScene with any type of body.
NewUpdateTemperatureRequest calls the generic UpdateTemperature builder with application/json body.
NewUpdateTemperatureRequestWithBody generates requests for UpdateTemperature with any type of body.
NewUpdateZoneRequest calls the generic UpdateZone builder with application/json body.
NewUpdateZoneRequestWithBody generates requests for UpdateZone with any type of body.
ParseAuthenticateResponse parses an HTTP response from a AuthenticateWithResponse call.
ParseCreateRoomResponse parses an HTTP response from a CreateRoomWithResponse call.
ParseCreateSceneResponse parses an HTTP response from a CreateSceneWithResponse call.
ParseCreateZoneResponse parses an HTTP response from a CreateZoneWithResponse call.
ParseDeleteDeviceResponse parses an HTTP response from a DeleteDeviceWithResponse call.
ParseDeleteRoomResponse parses an HTTP response from a DeleteRoomWithResponse call.
ParseDeleteSceneResponse parses an HTTP response from a DeleteSceneWithResponse call.
ParseDeleteZoneResponse parses an HTTP response from a DeleteZoneWithResponse call.
ParseGetBridgeHomeResponse parses an HTTP response from a GetBridgeHomeWithResponse call.
ParseGetBridgeHomesResponse parses an HTTP response from a GetBridgeHomesWithResponse call.
ParseGetBridgeResponse parses an HTTP response from a GetBridgeWithResponse call.
ParseGetBridgesResponse parses an HTTP response from a GetBridgesWithResponse call.
ParseGetDevicePowerResponse parses an HTTP response from a GetDevicePowerWithResponse call.
ParseGetDevicePowersResponse parses an HTTP response from a GetDevicePowersWithResponse call.
ParseGetDeviceResponse parses an HTTP response from a GetDeviceWithResponse call.
ParseGetDevicesResponse parses an HTTP response from a GetDevicesWithResponse call.
ParseGetGroupedLightResponse parses an HTTP response from a GetGroupedLightWithResponse call.
ParseGetGroupedLightsResponse parses an HTTP response from a GetGroupedLightsWithResponse call.
ParseGetLightLevelResponse parses an HTTP response from a GetLightLevelWithResponse call.
ParseGetLightLevelsResponse parses an HTTP response from a GetLightLevelsWithResponse call.
ParseGetLightResponse parses an HTTP response from a GetLightWithResponse call.
ParseGetLightsResponse parses an HTTP response from a GetLightsWithResponse call.
ParseGetMotionSensorResponse parses an HTTP response from a GetMotionSensorWithResponse call.
ParseGetMotionSensorsResponse parses an HTTP response from a GetMotionSensorsWithResponse call.
ParseGetResourcesResponse parses an HTTP response from a GetResourcesWithResponse call.
ParseGetRoomResponse parses an HTTP response from a GetRoomWithResponse call.
ParseGetRoomsResponse parses an HTTP response from a GetRoomsWithResponse call.
ParseGetSceneResponse parses an HTTP response from a GetSceneWithResponse call.
ParseGetScenesResponse parses an HTTP response from a GetScenesWithResponse call.
ParseGetTemperatureResponse parses an HTTP response from a GetTemperatureWithResponse call.
ParseGetTemperaturesResponse parses an HTTP response from a GetTemperaturesWithResponse call.
ParseGetZoneResponse parses an HTTP response from a GetZoneWithResponse call.
ParseGetZonesResponse parses an HTTP response from a GetZonesWithResponse call.
ParseUpdateBridgeResponse parses an HTTP response from a UpdateBridgeWithResponse call.
ParseUpdateDeviceResponse parses an HTTP response from a UpdateDeviceWithResponse call.
ParseUpdateGroupedLightResponse parses an HTTP response from a UpdateGroupedLightWithResponse call.
ParseUpdateLightLevelResponse parses an HTTP response from a UpdateLightLevelWithResponse call.
ParseUpdateLightResponse parses an HTTP response from a UpdateLightWithResponse call.
ParseUpdateMotionSensorResponse parses an HTTP response from a UpdateMotionSensorWithResponse call.
ParseUpdateRoomResponse parses an HTTP response from a UpdateRoomWithResponse call.
ParseUpdateSceneResponse parses an HTTP response from a UpdateSceneWithResponse call.
ParseUpdateTemperatureResponse parses an HTTP response from a UpdateTemperatureWithResponse call.
ParseUpdateZoneResponse parses an HTTP response from a UpdateZoneWithResponse call.
WithBaseURL overrides the baseURL.
No description provided by the author
WithDisabledUrlDiscovery allows disabling the URL discovery process in case the mDNS one failed.
No description provided by the author
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client.
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request.
WithTimeout specifies that timeout value for the Bridge Discovery.

# Constants

Defines values for BridgeGetType.
Defines values for BridgeHomeGetType.
Defines values for BridgePutType.
Defines values for ColorTemperatureDeltaAction.
Defines values for ColorTemperatureDeltaAction.
Defines values for ColorTemperatureDeltaAction.
Defines values for DeviceGetType.
Defines values for DeviceGetUsertestStatus.
Defines values for DeviceGetUsertestStatus.
Defines values for DevicePowerGetPowerStateBatteryState.
Defines values for DevicePowerGetPowerStateBatteryState.
Defines values for DevicePowerGetPowerStateBatteryState.
Defines values for DevicePutType.
Defines values for DimmingDeltaAction.
Defines values for DimmingDeltaAction.
Defines values for DimmingDeltaAction.
Defines values for SupportedDynamicStatus.
Defines values for GroupedLightPutType.
No description provided by the author
Defines values for DevicePutIdentifyAction.
Defines values for SupportedGradientMode.
Defines values for SupportedGradientMode.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightArchetype.
Defines values for LightGetColorGamutType.
Defines values for LightGetColorGamutType.
Defines values for LightGetColorGamutType.
Defines values for LightGetColorGamutType.
Defines values for LightGetMode.
Defines values for LightGetMode.
Defines values for LightGetPowerupDimmingColorMode.
Defines values for LightGetPowerupDimmingColorMode.
Defines values for LightGetPowerupDimmingColorMode.
Defines values for LightGetPowerupDimmingMode.
Defines values for LightGetPowerupDimmingMode.
Defines values for LightGetPowerupOnMode.
Defines values for LightGetPowerupOnMode.
Defines values for LightGetPowerupOnMode.
Defines values for LightGetPowerupPreset.
Defines values for LightGetPowerupPreset.
Defines values for LightGetPowerupPreset.
Defines values for LightGetPowerupPreset.
Defines values for MotionGetSensitivityStatus.
Defines values for MotionGetSensitivityStatus.
Defines values for SupportedDynamicStatus.
Defines values for LightPutMode.
No description provided by the author
Defines values for PowerupDimmingColorMode.
Defines values for PowerupDimmingColorMode.
Defines values for PowerupDimmingColorMode.
Defines values for PowerupDimmingMode.
Defines values for PowerupDimmingMode.
Defines values for PowerupOnMode.
Defines values for PowerupOnMode.
Defines values for PowerupOnMode.
Defines values for PowerupPreset.
Defines values for PowerupPreset.
Defines values for PowerupPreset.
Defines values for PowerupPreset.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for ProductArchetype.
Defines values for SupportedGradientMode.
Defines values for ResourceGetType.
Defines values for ResourceGetType.
Defines values for ResourceGetType.
Defines values for ResourceGetType.
Defines values for ResourceGetType.
Defines values for ResourceGetType.
Defines values for ResourceGetType.
Defines values for ResourceGetType.
Defines values for ResourceGetType.
Defines values for ResourceGetType.
Defines values for ResourceGetType.
Defines values for ResourceGetType.
Defines values for ResourceGetType.
Defines values for ResourceGetType.
Defines values for ResourceGetType.
Defines values for ResourceGetType.
Defines values for ResourceGetType.
Defines values for ResourceGetType.
Defines values for ResourceGetType.
Defines values for ResourceGetType.
Defines values for ResourceGetType.
Defines values for ResourceGetType.
Defines values for ResourceGetType.
Defines values for ResourceGetType.
Defines values for ResourceGetType.
Defines values for ResourceGetType.
Defines values for ResourceGetType.
Defines values for ResourceGetType.
Defines values for ResourceGetType.
Defines values for ResourceGetType.
Defines values for ResourceGetType.
Defines values for ResourceGetType.
Defines values for ResourceGetType.
Defines values for ResourceGetType.
Defines values for ResourceIdentifierRtype.
Defines values for ResourceIdentifierRtype.
Defines values for ResourceIdentifierRtype.
Defines values for ResourceIdentifierRtype.
Defines values for ResourceIdentifierRtype.
Defines values for ResourceIdentifierRtype.
Defines values for ResourceIdentifierRtype.
Defines values for ResourceIdentifierRtype.
Defines values for ResourceIdentifierRtype.
Defines values for ResourceIdentifierRtype.
Defines values for ResourceIdentifierRtype.
Defines values for ResourceIdentifierRtype.
Defines values for ResourceIdentifierRtype.
Defines values for ResourceIdentifierRtype.
Defines values for ResourceIdentifierRtype.
Defines values for ResourceIdentifierRtype.
Defines values for ResourceIdentifierRtype.
Defines values for ResourceIdentifierRtype.
Defines values for ResourceIdentifierRtype.
Defines values for ResourceIdentifierRtype.
Defines values for ResourceIdentifierRtype.
Defines values for ResourceIdentifierRtype.
Defines values for ResourceIdentifierRtype.
Defines values for ResourceIdentifierRtype.
Defines values for ResourceIdentifierRtype.
Defines values for ResourceIdentifierRtype.
Defines values for ResourceIdentifierRtype.
Defines values for ResourceIdentifierRtype.
Defines values for ResourceIdentifierRtype.
Defines values for ResourceIdentifierRtype.
Defines values for ResourceIdentifierRtype.
Defines values for ResourceIdentifierRtype.
Defines values for ResourceIdentifierRtype.
Defines values for ResourceIdentifierRtype.
Defines values for RoomArchetype.
Defines values for RoomArchetype.
Defines values for RoomArchetype.
Defines values for RoomArchetype.
Defines values for RoomArchetype.
Defines values for RoomArchetype.
Defines values for RoomArchetype.
Defines values for RoomArchetype.
Defines values for RoomArchetype.
Defines values for RoomArchetype.
Defines values for RoomArchetype.
Defines values for RoomArchetype.
Defines values for RoomArchetype.
Defines values for RoomArchetype.
Defines values for RoomArchetype.
Defines values for RoomArchetype.
Defines values for RoomArchetype.
Defines values for RoomArchetype.
Defines values for RoomArchetype.
Defines values for RoomArchetype.
Defines values for RoomArchetype.
Defines values for RoomArchetype.
Defines values for RoomArchetype.
Defines values for RoomArchetype.
Defines values for RoomArchetype.
Defines values for RoomArchetype.
Defines values for RoomArchetype.
Defines values for RoomArchetype.
Defines values for RoomArchetype.
Defines values for RoomArchetype.
Defines values for RoomArchetype.
Defines values for RoomArchetype.
Defines values for RoomArchetype.
Defines values for RoomArchetype.
Defines values for RoomArchetype.
Defines values for RoomArchetype.
Defines values for RoomArchetype.
Defines values for RoomArchetype.
Defines values for RoomArchetype.
Defines values for RoomArchetype.
Defines values for ScenePutType.
Defines values for SceneGetStatusActive.
Defines values for SceneGetStatusActive.
Defines values for SceneGetStatusActive.
Defines values for SceneGetType.
Defines values for ScenePostType.
Defines values for SceneRecallAction.
Defines values for SceneRecallAction.
Defines values for SceneRecallAction.
Defines values for SignalingSignal.
Defines values for SignalingSignal.
Defines values for SignalingSignal.
Defines values for SignalingSignal.
Defines values for LightPutMode.
Defines values for SupportedEffects.
Defines values for SupportedEffects.
Defines values for SupportedEffects.
Defines values for SupportedEffects.
Defines values for SupportedEffects.
Defines values for SupportedEffects.
Defines values for SupportedEffects.
Defines values for SupportedSignals.
Defines values for SupportedSignals.
Defines values for SupportedSignals.
Defines values for SupportedSignals.
Defines values for SupportedTimedEffects.
Defines values for SupportedTimedEffects.
Defines values for TemperaturePutType.
No description provided by the author
No description provided by the author

# Structs

ActionGet defines model for ActionGet.
ActionPost defines model for ActionPost.
Alert Joined alert control.
No description provided by the author
ApiResponse defines model for ApiResponse.
AuthenticateJSONBody defines parameters for Authenticate.
No description provided by the author
No description provided by the author
BridgeGet defines model for BridgeGet.
BridgeHomeGet defines model for BridgeHomeGet.
No description provided by the author
BridgePut defines model for BridgePut.
Client which conforms to the OpenAPI3 specification for this service.
ClientWithResponses builds on ClientInterface to offer response payloads.
No description provided by the author
Color defines model for Color.
ColorPaletteGet defines model for ColorPaletteGet.
ColorTemperature defines model for ColorTemperature.
ColorTemperatureDelta defines model for ColorTemperatureDelta.
ColorTemperaturePalettePost defines model for ColorTemperaturePalettePost.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
DeviceGet defines model for DeviceGet.
DevicePowerGet defines model for DevicePowerGet.
DevicePut defines model for DevicePut.
Dimming defines model for Dimming.
DimmingDelta defines model for DimmingDelta.
Dynamics defines model for Dynamics.
Dynamics2 defines model for Dynamics-2.
Effects Basic feature containing effect properties.
Error defines model for Error.
ErrorResponse defines model for ErrorResponse.
GamutPosition CIE XY gamut position.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Gradient Basic feature containing gradient properties.
GroupedLightGet defines model for GroupedLightGet.
GroupedLightPut defines model for GroupedLightPut.
No description provided by the author
LightGet defines model for LightGet.
LightLevelGet defines model for LightLevelGet.
LightLevelPut defines model for LightLevelPut.
LightPut defines model for LightPut.
MotionGet defines model for MotionGet.
MotionPut defines model for MotionPut.
On defines model for On.
Powerup Feature containing properties to configure powerup behaviour of a lightsource.
ProductData defines model for ProductData.
Resource Common resource properties.
ResourceGet defines model for ResourceGet.
ResourceIdentifier defines model for ResourceIdentifier.
ResourceOwned defines model for ResourceOwned.
RoomGet defines model for RoomGet.
RoomPut defines model for RoomPut.
SceneGet defines model for SceneGet.
SceneMetadata defines model for SceneMetadata.
ScenePalette Group of colors that describe the palette of colors to be used when playing dynamics.
ScenePost defines model for ScenePost.
ScenePut defines model for ScenePut.
SceneRecall defines model for SceneRecall.
Signaling Feature containing basic signaling properties.
TemperatureGet defines model for TemperatureGet.
TemperaturePut defines model for TemperaturePut.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

Authenticator defines a service that allows retrieving the Hue API Key.
The interface specification for the client above.
ClientWithResponsesInterface is the interface specification for the client with responses above.
Doer performs HTTP requests.
Toggleable defines resources that have an On field and can therefore be switched to on or off, mainly lights.

# Type aliases

AuthenticateJSONRequestBody defines body for Authenticate for application/json ContentType.
No description provided by the author
BridgeGetType defines model for BridgeGet.Type.
BridgeHomeGetType defines model for BridgeHomeGet.Type.
BridgePutType defines model for BridgePut.Type.
Brightness Brightness percentage.
ClientOption allows setting custom parameters during construction.
ColorTemperatureDeltaAction defines model for ColorTemperatureDelta.Action.
Conflict defines model for Conflict.
CreateRoomJSONRequestBody defines body for CreateRoom for application/json ContentType.
CreateSceneJSONRequestBody defines body for CreateScene for application/json ContentType.
CreateZoneJSONRequestBody defines body for CreateZone for application/json ContentType.
DeviceGetType defines model for DeviceGet.Type.
DeviceGetUsertestStatus defines model for DeviceGet.Usertest.Status.
DevicePowerGetPowerStateBatteryState Status of the power source of a device, only for battery powered devices.
DevicePutIdentifyAction Triggers a visual identification sequence, current implemented as (which can change in the future): Bridge performs Zigbee LED identification cycles for 5 seconds Lights perform one breathe cycle Sensors perform LED identification cycles for 15 seconds.
DevicePutType defines model for DevicePut.Type.
DimmingDeltaAction defines model for DimmingDelta.Action.
Forbidden defines model for Forbidden.
GroupedLightPutType Type of the supported resources (always `grouped_light` here).
InsufficientStorage defines model for InsufficientStorage.
InternalServerError defines model for InternalServerError.
LightArchetype Light archetype.
LightGetColorGamutType The gammut types supported by hue – A Gamut of early Philips color-only products – B Limited gamut of first Hue color products – C Richer color gamut of Hue white and color ambiance products – other Color gamut of non-hue products with non-hue gamuts resp w/o gamut.
LightGetMode defines model for LightGet.Mode.
LightGetPowerupDimmingColorMode State to activate after powerup.
LightGetPowerupDimmingMode Dimming will set the brightness to the specified value after power up.
LightGetPowerupOnMode State to activate after powerup.
LightGetPowerupPreset When setting the custom preset the additional properties can be set.
LightPutMode defines model for LightPut.Mode.
MethodNotAllowed defines model for MethodNotAllowed.
Mirek color temperature in mirek or null when the light color is not in the ct spectrum.
MotionGetSensitivityStatus defines model for MotionGet.Sensitivity.Status.
NotAcceptable defines model for NotAcceptable.
NotFound defines model for NotFound.
PowerupDimmingColorMode State to activate after powerup.
PowerupDimmingMode Dimming will set the brightness to the specified value after power up.
PowerupOnMode State to activate after powerup.
PowerupPreset When setting the custom preset the additional properties can be set.
ProductArchetype The default archetype given by manufacturer.
RequestEditorFn is the function signature for the RequestEditor callback function.
ResourceGetType Type of the supported resources.
ResourceIdentifierRtype The type of the referenced resource.
Response defines model for response.
RoomArchetype Possible archetypes of a room.
SceneGetStatusActive defines model for SceneGet.Status.Active.
SceneGetType defines model for SceneGet.Type.
ScenePostType defines model for ScenePost.Type.
ScenePutType defines model for ScenePut.Type.
SceneRecallAction When writing active, the actions in the scene are executed on the target.
ServiceUnavailable defines model for ServiceUnavailable.
SignalingSignal - `no_signal`: No signal is active.
SupportedDynamicStatus Current status of the lamp with dynamics.
SupportedEffects defines model for SupportedEffects.
SupportedGradientMode Mode in which the points are currently being deployed.
SupportedSignals Indicates which signal is currently active.
SupportedTimedEffects Current status values the light is in regarding timed effects.
TemperaturePutType Type of the supported resources (always `temperature` here).
TooManyRequests defines model for TooManyRequests.
Unauthorized defines model for Unauthorized.
UpdateBridgeJSONRequestBody defines body for UpdateBridge for application/json ContentType.
UpdateDeviceJSONRequestBody defines body for UpdateDevice for application/json ContentType.
UpdateGroupedLightJSONRequestBody defines body for UpdateGroupedLight for application/json ContentType.
UpdateLightJSONRequestBody defines body for UpdateLight for application/json ContentType.
UpdateLightLevelJSONRequestBody defines body for UpdateLightLevel for application/json ContentType.
UpdateMotionSensorJSONRequestBody defines body for UpdateMotionSensor for application/json ContentType.
UpdateRoomJSONRequestBody defines body for UpdateRoom for application/json ContentType.
UpdateSceneJSONRequestBody defines body for UpdateScene for application/json ContentType.
UpdateTemperatureJSONRequestBody defines body for UpdateTemperature for application/json ContentType.
UpdateZoneJSONRequestBody defines body for UpdateZone for application/json ContentType.