RGBCCT
The RGBCCT component handles a dimmable light output with possibility to change color, brightness and adjustable hues of white (cold/warm) and on/off control. Component has additional on/off control. It has night mode capability that can reduce brightness in selected period of time. It uses RGBCCT as RPC namespace and provides the methods:
RGBCCT.GetConfigto obtain the component's configurationRGBCCT.SetConfigto update the component's configurationRGBCCT.GetStatusto obtain the component's statusRGBCCT.Setto control the output state, color, transition and brightness levelRGBCCT.Toggleto toggle the output stateRGBCCT.DimUpto dim upRGBCCT.DimDownto dim downRGBCCT.DimStopto stop dimming
RGBCCT components are identified with rgbcct:<id> in objects containing multiple component payloads.
Methods:
RGBCCT.SetConfig
| Property | Type | Description |
|---|---|---|
| number | Id of the RGBCCT component instance |
| object | Configuration that the method takes |
Find more about the config properties in config section
RGBCCT.GetConfig
Properties:
| Property | Type | Description |
|---|---|---|
| number | Id of the RGBCCT component instance |
Find the RGBCCT.GetConfig response properties in config section
RGBCCT.GetStatus
Properties:
| Property | Type | Description |
|---|---|---|
| number | Id of the RGBCCT component instance |
Find more about the status response properties in status section
RGBCCT.Set
This method sets the output, color, color temperature level, mode, transition and brightness level of the RGBCCT 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 RGBCCT component instance. Required |
| boolean | True for output on, false otherwise. Optional |
| number | Brightness level 1%-100% Optional |
| array of type number | Red, Green, Blue [r,g,b] - each value represents level between 0..255 Optional |
| number | Color temperature level (in Kelvin) Optional |
| string | Operating mode of the light output Optional |
| number | Transition time in seconds - time between change from current brightness level and color to desired brightness level and color or current color temperature level to desired color temperature level in request Optional |
| number | Flip-back timer in seconds. Optional |
| number | Set current brightness level with applied offset. Can not be used together with |
| string or null | Up to 20 characters used to identify the origin of a state change. Optional |
At least one of the on and brightness parameters is required.
RGBCCT.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 RGBCCT component instance. Required |
| string or null | Up to 20 characters used to identify the origin of a state change. Optional |
RGBCCT.DimUp
This method dims up the brightness and white level. Dimming stops with RGBCCT.DimStop.
Request
Parameters:
| Property | Type | Description |
|---|---|---|
| number | Id of the RGBCCT component instance. Required |
| number | Fade rate of the brightness level dimming. Range |
RGBCCT.DimDown
This method dims down the brightness and white level. Dimming stops with RGBCCT.DimStop.
Request
Parameters:
| Property | Type | Description |
|---|---|---|
| number | Id of the RGBCCT component instance. Required |
| number | Fade rate of the brightness level dimming. Range |
RGBCCT.DimStop
This method stops the dimming of the brightness level.
HTTP Endpoint: /rgbcct/id
Through this endpoint a light can be turned on/off with or without a timer, brightness, color 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 | Intensity of the color red, 0..255 |
| number | Intensity of the color green, 0..255 |
| number | Intensity of the color blue, 0..255 |
| number | Color temperature level (in Kelvin), accepted value is device specific. Default range for RGBCCTBulbG3: |
| 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 | Intensity of the color red, 0..255 |
| number | Intensity of the color green, 0..255 |
| number | Intensity of the color blue, 0..255 |
| 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 RGBCCT component contains information about night mode settings, the timers of the chosen light instance. To Get/Set the configuration of the RGBCCT component its id must be specified.
Properties:
| Property | Type | Description |
|---|---|---|
| number | Id of the RGBCCT component instance |
| string or null | Name of the RGBCCT 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, RGB levels or color temperature value |
| 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 (in percent) when night mode is active. |
| array of type number or null | Color level when night mode is active. Red, Green, Blue [r,g,b] - each value represents level between 0..255. |
| number or null | Color temperature level limit (in Kelvin) when night mode is active. |
| string or null | Operating mode of the light output when night mode is active. Range of values: |
| array of type string | 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 |
Status
The status of the RGBCCT component contains information about the brightness level, color, color temperature level and output state of the light instance. To obtain the status of the RGBCCT component its id must be specified.
Properties:
| Property | Type | Description | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| number | Id of the RGBCCT component instance | |||||||||||||||||||||
| string | Source of the last command, for example: | |||||||||||||||||||||
| string or null | Tag used to identify the origin of a state change | |||||||||||||||||||||
| string | Current operating mode of the light output, | |||||||||||||||||||||
| boolean | True if the output channel is currently on, false otherwise | |||||||||||||||||||||
| array of type number | Current Red, Green, Blue [r,g,b] level 0..255 | |||||||||||||||||||||
| number | Current color temperature level (in Kelvin) | |||||||||||||||||||||
| number | Current brightness level (in percent) | |||||||||||||||||||||
| 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 active energy counter (shown if applicable)
| |||||||||||||||||||||
| number | Last measured instantaneous active power (in Watts) delivered to the attached load (shown if applicable) |
rgb: when this mode is active Red, Green, Blue [r,g,b] are validcct: when this mode is active Color temperature level (in Kelvin) is valid
Webhook Events
Currently, there are two events related to the RGBCCT component that can trigger webhooks:
rgbcct.on- produced when the output changes its state fromofftoonrgbcct.off- produced when the output changes its state fromontooff
Examples
RGBCCT.SetConfig example
- RGBCCT.SetConfig HTTP GET Request
- RGBCCT.SetConfig Curl Request
- RGBCCT.SetConfig Mos Request
http://192.168.33.1/rpc/RGBCCT.SetConfig?id=0&config={"name":"RGBCCT0"}
curl -X POST -d '{"id":1,"method":"RGBCCT.SetConfig","params":{"id":0,"config":{"name":"RGBCCT0"}}}' http://${SHELLY}/rpc
mos --port ${PORT} call RGBCCT.SetConfig '{"id":0,"config":{"name":"RGBCCT0"}}'
Response
- RGBCCT.SetConfig HTTP GET Response
- RGBCCT.SetConfig Curl Response
- RGBCCT.SetConfig Mos Response
null
{
"id": 1,
"src": "shellyrgbcctbulbg3-b48a0a123db4",
"params": null
}
null
RGBCCT.GetConfig example
- RGBCCT.GetConfig HTTP GET Request
- RGBCCT.GetConfig Curl Request
- RGBCCT.GetConfig Mos Request
http://192.168.33.1/rpc/RGBCCT.GetConfig?id=0
curl -X POST -d '{"id":1,"method":"RGBCCT.GetConfig","params":{"id":0}}' http://${SHELLY}/rpc
mos --port ${PORT} call RGBCCT.GetConfig '{"id":0}'
Response
- RGBCCT.GetConfig HTTP GET Response
- RGBCCT.GetConfig Curl Response
- RGBCCT.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,
"night_mode": {
"enable": true,
"brightness": 50,
"rgb": [
255,
255,
255
],
"ct": 4600,
"mode": "rgb",
"active_between": [
"21:45",
"05:30"
]
}
}
{
"id": 1,
"src": "shellyrgbcctbulbg3-b48a0a123db4",
"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,
"night_mode": {
"enable": true,
"brightness": 50,
"rgb": [
255,
255,
255
],
"ct": 4600,
"mode": "rgb",
"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,
"night_mode": {
"enable": true,
"brightness": 50,
"rgb": [
255,
255,
255
],
"ct": 4600,
"mode": "rgb",
"active_between": [
"21:45",
"05:30"
]
}
}
RGBCCT.GetStatus example
- RGBCCT.GetStatus HTTP GET Request
- RGBCCT.GetStatus Curl Request
- RGBCCT.GetStatus Mos Request
http://192.168.33.1/rpc/RGBCCT.GetStatus?id=0
curl -X POST -d '{"id":1,"method":"RGBCCT.GetStatus","params":{"id":0}}' http://${SHELLY}/rpc
mos --port ${PORT} call RGBCCT.GetStatus '{"id":0}'
Response
- RGBCCT.GetStatus HTTP GET Response
- RGBCCT.GetStatus Curl Response
- RGBCCT.GetStatus Mos Response
{
"id": 0,
"source": "timer",
"tag": null,
"mode": "rgb",
"output": true,
"brightness": 50,
"rgb": [
0,
0,
127
],
"ct": 4600,
"timer_started_at": 1626942399.36,
"timer_duration": 60,
"transition": {
"target": {
"output": true,
"brightness": 50,
"rgb": [
20,
30,
40
],
"ct": 6500
},
"started_at": 1626942399.36,
"duration": 20
},
"aenergy": {
"total": 0.55
},
"apower": 2
}
{
"id": 1,
"src": "shellyrgbcctbulbg3-b48a0a123db4",
"params": {
"id": 0,
"source": "timer",
"tag": null,
"mode": "rgb",
"output": true,
"brightness": 50,
"rgb": [
0,
0,
127
],
"ct": 4600,
"timer_started_at": 1626942399.36,
"timer_duration": 60,
"transition": {
"target": {
"output": true,
"brightness": 50,
"rgb": [
20,
30,
40
],
"ct": 6500
},
"started_at": 1626942399.36,
"duration": 20
},
"aenergy": {
"total": 0.55
},
"apower": 2
}
}
{
"id": 0,
"source": "timer",
"tag": null,
"mode": "rgb",
"output": true,
"brightness": 50,
"rgb": [
0,
0,
127
],
"ct": 4600,
"timer_started_at": 1626942399.36,
"timer_duration": 60,
"transition": {
"target": {
"output": true,
"brightness": 50,
"rgb": [
20,
30,
40
],
"ct": 6500
},
"started_at": 1626942399.36,
"duration": 20
},
"aenergy": {
"total": 0.55
},
"apower": 2
}
RGBCCT.Set example
- RGBCCT.Set HTTP GET Request
- RGBCCT.Set Curl Request
- RGBCCT.Set Mos Request
http://192.168.33.1/rpc/RGBCCT.Set?id=0&on=true&brightness=50&rgb=[20,30,40]&ct=4000&transition_duration=20
curl -X POST -d '{"id":1,"method":"RGBCCT.Set","params":{"id":0,"on":true,"brightness":50,"rgb":[20,30,40],"ct":4000,"transition_duration":20}}' http://${SHELLY}/rpc
mos --port ${PORT} call RGBCCT.Set '{"id":0,"on":true,"brightness":50,"rgb":[20,30,40],"ct":4000,"transition_duration":20}'
Response
- RGBCCT.Set HTTP GET Response
- RGBCCT.Set Curl Response
- RGBCCT.Set Mos Response
null
{
"id": 1,
"src": "shellyrgbcctbulbg3-b48a0a123db4",
"params": null
}
null
RGBCCT.Toggle example
- RGBCCT.Toggle HTTP GET Request
- RGBCCT.Toggle Curl Request
- RGBCCT.Toggle Mos Request
http://192.168.33.1/rpc/RGBCCT.Toggle?id=0
curl -X POST -d '{"id":1,"method":"RGBCCT.Toggle","params":{"id":0}}' http://${SHELLY}/rpc
mos --port ${PORT} call RGBCCT.Toggle '{"id":0}'
Response
- RGBCCT.Toggle HTTP GET Response
- RGBCCT.Toggle Curl Response
- RGBCCT.Toggle Mos Response
null
{
"id": 1,
"src": "shellyrgbcctbulbg3-b48a0a123db4",
"params": null
}
null
RGBCCT.DimUp example
- RGBCCT.DimUp HTTP GET Request
- RGBCCT.DimUp Curl Request
- RGBCCT.DimUp Mos Request
http://192.168.33.1/rpc/RGBCCT.DimUp?id=0&fade_rate=3
curl -X POST -d '{"id":1,"method":"RGBCCT.DimUp","params":{"id":0,"fade_rate":3}}' http://${SHELLY}/rpc
mos --port ${PORT} call RGBCCT.DimUp '{"id":0,"fade_rate":3}'
Response
- RGBCCT.DimUp HTTP GET Response
- RGBCCT.DimUp Curl Response
- RGBCCT.DimUp Mos Response
null
{
"id": 1,
"src": "shellyrgbcctbulbg3-b48a0a123db4",
"params": null
}
null
RGBCCT.DimDown example
- RGBCCT.DimDown HTTP GET Request
- RGBCCT.DimDown Curl Request
- RGBCCT.DimDown Mos Request
http://192.168.33.1/rpc/RGBCCT.DimDown?id=0&fade_rate=3
curl -X POST -d '{"id":1,"method":"RGBCCT.DimDown","params":{"id":0,"fade_rate":3}}' http://${SHELLY}/rpc
mos --port ${PORT} call RGBCCT.DimDown '{"id":0,"fade_rate":3}'
Response
- RGBCCT.DimDown HTTP GET Response
- RGBCCT.DimDown Curl Response
- RGBCCT.DimDown Mos Response
null
{
"id": 1,
"src": "shellyrgbcctbulbg3-b48a0a123db4",
"params": null
}
null
RGBCCT.DimStop example
- RGBCCT.DimStop HTTP GET Request
- RGBCCT.DimStop Curl Request
- RGBCCT.DimStop Mos Request
http://192.168.33.1/rpc/RGBCCT.DimStop?id=0
curl -X POST -d '{"id":1,"method":"RGBCCT.DimStop","params":{"id":0}}' http://${SHELLY}/rpc
mos --port ${PORT} call RGBCCT.DimStop '{"id":0}'
Response
- RGBCCT.DimStop HTTP GET Response
- RGBCCT.DimStop Curl Response
- RGBCCT.DimStop Mos Response
null
{
"id": 1,
"src": "shellyrgbcctbulbg3-b48a0a123db4",
"params": null
}
null
HTTP Endpoint example
Example:
curl http://${SHELLY}/rgbcct/0?turn=on
Example:
{
"ison": true,
"brightness": 100,
"red": 127,
"green": 0,
"blue": 0,
"temp": 4600,
"transition": 10,
"has_timer": true,
"timer_started_at": 258,
"timer_duration": 10,
"timer_remaining": 1.98,
"source": "http"
}