Touch switch version 2.4.0 introduces a number of colour control options for DALI Device Type 8 products. Ensure your zencontrol control system is updated to 1.1.36.x+ to use colour control features.
There are 4 main colour control ButtonTypes in touch switch, available as both buttons, and sub buttons. COLOUR_TC_COMMAND, COLOUR_XY_COMMAND, COLOUR_RGBWAF_COMMAND, COLOUR_RGB_COMMAND, SUB_BUTTON_COLOUR_TC, SUB_BUTTON_COLOUR_XY, SUB_BUTTON_COLOUR_RGBWAF, and SUB_BUTTON_COLOUR_RGB.
The examples in this snippet are from the landscape_colour_control_example.json modified to point to group 0.
Tuneable white control.
tuneable white control is available using a slider, you can define a slider as a UI element in a screen by using the COLOUR_TC_COMMAND type.
{when using a TC slider you must define "slider_max": 9000, "slider_min": 2700, these values are the colour temperature limits in Kelvin. The command_data object must define address, ip, and port. the temperature which is sent to the device will be determined based on slider position.
"label": "TC slider",
"slider_max": 9000,
"slider_min": 2700,
"properties": {
"column_size": 26,
"column_start": 8,
"row_size": 3,
"row_start": 8,
"view_parameters": {
"text_colour": -14272955,
"text_size": 18.0,
"alpha": 1.0,
"skeleton_mode": false
}
},
"command_data": {
"address": 128,
"command": 0,
"control": 0,
"data_0": 0,
"data_1": 0,
"data_2": 0,
"ip": "192.168.10.113",
"port": 5108
},
"type": "COLOUR_TC_COMMAND"
},
To have a tuneable white slider appear from a button press (for example in plan touch mode) set the button type to SUB_BUTTON_COLOUR_TC.
{
"label": "Start",
"slider_max": 6500,
"slider_min": 2700,
"properties": {
"column_size": 24,
"column_start": 6,
"row_size": 7,
"row_start": 10,
"view_parameters": {
"alpha": 1.0,
"button_colour": -12009044,
"button_pressed_colour": -14272955,
"skeleton_mode": false,
"text_colour": -1,
"text_pressed_colour": -12009044,
"text_size": 18.0
}
},
"sub_button_layout": {
"label": "Zone 3",
"label_text_colour": -14272955,
"label_text_size": 16.0,
"popup_height": 150,
"popup_width": 800,
"relative_positioning": true,
"start_x": 0,
"start_y": 800,
"button_colour_hex": "#660E141A"
},
"command_data": {
"address": 128,
"command": 1,
"control": 2,
"data_0": 0,
"data_1": 0,
"data_2": 0,
"ip": "192.168.10.113",
"port": 5108
},
"type": "SUB_BUTTON_COLOUR_TC"
}
The sub button is defined the same as above for the most part, The sub_button_layout can have a background colour defined using button_colour_hex or button_colour. The relative_positioning flag means that the popup will appear where the user has pressed, otherwise it will appear at the location described by start_x and start_y where 0,0 is the top left corner.
Colour XY control.
Colour XY will show a colour picker, define the command_data.ip command_data.address and command_data.port (other command_data fields are ignored).
{
"label": "Start",
"properties": {
"column_size": 10,
"column_start": 6,
"row_size": 10,
"row_start": 7,
"view_parameters": {
"alpha": 1.0,
"button_colour": -12009044,
"button_pressed_colour": -14272955,
"skeleton_mode": false,
"text_colour": -1,
"text_pressed_colour": -12009044,
"text_size": 18.0
}
},
"command_data": {
"address": 128,
"command": 1,
"control": 2,
"data_0": 0,
"data_1": 0,
"data_2": 0,
"ip": "192.168.10.113",
"port": 5108
},
"type": "COLOUR_XY_COMMAND"
}
To show colour xy control in a popup (eg, for plan touch mode).
{
"label": "Start",
"properties": {
"column_size": 10,
"column_start": 6,
"row_size": 10,
"row_start": 7,
"view_parameters": {
"alpha": 1.0,
"button_colour": -12009044,
"button_pressed_colour": -14272955,
"skeleton_mode": false,
"text_colour": -1,
"text_pressed_colour": -12009044,
"text_size": 18.0
}
},
"command_data": {
"address": 128,
"command": 1,
"control": 2,
"data_0": 0,
"data_1": 0,
"data_2": 0,
"ip": "192.168.10.113",
"port": 5108
},
"sub_button_layout": {
"popup_height": 200,
"popup_width": 200,
"start_x": 0,
"start_y": 800,
"button_colour_hex": "#660E141A"
},
"type": "SUB_BUTTON_COLOUR_XY"
}
RGBWAF Control.
COLOUR_RGBWAF_COMMAND uses channel control mode (RGBWAF control byte = 0) here you can define the channel sliders, the possible options for each slider are the dim level (using slider_min and slider_max), channel_colour and channel_label.
{SUB_BUTTON_COLOUR_RGB is defined similarly to the XY sub button, and will show the same UI however it will send commands to Red Green and Blue channels for an RGBWAF driver (RGBWAF control byte = 1)
"rgbwaf_data":{
"channel_0":{
"channel_enabled":true,
"channel_colour":"RED",
"slider_max":254,
"slider_min":1
},
"channel_1":{
"channel_enabled":true,
"channel_colour":"GREEN",
"channel_label":"",
"slider_max":254,
"slider_min":1
},
"channel_2":{
"channel_enabled":true,
"channel_colour":"BLUE",
"channel_label":"blue",
"slider_max":254,
"slider_min":1
},
"channel_3":{
"channel_enabled":true,
"channel_colour":"WHITE",
"slider_max":254,
"slider_min":1
},
"channel_4":{
"channel_enabled":true,
"channel_colour":"AMBER",
"slider_max":254,
"slider_min":1
},
"channel_5":{
"channel_enabled":true,
"channel_colour":"FREECOLOUR",
"slider_max":254,
"slider_min":1
}
},
"label": "Red",
"properties": {
"column_size": 30,
"column_start": 3,
"row_size": 13,
"row_start": 6,
"view_parameters": {
"alpha": 1.0,
"button_colour": 1712198682,
"button_pressed_colour": 1712198682,
"skeleton_mode": false,
"text_colour": -14272955,
"text_pressed_colour": -12009044,
"text_size": 18.0,
"text_gravity": 16
}
},
"command_data": {
"address": 128,
"command": 0,
"control": 0,
"data_0": 0,
"data_1": 0,
"data_2": 0,
"ip": "192.168.10.113",
"port": 5108
},
"type": "COLOUR_RGBWAF_COMMAND"
}
{
"label": "Start",
"properties": {
"column_size": 24,
"column_start": 6,
"row_size": 7,
"row_start": 10,
"view_parameters": {
"alpha": 1.0,
"button_colour": -12009044,
"button_pressed_colour": -14272955,
"skeleton_mode": false,
"text_colour": -1,
"text_pressed_colour": -12009044,
"text_size": 18.0
}
},
"sub_button_layout": {
"label": "Zone 3",
"label_text_colour": -14272955,
"label_text_size": 16.0,
"popup_height": 600,
"popup_width": 600,
"relative_positioning": true,
"start_x": 0,
"start_y": 800,
"button_colour_hex": "#660E141A"
},
"command_data": {
"address": 128,
"command": 160,
"control": 3,
"data_0": 0,
"data_1": 0,
"data_2": 0,
"ip": "192.168.10.113",
"port": 5108
},
"type": "SUB_BUTTON_COLOUR_RGB"
}
Comments
0 comments
Article is closed for comments.