Deploy a dashboard button that stops another flow

Hi,

I have 3 groups that continuously send data that constantly changes. I wanted to output the data but only when I click the dashboard button that corresponds to the relevant group.

So far I have it so that when the button is pressed, one message gets through.
I would like it so that the data continuously gets sent until the other button is pressed, then the data for the other group will get continuously sent.

I hope this make sense! Any help would be greatly appreciated xx

[
    {
        "id": "d715ce7f63909ee0",
        "type": "tab",
        "label": "Flow 1",
        "disabled": false,
        "info": ""
    },
    {
        "id": "7d28a540b7f54882",
        "type": "inject",
        "z": "d715ce7f63909ee0",
        "name": "",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "3",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "3",
        "payloadType": "str",
        "x": 150,
        "y": 220,
        "wires": [
            [
                "f4e5e32d1bfe8c43"
            ]
        ]
    },
    {
        "id": "fdec4aa76369abdd",
        "type": "inject",
        "z": "d715ce7f63909ee0",
        "name": "",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "5",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "4",
        "payloadType": "str",
        "x": 150,
        "y": 260,
        "wires": [
            [
                "f4e5e32d1bfe8c43"
            ]
        ]
    },
    {
        "id": "a696b15a32d869bf",
        "type": "inject",
        "z": "d715ce7f63909ee0",
        "name": "",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "3",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "1",
        "payloadType": "str",
        "x": 150,
        "y": 60,
        "wires": [
            [
                "a649eff2ab47bf5e"
            ]
        ]
    },
    {
        "id": "a969ecc748186fbe",
        "type": "inject",
        "z": "d715ce7f63909ee0",
        "name": "",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "5",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "2",
        "payloadType": "str",
        "x": 150,
        "y": 100,
        "wires": [
            [
                "a649eff2ab47bf5e"
            ]
        ]
    },
    {
        "id": "ef47f5895db2fdbf",
        "type": "ui_button",
        "z": "d715ce7f63909ee0",
        "name": "",
        "group": "bf9be13be0dffaf2",
        "order": 0,
        "width": 0,
        "height": 0,
        "passthru": false,
        "label": "Group 1",
        "tooltip": "",
        "color": "",
        "bgcolor": "",
        "icon": "",
        "payload": "one",
        "payloadType": "str",
        "topic": "topic",
        "topicType": "msg",
        "x": 340,
        "y": 40,
        "wires": [
            [
                "a649eff2ab47bf5e"
            ]
        ]
    },
    {
        "id": "6d4eaa54266c15a3",
        "type": "ui_button",
        "z": "d715ce7f63909ee0",
        "name": "",
        "group": "bf9be13be0dffaf2",
        "order": 1,
        "width": 0,
        "height": 0,
        "passthru": false,
        "label": "Group 2",
        "tooltip": "",
        "color": "",
        "bgcolor": "",
        "icon": "",
        "payload": "two",
        "payloadType": "str",
        "topic": "topic",
        "topicType": "msg",
        "x": 340,
        "y": 180,
        "wires": [
            [
                "f4e5e32d1bfe8c43"
            ]
        ]
    },
    {
        "id": "ae44a0e371a01452",
        "type": "debug",
        "z": "d715ce7f63909ee0",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 600,
        "y": 200,
        "wires": []
    },
    {
        "id": "f4e5e32d1bfe8c43",
        "type": "trigger",
        "z": "d715ce7f63909ee0",
        "name": "",
        "op1": "",
        "op2": "0",
        "op1type": "pay",
        "op2type": "str",
        "duration": "0",
        "extend": false,
        "overrideDelay": false,
        "units": "s",
        "reset": "two",
        "bytopic": "all",
        "topic": "topic",
        "outputs": 1,
        "x": 340,
        "y": 220,
        "wires": [
            [
                "ae44a0e371a01452"
            ]
        ]
    },
    {
        "id": "a649eff2ab47bf5e",
        "type": "trigger",
        "z": "d715ce7f63909ee0",
        "name": "",
        "op1": "",
        "op2": "0",
        "op1type": "pay",
        "op2type": "str",
        "duration": "0",
        "extend": false,
        "overrideDelay": true,
        "units": "s",
        "reset": "one",
        "bytopic": "all",
        "topic": "topic",
        "outputs": 1,
        "x": 340,
        "y": 80,
        "wires": [
            [
                "ae44a0e371a01452"
            ]
        ]
    },
    {
        "id": "bb102e16ef03c3d2",
        "type": "inject",
        "z": "d715ce7f63909ee0",
        "name": "",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "3",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "5",
        "payloadType": "str",
        "x": 150,
        "y": 380,
        "wires": [
            [
                "0e2821dffc517739"
            ]
        ]
    },
    {
        "id": "63b8ab58403ede2f",
        "type": "inject",
        "z": "d715ce7f63909ee0",
        "name": "",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "5",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "6",
        "payloadType": "str",
        "x": 150,
        "y": 420,
        "wires": [
            [
                "0e2821dffc517739"
            ]
        ]
    },
    {
        "id": "e7c786fb51fdd003",
        "type": "ui_button",
        "z": "d715ce7f63909ee0",
        "name": "",
        "group": "bf9be13be0dffaf2",
        "order": 1,
        "width": 0,
        "height": 0,
        "passthru": false,
        "label": "Group 3",
        "tooltip": "",
        "color": "",
        "bgcolor": "",
        "icon": "",
        "payload": "three",
        "payloadType": "str",
        "topic": "topic",
        "topicType": "msg",
        "x": 340,
        "y": 360,
        "wires": [
            [
                "0e2821dffc517739"
            ]
        ]
    },
    {
        "id": "0e2821dffc517739",
        "type": "trigger",
        "z": "d715ce7f63909ee0",
        "name": "",
        "op1": "",
        "op2": "0",
        "op1type": "pay",
        "op2type": "str",
        "duration": "0",
        "extend": false,
        "overrideDelay": false,
        "units": "s",
        "reset": "three",
        "bytopic": "all",
        "topic": "topic",
        "outputs": 1,
        "x": 340,
        "y": 400,
        "wires": [
            [
                "ae44a0e371a01452"
            ]
        ]
    },
    {
        "id": "8c940f348e1aaf61",
        "type": "comment",
        "z": "d715ce7f63909ee0",
        "name": "Group 1",
        "info": "",
        "x": 140,
        "y": 20,
        "wires": []
    },
    {
        "id": "7b6fc00f8f78f74f",
        "type": "comment",
        "z": "d715ce7f63909ee0",
        "name": "Group 2",
        "info": "",
        "x": 140,
        "y": 180,
        "wires": []
    },
    {
        "id": "52495428fdc42225",
        "type": "comment",
        "z": "d715ce7f63909ee0",
        "name": "Group 3",
        "info": "",
        "x": 140,
        "y": 340,
        "wires": []
    },
    {
        "id": "bf9be13be0dffaf2",
        "type": "ui_group",
        "name": "GROUP TEST",
        "tab": "589dc91f367141b6",
        "order": 1,
        "disp": true,
        "width": "6",
        "collapse": false
    },
    {
        "id": "589dc91f367141b6",
        "type": "ui_tab",
        "name": "Home",
        "icon": "dashboard",
        "disabled": false,
        "hidden": false
    }
]

Hi, this example relies on context storage and each group having a unique msg.topic.

[{"id":"a696b15a32d869bf","type":"inject","z":"d715ce7f63909ee0","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"3","crontab":"","once":false,"onceDelay":0.1,"topic":"one","payload":"1","payloadType":"str","x":160,"y":280,"wires":[["a27b8e4b.af785"]]},{"id":"a27b8e4b.af785","type":"switch","z":"d715ce7f63909ee0","name":"","property":"pass","propertyType":"flow","rules":[{"t":"eq","v":"topic","vt":"msg"}],"checkall":"true","repair":false,"outputs":1,"x":370,"y":360,"wires":[["ae44a0e371a01452","540ec1bc.d23cd8"]]},{"id":"7d28a540b7f54882","type":"inject","z":"d715ce7f63909ee0","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"3","crontab":"","once":false,"onceDelay":0.1,"topic":"two","payload":"2","payloadType":"str","x":160,"y":320,"wires":[["a27b8e4b.af785"]]},{"id":"bb102e16ef03c3d2","type":"inject","z":"d715ce7f63909ee0","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"3","crontab":"","once":false,"onceDelay":0.1,"topic":"three","payload":"3","payloadType":"str","x":170,"y":380,"wires":[["a27b8e4b.af785"]]},{"id":"ae44a0e371a01452","type":"debug","z":"d715ce7f63909ee0","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":630,"y":360,"wires":[]},{"id":"540ec1bc.d23cd8","type":"ui_text","z":"d715ce7f63909ee0","group":"bf9be13be0dffaf2","order":3,"width":0,"height":0,"name":"","label":"text","format":"{{msg.payload}}","layout":"row-spread","x":500,"y":420,"wires":[]},{"id":"ef47f5895db2fdbf","type":"ui_button","z":"d715ce7f63909ee0","name":"","group":"bf9be13be0dffaf2","order":0,"width":0,"height":0,"passthru":false,"label":"Group 1","tooltip":"","color":"","bgcolor":"","icon":"","payload":"one","payloadType":"str","topic":"pass","topicType":"str","x":430,"y":100,"wires":[["82615744.5d8ed"]]},{"id":"6d4eaa54266c15a3","type":"ui_button","z":"d715ce7f63909ee0","name":"","group":"bf9be13be0dffaf2","order":1,"width":0,"height":0,"passthru":false,"label":"Group 2","tooltip":"","color":"","bgcolor":"","icon":"","payload":"two","payloadType":"str","topic":"pass","topicType":"str","x":430,"y":140,"wires":[["82615744.5d8ed"]]},{"id":"e7c786fb51fdd003","type":"ui_button","z":"d715ce7f63909ee0","name":"","group":"bf9be13be0dffaf2","order":1,"width":0,"height":0,"passthru":false,"label":"Group 3","tooltip":"","color":"","bgcolor":"","icon":"","payload":"three","payloadType":"str","topic":"pass","topicType":"str","x":430,"y":180,"wires":[["82615744.5d8ed"]]},{"id":"82615744.5d8ed","type":"change","z":"d715ce7f63909ee0","name":"","rules":[{"t":"set","p":"pass","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":630,"y":140,"wires":[[]]},{"id":"bf9be13be0dffaf2","type":"ui_group","name":"GROUP TEST","tab":"589dc91f367141b6","order":1,"disp":true,"width":"6","collapse":false},{"id":"589dc91f367141b6","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]
1 Like

This is amazing! Thank you so much :blush:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.