Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Using this flow you will be able to adjust DALI luminaires brightness in the E2D system from the KNX level. The program described in this article is associated with dimming up/down using KNX buttons. This functionality is only available when you have LMS E2D REMOTE ACCESS KIT at your site and Vertex controller has been supplied with internet connection.

KNX messages structure

We receive the following information from the KNX system:
{"decr_incr":1,"data":1} - start ‘up’
{"decr_incr":0,"data":1} - start ‘down’
{"decr_incr":0,"data":0} -stop dimming

Installing KNX library for Node-RED

You need to install node-red-contrib-knx-easy library for Node-RED. You will do that in Settings.

  1. Open the Node-RED and go to the Settings tab and select Settings.

  2. Go to the Palette tab. Here you can see all the libraries installed in the current Node-RED version.

3. In the Palette, select the Install tab. Type in node-red-contrib-knx-easy in the search bar and click the Install button for the needed library.

4. You will notice the prompt message. You can read the node documentation and select Install to confirm your action.

5. Go to Pallete → Nodes and you will see that the library has been installed.

Importing and configuring the flow for KNX dimming

  1. Copy the flow from the code snippet below. Then import it in the Node-RED using Import in Settings.


    [
        {
            "id": "2d0c0d58.b14db2",
            "type": "function",
            "z": "f3cbb407.924e38",
            "name": "funcion dimming KNX to E2D",
            "func": "\nif(msg.payload.decr_incr==1 & msg.payload.data==1)\n{\n    msg.payload= { \"HOLDUP\" : 1 };\n    return msg;\n}\nelse if(msg.payload.decr_incr==0 & msg.payload.data==0)\n{\n    msg.payload= { \"HOLDUP\" : 2 };\n    return msg;\n}\nelse if(msg.payload.decr_incr==0 & msg.payload.data==1)\n{\n    msg.payload= { \"HOLDDOWN\" : 1 };\n    return msg;\n}\nelse if(msg.payload.decr_incr==0 & msg.payload.data==0)\n{\n    msg.payload= { \"HOLDDOWN\" : 2 };\n    return msg;\n}\n",
            "outputs": 1,
            "noerr": 0,
            "x": 560,
            "y": 2800,
            "wires": [
                [
                    "dceeb47b.1ba7e8"
                ]
            ]
        },
        {
            "id": "385ca18a.e554ce",
            "type": "knxEasy-in",
            "z": "f3cbb407.924e38",
            "server": "dfe0bfd2.ff9b",
            "topic": "0/0/8",
            "dpt": "3.007",
            "initialread": false,
            "notifyreadrequest": false,
            "notifyresponse": false,
            "notifywrite": true,
            "name": "Dimming 0/0/8",
            "x": 320,
            "y": 2800,
            "wires": [
                [
                    "2d0c0d58.b14db2"
                ]
            ]
        },
        {
            "id": "dceeb47b.1ba7e8",
            "type": "vertex action",
            "z": "f3cbb407.924e38",
            "name": "Dimming",
            "typeButton": "dimm",
            "bPayload": {
                "DON": {
                    "action": "noreact",
                    "group": "29842950807acaf4bf4d5eb07a7b4d72",
                    "param": null,
                    "priority": "254"
                },
                "HOLDUP": {
                    "action": "upaction",
                    "group": "29842950807acaf4bf4d5eb07a7b4d72",
                    "param": null,
                    "priority": "254"
                },
                "HOLDDOWN": {
                    "action": "downaction",
                    "group": "29842950807acaf4bf4d5eb07a7b4d72",
                    "param": null,
                    "priority": "254"
                },
                "DOFF": {
                    "action": "noreact",
                    "group": "29842950807acaf4bf4d5eb07a7b4d72",
                    "param": null,
                    "priority": "254"
                }
            },
            "bState": false,
            "defaultpriority": true,
            "x": 790,
            "y": 2800,
            "wires": [
                [
                    "4607c546.253dec"
                ]
            ]
        },
        {
            "id": "4607c546.253dec",
            "type": "vertex cluster",
            "z": "f3cbb407.924e38",
            "userouting": false,
            "rate": 5,
            "x": 1130,
            "y": 2800,
            "wires": []
        },
        {
            "id": "dfe0bfd2.ff9b",
            "type": "knxEasy-config",
            "z": 0,
            "host": "10.0.6.100",
            "port": "3671"
        }
    ]

2. Go to the first node - knxEasy-in. Make sure that the gateway, group address and Datapoint are set correctly.

Provide the factual IP address and port of the gateway (the one in the flow is only exemplary).

Check if the group address given in the knxEasy-in node is the same as the one you want to control.

Datapoint should be set to 3.007

3. Go to the Vertex action node. Actions are already set, but if you would like to make some modifications, you can do this (at your own risk (wink) ).

4. Deploy the program and test it!

  • No labels