CCT
The CCT component handles a dimmable light output with adjustable hues of white (cold/warm) and on/off control. It has night mode capability that can reduce brightness and color temperature in selected period of time. It uses CCT
as RPC namespace and provides the methods:
CCT.GetConfig
to obtain the component's configurationCCT.SetConfig
to update the component's configurationCCT.GetStatus
to obtain the component's statusCCT.Set
to control the output state, brightness level and color temperature levelCCT.Toggle
to toggle the output stateCCT.DimUp
to dim upCCT.DimDown
to dim downCCT.DimStop
to stop dimming
CCT components are identified with cct:<id>
in objects containing multiple component payloads.
Methods:
CCT.SetConfig
Property | Type | Description |
---|---|---|
| number | Id of the CCT component instance |
| object | Configuration that the method takes |
Find more about the config properties in config section
CCT.GetConfig
Properties:
Property | Type | Description |
---|---|---|
| number | Id of the CCT component instance |
Find the CCT.GetConfig response properties in config section
CCT.GetStatus
Properties:
Property | Type | Description |
---|---|---|
| number | Id of the CCT component instance |
Find more about the status response properties in status section
CCT.Set
This method sets the output, brightness and color temperature level of the CCT component. It can be used to trigger webhooks. More information about the events triggering webhooks available for this component can be found below.
Request
Parameters:
Property | Type | Description |
---|---|---|
| number | Id of the CCT component instance. Required |
| boolean | True for light on, false otherwise. Optional |
| number | Brightness level Optional |
| number | Color temperature level (in Kelvin) Optional |
| number | Transition time in seconds - time between change from current brightness level to desired brightness level and current color temperature level to desired color temperature level in request Optional |
| number | Optional flip-back timer in seconds. Optional |
| number | Set current brightness level with applied offset. Can not be used together with |
At least one of the on
, brightness
and ct
parameters is required.
CCT.Toggle
This method toggles the output state. It can be used to trigger webhooks. More information about the events triggering webhooks available for this component can be found below.
Request
Parameters:
Property | Type | Description |
---|---|---|
| number | Id of the CCT component instance. Required |
CCT.DimUp
This method dims up the brightness level. Dimming stops with CCT.DimStop.
Request
Parameters:
Property | Type | Description |
---|---|---|
| number | Id of the CCT component instance. Required |
| number | Fade rate of the brightness level dimming. Range |
CCT.DimDown
This method dims down the brightness level. Dimming stops with CCT.DimStop.
Request
Parameters:
Property | Type | Description |
---|---|---|
| number | Id of the CCT component instance. Required |
| number | Fade rate of the brightness level dimming. Range |
CCT.DimStop
This method stops the dimming of the brightness level.
Request
Parameters:
Property | Type | Description |
---|---|---|
| number | Id of the CCT component instance. Required |
HTTP Endpoint: /cct/id
Through this endpoint a light can be turned on/off with or without a timer, brightness and color temperature level can be changed also. This can be used to trigger webhooks. More information about the events triggering webhooks available for this component can be found below.
Request
Parameters:
Property | Type | Description |
---|---|---|
| string | Action to be executed. Range of values: |
| number | A one-shot flip-back timer in seconds. |
| number | Brightness, 0..100 % |
| number | Color temperature level (in Kelvin), accepted value is device specific. Default range for DuoBulbG3: |
| number | One-shot transition, 500..10800000 [ms] |
Response
Received attributes:
Property | Type | Description |
---|---|---|
| boolean | True if the light is turned on, false otherwise |
| number | Brightness, 0..100 % |
| number | Color temperature level (in Kelvin) |
| number | One-shot transition, 500..10800000 [ms] |
| boolean | True if the light is turned on, false otherwise |
| number | Unix timestamp, start time of the timer (in UTC) |
| number | Duration of the timer in seconds |
| number | Time remaining (in seconds) until the request is executed |
| string | Source of the last command, for example: |
Configuration
The configuration of the CCT component contains information about night mode settings, button presets and the timers of the chosen CCT instance. To Get/Set the configuration of the CCT component its id
must be specified.
Properties:
Property | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| number | Id of the CCT component instance | |||||||||||||||
| string or null | Name of the CCT instance | |||||||||||||||
| string | Output state to set on power_on. Range of values: | |||||||||||||||
| boolean | True if the "Automatic ON" function is enabled, false otherwise | |||||||||||||||
| number | Seconds to pass until the component is switched back on | |||||||||||||||
| boolean | True if the "Automatic OFF" function is enabled, false otherwise | |||||||||||||||
| number | Seconds to pass until the component is switched back off | |||||||||||||||
| number | Transition time (in seconds) - time to change from 0% to 100% of brightness (if applicable) | |||||||||||||||
| number | Brightness level (in percent) applied when there is a toggle and current brightness is lower than | |||||||||||||||
| boolean | Enable or disable night mode | |||||||||||||||
| number or null | Brightness level limit when night mode is active. | |||||||||||||||
| number or null | Color temperature level limit (in Kelvin) when night mode is active. | |||||||||||||||
| array | Containing 2 elements of type string, the first element indicates the start of the period during which the night mode will be active, the second indicates the end of that period. Both start and end are strings in the format HH:MM, where HH and MM are hours and minutes with optinal leading zeros | |||||||||||||||
| number | Controls how quickly the output level changes while a button is held down for dimming (if applicable). Default value | |||||||||||||||
| object | Button presets config (if applicable)
| |||||||||||||||
| array or null | Remaps output 0%-100% range to values in array (if applicable). First value in array is | |||||||||||||||
| array or null | Sets the color temperature operating range in Kelvin (if applicable). First value in array is | |||||||||||||||
| number | Limit (in Amperes) over which overcurrent condition occurs (shown if applicable). For specific devices applies for color channels, not CCT component | |||||||||||||||
| number | Limit (in Watts) over which overpower condition occurs (shown if applicable) | |||||||||||||||
| number | Limit (in Volts) over which overvoltage condition occurs (shown if applicable) |
Status
The status of the CCT component contains information about the brightness level, color temperature level and the output state of the CCT instance. To obtain the status of the CCT component its id
must be specified.
Properties:
Property | Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| number | Id of the CCT component instance | ||||||||||||||||||
| string | Source of the last command, for example: | ||||||||||||||||||
| boolean | True if the output channel is currently on, false otherwise | ||||||||||||||||||
| number | Current brightness level (in percent) | ||||||||||||||||||
| number | Current color temperature level (in Kelvin) | ||||||||||||||||||
| number | Unix timestamp, start time of the timer (in UTC) (shown if the timer is triggered) | ||||||||||||||||||
| number | Duration of the timer in seconds (shown if the timer is triggered) | ||||||||||||||||||
| object | Information about the transition (shown if transition is triggered)
| ||||||||||||||||||
| object | Information about the temperature (if applicable)
| ||||||||||||||||||
| number | Last measured instantaneous active power (in Watts) delivered to the attached load (shown if applicable) | ||||||||||||||||||
| number | Last measured voltage in Volts (shown if applicable) | ||||||||||||||||||
| number | Last measured current in Amperes (shown if applicable) | ||||||||||||||||||
| array of type string | Error conditions occurred. May contain |
Webhook Events
Currently, there are two events related to the CCT component that can trigger webhooks:
cct.on
- produced when the light changes its state fromoff
toon
cct.off
- produced when the light changes its state fromon
tooff
Examples
CCT.SetConfig example
- CCT.SetConfig HTTP GET Request
- CCT.SetConfig Curl Request
- CCT.SetConfig Mos Request
http://192.168.33.1/rpc/CCT.SetConfig?id=0&config={"name":"CCT0"}
curl -X POST -d '{"id":1,"method":"CCT.SetConfig","params":{"id":0,"config":{"name":"CCT0"}}}' http://${SHELLY}/rpc
mos --port ${PORT} call CCT.SetConfig '{"id":0,"config":{"name":"CCT0"}}'
Response
- CCT.SetConfig HTTP GET Response
- CCT.SetConfig Curl Response
- CCT.SetConfig Mos Response
null
{
"id": 1,
"src": "shellyduobulbg3-30839809eac0",
"params": null
}
null
CCT.GetConfig example
- CCT.GetConfig HTTP GET Request
- CCT.GetConfig Curl Request
- CCT.GetConfig Mos Request
http://192.168.33.1/rpc/CCT.GetConfig?id=0
curl -X POST -d '{"id":1,"method":"CCT.GetConfig","params":{"id":0}}' http://${SHELLY}/rpc
mos --port ${PORT} call CCT.GetConfig '{"id":0}'
Response
- CCT.GetConfig HTTP GET Response
- CCT.GetConfig Curl Response
- CCT.GetConfig Mos Response
{
"id": 0,
"name": null,
"initial_state": "restore_last",
"auto_on": true,
"auto_on_delay": 60,
"auto_off": true,
"auto_off_delay": 60,
"transition_duration": 3,
"min_brightness_on_toggle": 3,
"button_presets": {
"button_doublepush": {
"brightness": 100,
"ct": 6500
}
},
"night_mode": {
"enable": true,
"brightness": 50,
"ct": 4600,
"active_between": [
"21:45",
"05:30"
]
}
}
{
"id": 1,
"src": "shellyduobulbg3-30839809eac0",
"params": {
"id": 0,
"name": null,
"initial_state": "restore_last",
"auto_on": true,
"auto_on_delay": 60,
"auto_off": true,
"auto_off_delay": 60,
"transition_duration": 3,
"min_brightness_on_toggle": 3,
"button_presets": {
"button_doublepush": {
"brightness": 100,
"ct": 6500
}
},
"night_mode": {
"enable": true,
"brightness": 50,
"ct": 4600,
"active_between": [
"21:45",
"05:30"
]
}
}
}
{
"id": 0,
"name": null,
"initial_state": "restore_last",
"auto_on": true,
"auto_on_delay": 60,
"auto_off": true,
"auto_off_delay": 60,
"transition_duration": 3,
"min_brightness_on_toggle": 3,
"button_presets": {
"button_doublepush": {
"brightness": 100,
"ct": 6500
}
},
"night_mode": {
"enable": true,
"brightness": 50,
"ct": 4600,
"active_between": [
"21:45",
"05:30"
]
}
}
CCT.GetStatus example
- CCT.GetStatus HTTP GET Request
- CCT.GetStatus Curl Request
- CCT.GetStatus Mos Request
http://192.168.33.1/rpc/CCT.GetStatus?id=0
curl -X POST -d '{"id":1,"method":"CCT.GetStatus","params":{"id":0}}' http://${SHELLY}/rpc
mos --port ${PORT} call CCT.GetStatus '{"id":0}'
Response
- CCT.GetStatus HTTP GET Response
- CCT.GetStatus Curl Response
- CCT.GetStatus Mos Response
{
"id": 0,
"source": "timer",
"output": false,
"brightness": 50,
"ct": 4600,
"timer_started_at": 1626942399.36,
"timer_duration": 60,
"transition": {
"target": {
"output": true,
"brightness": 100,
"ct": 6500
},
"started_at": 1626942399.36,
"duration": 20
}
}
{
"id": 1,
"src": "shellyduobulbg3-30839809eac0",
"params": {
"id": 0,
"source": "timer",
"output": false,
"brightness": 50,
"ct": 4600,
"timer_started_at": 1626942399.36,
"timer_duration": 60,
"transition": {
"target": {
"output": true,
"brightness": 100,
"ct": 6500
},
"started_at": 1626942399.36,
"duration": 20
}
}
}
{
"id": 0,
"source": "timer",
"output": false,
"brightness": 50,
"ct": 4600,
"timer_started_at": 1626942399.36,
"timer_duration": 60,
"transition": {
"target": {
"output": true,
"brightness": 100,
"ct": 6500
},
"started_at": 1626942399.36,
"duration": 20
}
}
CCT.Set example
- CCT.Set HTTP GET Request
- CCT.Set Curl Request
- CCT.Set Mos Request
http://192.168.33.1/rpc/CCT.Set?id=0&on=true&brightness=50&ct=4600&transition_duration=20
curl -X POST -d '{"id":1,"method":"CCT.Set","params":{"id":0,"on":true,"brightness":50,"ct":4600,"transition_duration":20}}' http://${SHELLY}/rpc
mos --port ${PORT} call CCT.Set '{"id":0,"on":true,"brightness":50,"ct":4600,"transition_duration":20}'
Response
- CCT.Set HTTP GET Response
- CCT.Set Curl Response
- CCT.Set Mos Response
null
{
"id": 1,
"src": "shellyduobulbg3-30839809eac0",
"params": null
}
null
CCT.Toggle example
- CCT.Toggle HTTP GET Request
- CCT.Toggle Curl Request
- CCT.Toggle Mos Request
http://192.168.33.1/rpc/CCT.Toggle?id=0
curl -X POST -d '{"id":1,"method":"CCT.Toggle","params":{"id":0}}' http://${SHELLY}/rpc
mos --port ${PORT} call CCT.Toggle '{"id":0}'
Response
- CCT.Toggle HTTP GET Response
- CCT.Toggle Curl Response
- CCT.Toggle Mos Response
null
{
"id": 1,
"src": "shellyduobulbg3-30839809eac0",
"params": null
}
null
CCT.DimUp example
- CCT.DimUp HTTP GET Request
- CCT.DimUp Curl Request
- CCT.DimUp Mos Request
http://192.168.33.1/rpc/CCT.DimUp?id=0&fade_rate=3
curl -X POST -d '{"id":1,"method":"CCT.DimUp","params":{"id":0,"fade_rate":3}}' http://${SHELLY}/rpc
mos --port ${PORT} call CCT.DimUp '{"id":0,"fade_rate":3}'
Response
- CCT.DimUp HTTP GET Response
- CCT.DimUp Curl Response
- CCT.DimUp Mos Response
null
{
"id": 1,
"src": "shellyduobulbg3-30839809eac0",
"params": null
}
null
CCT.DimDown example
- CCT.DimDown HTTP GET Request
- CCT.DimDown Curl Request
- CCT.DimDown Mos Request
http://192.168.33.1/rpc/CCT.DimDown?id=0&fade_rate=3
curl -X POST -d '{"id":1,"method":"CCT.DimDown","params":{"id":0,"fade_rate":3}}' http://${SHELLY}/rpc
mos --port ${PORT} call CCT.DimDown '{"id":0,"fade_rate":3}'
Response
- CCT.DimDown HTTP GET Response
- CCT.DimDown Curl Response
- CCT.DimDown Mos Response
null
{
"id": 1,
"src": "shellyduobulbg3-30839809eac0",
"params": null
}
null
CCT.DimStop example
- CCT.DimStop HTTP GET Request
- CCT.DimStop Curl Request
- CCT.DimStop Mos Request
http://192.168.33.1/rpc/CCT.DimStop?id=0
curl -X POST -d '{"id":1,"method":"CCT.DimStop","params":{"id":0}}' http://${SHELLY}/rpc
mos --port ${PORT} call CCT.DimStop '{"id":0}'
Response
- CCT.DimStop HTTP GET Response
- CCT.DimStop Curl Response
- CCT.DimStop Mos Response
null
{
"id": 1,
"src": "shellyduobulbg3-30839809eac0",
"params": null
}
null
HTTP Endpoint example
Example:
curl http://${SHELLY}/cct/0?turn=on
Example:
{
"ison": true,
"brightness": 100,
"temp": 4600,
"transition": 10,
"has_timer": true,
"timer_started_at": 258,
"timer_duration": 10,
"timer_remaining": 1.98,
"source": "http"
}