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 26 Next »

In a Vertex Action node Motion sensor mode is created to get the information from the motion sensor configured in a node (dali2devs or dali2common).

Input of the node:

These are commands received from Motion sensor:
{"payload": {"MSEVENT": 0}} - presence
{"payload": {"MSEVENT": 1}} - transition
{"payload": {"MSEVENT": 2}} - no presence

Additionally, each sensor is sending an individual UID (unique identifier):

You need to create a direct connection between a “device” node and a VA: Motion sensor node.

That’s because there is a list of devices in the Vertex Action node, and the logic behind it is waiting for all of the devices to report the No Presence event to turn off a group of luminaires.

Every flow “deploy” clears the list of devices that are connected to the Vertex Action.

Output of the node:

One of the above commands is sent directly to the vertex cluster node
OR
It can be splited by the msg.payload.MSEVENT value:

Tricks & tips:

  • Fake sensor events:

By using the "Inject" block into Vertex action, you are able to fake the action of a sensor, for example, to maintain the "Presence" state even in the absence of physical movement.

You need to send a msg.payload of { "MSEVENT": 0}; "UID" : "FAKE1" }:

[
    {
        "id": "8b0cf8a1.a69ad8",
        "type": "group",
        "z": "463437f9.dd86a8",
        "name": "Correct",
        "style": {
            "stroke": "#92d04f",
            "fill": "#e3f3d3",
            "label": true,
            "label-position": "n",
            "color": "#009919"
        },
        "nodes": [
            "e80d35a8.6d7d1",
            "d361885a.96a2c8",
            "39f5c80b.08bad",
            "b88f58bc.dff27",
            "931d822f.61c8d",
            "ec01ed4.c44cc9",
            "61f904f6.91ebd4",
            "bb07db98.3080b",
            "90fa4b74.21e36",
            "ff7fa553.91a68"
        ],
        "x": 334,
        "y": 139,
        "w": 1422,
        "h": 262
    },
    {
        "id": "e80d35a8.6d7d1",
        "type": "vertex action",
        "z": "463437f9.dd86a8",
        "g": "8b0cf8a1.a69ad8",
        "name": "Motion sensor",
        "typeButton": "motionsensor",
        "bPayload": {
            "PRESENCE": {
                "action": "setbrightness",
                "group": "1d606bc8d9eb7c1241805d7b07c81f1d",
                "param": "50",
                "priority": "255"
            },
            "TRANSITION": {
                "action": "setbrightness",
                "group": "1d606bc8d9eb7c1241805d7b07c81f1d",
                "param": "50",
                "priority": "0"
            },
            "NOPRESENCE": {
                "action": "setbrightness",
                "group": "1d606bc8d9eb7c1241805d7b07c81f1d",
                "param": "0",
                "priority": "254"
            }
        },
        "bState": "",
        "defaultpriority": true,
        "x": 790,
        "y": 260,
        "wires": [
            [
                "931d822f.61c8d"
            ]
        ]
    },
    {
        "id": "d361885a.96a2c8",
        "type": "dali2devs",
        "z": "463437f9.dd86a8",
        "g": "8b0cf8a1.a69ad8",
        "name": "Motion Sensor no1",
        "uid": "00000003A4214709BC",
        "dali2dev": "0",
        "instanceType": 3,
        "dali2t1": "10",
        "dali2t2": "",
        "mode": "",
        "x": 450,
        "y": 180,
        "wires": [
            [
                "e80d35a8.6d7d1"
            ]
        ]
    },
    {
        "id": "39f5c80b.08bad",
        "type": "dali2devs",
        "z": "463437f9.dd86a8",
        "g": "8b0cf8a1.a69ad8",
        "name": "Motion Sensor no2",
        "uid": "00000003A4214709BC",
        "dali2dev": "0",
        "instanceType": 3,
        "dali2t1": "10",
        "dali2t2": "",
        "mode": "",
        "x": 450,
        "y": 260,
        "wires": [
            [
                "e80d35a8.6d7d1"
            ]
        ]
    },
    {
        "id": "b88f58bc.dff27",
        "type": "dali2devs",
        "z": "463437f9.dd86a8",
        "g": "8b0cf8a1.a69ad8",
        "name": "Motion Sensor no3",
        "uid": "00000003A4214709BC",
        "dali2dev": "0",
        "instanceType": 3,
        "dali2t1": "10",
        "dali2t2": "",
        "mode": "",
        "x": 450,
        "y": 340,
        "wires": [
            [
                "e80d35a8.6d7d1"
            ]
        ]
    },
    {
        "id": "931d822f.61c8d",
        "type": "switch",
        "z": "463437f9.dd86a8",
        "g": "8b0cf8a1.a69ad8",
        "name": "Presence/Transition/NoPresence",
        "property": "payload.MSEVENT",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "0",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "1",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "2",
                "vt": "num"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 3,
        "x": 1080,
        "y": 260,
        "wires": [
            [
                "bb07db98.3080b"
            ],
            [
                "ec01ed4.c44cc9"
            ],
            [
                "ec01ed4.c44cc9"
            ]
        ]
    },
    {
        "id": "ec01ed4.c44cc9",
        "type": "vertex cluster",
        "z": "463437f9.dd86a8",
        "g": "8b0cf8a1.a69ad8",
        "rate": 5,
        "x": 1650,
        "y": 260,
        "wires": []
    },
    {
        "id": "61f904f6.91ebd4",
        "type": "vertex action",
        "z": "463437f9.dd86a8",
        "g": "8b0cf8a1.a69ad8",
        "name": "Direct Value",
        "typeButton": "directv",
        "bPayload": {
            "action": "setbrightness",
            "group": "1d606bc8d9eb7c1241805d7b07c81f1d",
            "param": 0,
            "priority": "254"
        },
        "bState": "",
        "defaultpriority": true,
        "x": 1500,
        "y": 220,
        "wires": [
            [
                "ec01ed4.c44cc9"
            ]
        ]
    },
    {
        "id": "bb07db98.3080b",
        "type": "change",
        "z": "463437f9.dd86a8",
        "g": "8b0cf8a1.a69ad8",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "level",
                "tot": "flow"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1320,
        "y": 220,
        "wires": [
            [
                "61f904f6.91ebd4"
            ]
        ]
    },
    {
        "id": "90fa4b74.21e36",
        "type": "inject",
        "z": "463437f9.dd86a8",
        "g": "8b0cf8a1.a69ad8",
        "name": "Presence",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "{\"MSEVENT\": 0, \"UID\": \"FAKE1\"}",
        "payloadType": "json",
        "x": 760,
        "y": 320,
        "wires": [
            [
                "e80d35a8.6d7d1"
            ]
        ]
    },
    {
        "id": "ff7fa553.91a68",
        "type": "inject",
        "z": "463437f9.dd86a8",
        "g": "8b0cf8a1.a69ad8",
        "name": "No presence",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "{\"MSEVENT\": 2, \"UID\": \"FAKE1\"}",
        "payloadType": "json",
        "x": 770,
        "y": 360,
        "wires": [
            [
                "e80d35a8.6d7d1"
            ]
        ]
    }
]
  • No labels