Tutorial: Create a visualization for KNX

Tutorial: Create a visualization for KNX

This tutorial shows how to create a simple web visualization for a KNX project. Requirements for this tutorial:

Although this tutorial deals with KNX data points only, the procedure can be applied to any kind of data points available in the Core Server.

Create a visualization page for the floor

First, rename the visualization page to "Floor Plan" by selecting "Properties..." within the menu "Page".

image-20260303-104937.png
image-20260303-104957.png

 

As next, a background image shall be placed on the visualization page. To do so, select "Image" from the object catalog at the left hand side and drop the element on the empty page.

image-20260303-105223.png

Then, choose the image of the Floor. Double-click the image and select the floor image. You can use this example file here

image-20260303-105725.png

 

Afterwards, change to the tab "Position/Layer" and enter "0" for "Top" and "Left", “1920” for “Width”, “900” for “Height”, and select "Background" as layer.

image-20260303-105909.png

Now the image is moved to the top left corner and fixed to the background. The height of 900 will leave some space for our navigation bar later on.

Visu_Floor.png

The visualization software is using the concept of layers. A layer is a group of elements. Layers are independent of the visualization page - they are defined for the whole visualization project. Each layer has four properties that can be changed via the view "Layer"

  • "Enabled in editor": if deactivated, all elements of that layer cannot be moved and changed anymore.

  • "Visible in editor": this option can be used to hide all elements of a layer in editor mode.

  • "Enabled in visualization": if deactivated, the elements are shown but the user is not able to click on them.

  •  "Visible in visualization": this option hides all elements of a layer in visualization mode.

As seen at the end of the layer list, the flags "Enabled in editor" and "Enabled in visualization" are deactivated for the background layer. Therefore, the background image cannot be moved anymore.

 

Create a page for the room and add a link between the two pages

Create a new page by selecting the entry "New ..." within the menu "Page". Give the page a name (e.g. “Room”) and select "Ok".

image-20260303-110308.png
image-20260303-110241.png

Repeat the steps from the last section to place a background image on the new page. You can use this example file here.

image-20260303-110505.png

To create a link between the pages, move back to the first page and drag & drop a "Link Area" from the object catalog on the visualization page. Resize the link area and move it over a room.

image-20260303-110609.png

Double-click the link area and select “Go to page” as function and your room page as “Linked page”.

image-20260303-110749.png

Within the appearance tab, you can also deselect the border. This will deactivate the black border of the link area and thus it will be invisible.

image-20260303-110848.png

Since the link area is invisible now, it may be difficult to find it again. Within the view “Object Tree”, you can find all pages and theirs controls. By double-clicking a control in the tree, it will be highlighted and the configuration dialog opens.

image-20260303-111118.png

Start the visualization by pressing the "Start" button within the tool bar.

image-20260303-111148.png

Test whether the navigation between the two pages is working by clicking at the link area.

image-20260303-111248.png

Create a navigation bar using a template page

Within most visualization projects, there will be elements that shall be shown on multiple pages. A typical example is a navigation bar that includes some buttons that shall be displayed on all pages. To avoid that these elements have to be copied to each page, the concept of template pages is provided – also called master pages. A master page acts like a template for visualization pages - all elements that are placed on the template page are also shown on other pages which are configured to use this template page.

Create a new page called "Template page". Within the configuration dialog, select the option "Is master page".

image-20260303-121505.png

Then place a "Back" button on the template page. In addition to create your own buttons, some predefined buttons are already provided within the library. Select "Library" from the object catalog, choose a color theme, and place a "Button-Back-Rect" button on the bottom left corner.

image-20260303-121643.png

Double-click the button, change to the "Object" tab and select "Go to page" as function. As "Linked page" select "Navigate back".

image-20260303-121708.png

Change to the "Position/Layer" tab, change the width and height to "100" and close the dialog.

image-20260303-122008.png

Afterwards, change to page "Room" and open the page configuration dialog. Within this dialog, select "Use master page" and close the dialog again.

image-20260303-121904.png

Do the same for the other page. As a result, the back button of the template page will also be shown on the other pages.

image-20260303-122028.png

Implementing on / off lighting control

As next, a simple on/off light shall be implemented on the room page. From the library add a "Button-Light-Rect" button. Double-click the button and change to the "Object" tab. Normally, there are two KNX group addresses for controlling a light in KNX. One KNX group address is needed for controlling the light (control address) – one that provides the status of the light (status address).Within the "Server Item" list, add the corresponding addresses. For the controlling address, set the SEND flag and deactivate the RECEIVE false. For the status address, set the RECEIVE flag and deactivate the SEND flag. Verify the correct selection of the "Send" and "Receive" flags.

image-20260303-122738.png

Implementing control of a dimming light

Now we would like to add a control shall with dimming functionality. Add a "Button-Light-plus-Rect" and a "Button-Light-minus-Rect" button to the existing on/off button.

image-20260303-123056.png

In KNX, dimming is realized using a 4 bit object. The first bit reflects the direction of the dimming command and the remaining 3 bits the step size. The following values can be used for dimming control:

  • 1001 → 9: this value is used to start dimming up to 100%

  • 0001 → 1: this value is used to start dimming down to 0%

  • 0000 → 0: this value is used to stop the dimming process

Double-click the "Plus" button and change to the "Object" tab and select "XCommand Button". An “XCommand button” has advanced functions like short and long click as well as the possibility to use logic commands. Within the first row, select short click and select the XCommand “ITEM.TOGGLEWITHSTATUS”. As parameter “Item” select the control group address. Activate the parameter “Status” and select the status group address.

image-20260303-123456.png

The logic “ITEM.TOGGLEWITHSTATUS” inverts the value of the status and sends it to the item. This means if the light was “off”, it will send a “on” – if it was “on” it will send an “off”.

As next, select “Long Down” in the second row and select the XCommand “ITEM.WRITE”. As value set 9 (i.e. start dimming to 100%) and as output select the 4 bit relative dimming address.

image-20260303-123714.png

In the third row, select “Long Up” and select the XCommand “ITEM.WRITE”. As value set 0 (i.e. stop dimming) and as output select the 4 bit relative dimming address.

image-20260303-124014.png

Double-click the "Minus" button. Repeat the same steps as for the plus button. For the long down operation use the value 1 (i.e. dimming down to 0%) instead of 9.

image-20260303-125008.png

As next, the current brightness value shall be visualized using a simple label. Insert a "Label" control next to the two buttons. Double-click it and change to the "Object" tab. As function select "Indicator". "Indicator" means that the label shows the current value of a data point. Select the group address that provides the current brightness value of your light.

image-20260303-124214.png

Now the label shows the raw value of the data point. If the value is a 1 Byte KNX object defined as KNX DPT 5.001 (Scaling), value range is from 0 ... 100 %. In order to format it (e.g. limit the number of digits and adding a unit), a format string can be specified. The format string can be specified in the "Appearance" tab of the label configuration.  Here some useful text formats are listed:

  • “{0:0} %”: this format string rounds a decimal to the nearest integer and adds a percent sign.

  • “{0:0.0} °C”: this format string always shows one digit after the comma and adds the unit degrees Celsius.

You can also activate the option “Font AutoSize”. This will scale the font size to fit to the size of the label.

image-20260303-124557.png

Start the visualization and test it. A short click will turn the light on and off. If you click and hold the button, the it will start the dimming. If you release the button it will stop. The label will show the current brightness value in percentage.

Implementing blind control

As next, a simple blind control shall be added to the room. Insert two new buttons from the library: "Button-Blinds-Up-Rect" and "Button-Blinds-Down-Rect". Make them the same size as the other buttons and align them in a way that they have the same space and that the aligned according to the top edge. To achieve this, select them and use the corresponding menu entries within the context menu.

image-20260303-125737.png

Double-click the "Down" button and change to the "Object" tab and select "XCommand Button". Within the first row, select “Short Click” and select the XCommand “ITEM.WRITE”. As parameter “Output” select the up / down group address of your blind. As value, enter 1 which means “moving down” in KNX.

image-20260303-130127.png

Within the seconds row, select “Long down” and select the XCommand “ITEM.WRITE”. As parameter “Output” select the stop group address of your blind. As value, enter 1 which means “stop” in KNX.

image-20260303-130338.png

Double-click the "Up" button. Repeat the same steps as for the plus button. For the short click operation use the value 0 instead of 1. 0 means moving the blind up in KNX.

image-20260303-130543.png

As next, the blind position shall be visualized too. Insert a "Label" control between the two buttons. Double-click it and change to the "Object" tab. As function select "Indicator". Select the group address that provides the position of the blind. As before, add the text format “{0:0 %}” to format the value.

image-20260303-130743.png

Heating/cooling room control

As next the functionality of a simple room controller for heating or cooling shall visualized. It shall consists of the following elements:

  • Label that shows the current room temperature

  • Label that shows the current setpoint

  • + Button that is used to increase the setpoint

  • - Button that is used to decrease the setpoint

First, insert two labels that the page of the room.

image-20260303-130935.png

Double-click the first one, select "Indicator" as function and select the corresponding KNX group address that provides the current room temperature.

image-20260303-131028.png

Do the same for the second label and link it to the KNX group address that provides the current set point.

To make the display more user-friendly, the digits after the comma should be limited. In addition, the unit of the temperature shall be displayed. To achieve this, change to the appearance tab of the configuration dialog of the label and use the following text format:

  • {0:0.0} °C: this format string always shows one digit after the comma and adds the unit degrees Celsius.

In addition, activate the “Font Autosize” option. The following figure shows the configuration.

image-20260303-131311.png

As next, insert two buttons for changing the set point. Use a "Button-Heating-Minus-Rect" and a "Button-Heating-Plus-Rect" from the library and place them next to the labels.

image-20260303-131732.png

In this example, it is assumed that the set point can be changed step-wise with a KNX 1 bit object. Sending “true” will increase the set point by 1 step and sending “false” will decrease it. If you are using a different approach (e.g. via a 1 byte offset object), other button operating modes must be used.

Open the configuration dialog of the + button and change to the "Object" tab. As operating mode select "Toggle Down", select the 1 bit increase / decrease offset address and enter 1 as value. Pressing the button will increase the set point by the configured step.

image-20260303-132215.png

Double-click the - button. As operating mode select "Toggle Down", select the 1 bit increase / decrease offset address and enter 0 as value. Pressing the button will decrease the set point by the configured step.

image-20260303-132349.png

Testing the visualization in a web browser

To show the visualization in the web browser, do the following steps.

First, the visualization project must be transferred to the Web Manager which provides the web visualization interface. To do so, select “Save and Transfer Workspace to server” from the workspace menu.

image-20260303-132506.png

Then, login to the Web Manager interface. The URLs are:

http://<IP or host of BMS platform>:21000/ https://<IP or host of BMS platform>:21001/

Login with your user.

image-20260303-132810.png

Change to the Visualization Management app.

image-20260303-132909.png

Select the correct visualization project and hit the “Deploy” button. This will extract the visualization project and deploys it to the internal web server. A yellow message should appear.

image-20260303-133145.png

To verify that the deployment was successful, press the refresh button and verify that the “Last deployed” timestamp is after the “List received” timestamp.

image-20260303-133249.png

Afterwards, change to the “Devices” menu and select a device which is linked to the correct visualization project. If such a device is not existing create a new one or change the project of an existing device.

image-20260303-133419.png

Then click on the button “Open Visualization”.

image-20260303-133457.png

This will redirect you to the login of the web visualization. Enter your username and password.

image-20260303-133543.png

After log-in, click on the link area within the room plan. The room page will be shown.

image-20260303-133721.png

Changing the visualization and update it in the web browser

Whenever you change something within the visualization project, it must be redeployed to the web server.

To achieve this, save and transfer the workspace.

image-20260303-132506.png

Within the visualization management, press the “Deploy” button again.

image-20260303-133145.png

Your web clients will be disconnected. After logging in again, the changes should be visible in your web interface.