Push button on the dashboard

I propose adding a push button in the Device features.

For example, one of the first devices we want to control is the electric roller shutter(s).

One possibility is to use the features proposed here: Gestion des volets roulants - #13 par syper

Another possibility is to use only a push button (always the same message) that allows you to raise, stop or lower the shutter. Of course, behind it, you need to manage the command with a program.

Here is an example under node-red (not tested in real life and surely to be simplified and improved):

[
    {
        "id": "f7c7dff4.84a878",
        "type": "tab",
        "label": "Flow 1",
        "disabled": false,
        "info": ""
    },
    {
        "id": "d9c64d70.401e88",
        "type": "toggle",
        "z": "f7c7dff4.84a878",
        "name": "",
        "onOffTopic": "",
        "onValue": "Raise",
        "onType": "str",
        "offValue": "Lower",
        "offType": "str",
        "toggleTopic": "",
        "toggleValue": "",
        "toggleType": "any",
        "passOnOff": "ifChanged",
        "x": 710,
        "y": 620,
        "wires": [
            [
                "78be339b.b82cd4"
            ]
        ]
    },
    {
        "id": "7e57fa0e.b124ac",
        "type": "gate",
        "z": "f7c7dff4.84a878",
        "name": "Gate1",
        "controlTopic": "control",
        "defaultState": "open",
        "openCmd": "open",
        "closeCmd": "close",
        "toggleCmd": "toggle",
        "defaultCmd": "default",
        "statusCmd": "status",
        "persist": false,
        "x": 410,
        "y": 620,
        "wires": [
            [
                "d9c64d70.401e88",
                "59dd700a.af8a48"
            ]
        ]
    },
    {
        "id": "9e19b878.d70778",
        "type": "inject",
        "z": "f7c7dff4.84a878",
        "name": "",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "1",
        "payloadType": "num",
        "x": 120,
        "y": 620,
        "wires": [
            [
                "7e57fa0e.b124ac",
                "d88405a7.90e3d",
                "150843d.3e3c5bc"
            ]
        ]
    },
    {
        "id": "59dd700a.af8a48",
        "type": "change",
        "z": "f7c7dff4.84a878",
        "name": "Close Gate1",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "close",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "control",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 410,
        "y": 700,
        "wires": [
            [
                "7e57fa0e.b124ac"
            ]
        ]
    },
    {
        "id": "eb39983c.de23b",
        "type": "delay",
        "z": "f7c7dff4.84a878",
        "name": "Delay-Raise",
        "pauseType": "delay",
        "timeout": "5",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "1",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": false,
        "x": 380,
        "y": 340,
        "wires": [
            [
                "28a95477.a4e2e4",
                "4c732a2e.09a63c",
                "6279ad34.e5249c"
            ]
        ]
    },
    {
        "id": "28a95477.a4e2e4",
        "type": "change",
        "z": "f7c7dff4.84a878",
        "name": "Open Gate1",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "open",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "control",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 810,
        "y": 380,
        "wires": [
            [
                "7e57fa0e.b124ac"
            ]
        ]
    },
    {
        "id": "78be339b.b82cd4",
        "type": "switch",
        "z": "f7c7dff4.84a878",
        "name": "",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "Raise",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "Lower",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 830,
        "y": 620,
        "wires": [
            [
                "eb39983c.de23b",
                "56c08aac.df5f54"
            ],
            [
                "9d214b72.543dd8",
                "d7d4fc60.b18198"
            ]
        ]
    },
    {
        "id": "9d214b72.543dd8",
        "type": "delay",
        "z": "f7c7dff4.84a878",
        "name": "Delay-Lower",
        "pauseType": "delay",
        "timeout": "5",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "1",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": false,
        "x": 390,
        "y": 500,
        "wires": [
            [
                "28a95477.a4e2e4",
                "4c732a2e.09a63c",
                "6279ad34.e5249c"
            ]
        ]
    },
    {
        "id": "3da4444c.f68c74",
        "type": "pi-gpiod out",
        "z": "f7c7dff4.84a878",
        "name": "Cmd-Lower",
        "host": "localhost",
        "port": 8888,
        "pin": "17",
        "set": true,
        "level": "0",
        "out": "out",
        "sermin": "1000",
        "sermax": "2000",
        "freq": "800",
        "x": 1320,
        "y": 720,
        "wires": []
    },
    {
        "id": "96fd20cc.c28ee8",
        "type": "pi-gpiod out",
        "z": "f7c7dff4.84a878",
        "name": "Cmd-Raise",
        "host": "localhost",
        "port": 8888,
        "pin": "18",
        "set": true,
        "level": "0",
        "out": "out",
        "sermin": "1000",
        "sermax": "2000",
        "freq": "800",
        "x": 1270,
        "y": 500,
        "wires": []
    },
    {
        "id": "4c732a2e.09a63c",
        "type": "change",
        "z": "f7c7dff4.84a878",
        "name": "Reset cmd Raise and Lower",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "0",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 790,
        "y": 320,
        "wires": [
            [
                "96fd20cc.c28ee8",
                "3da4444c.f68c74",
                "7d3de0e.ac55ea",
                "957cfc2a.95f948"
            ]
        ]
    },
    {
        "id": "d7d4fc60.b18198",
        "type": "change",
        "z": "f7c7dff4.84a878",
        "name": "Cmd Lower",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "1",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1000,
        "y": 680,
        "wires": [
            [
                "3da4444c.f68c74",
                "957cfc2a.95f948"
            ]
        ]
    },
    {
        "id": "56c08aac.df5f54",
        "type": "change",
        "z": "f7c7dff4.84a878",
        "name": "Cmd Raise",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "1",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 990,
        "y": 560,
        "wires": [
            [
                "96fd20cc.c28ee8",
                "7d3de0e.ac55ea"
            ]
        ]
    },
    {
        "id": "150843d.3e3c5bc",
        "type": "gate",
        "z": "f7c7dff4.84a878",
        "name": "Gate2",
        "controlTopic": "control",
        "defaultState": "closed",
        "openCmd": "open",
        "closeCmd": "close",
        "toggleCmd": "toggle",
        "defaultCmd": "default",
        "statusCmd": "status",
        "persist": false,
        "x": 470,
        "y": 840,
        "wires": [
            [
                "4c732a2e.09a63c",
                "28a95477.a4e2e4",
                "6279ad34.e5249c",
                "dc5b447a.5abbb8"
            ]
        ]
    },
    {
        "id": "d88405a7.90e3d",
        "type": "change",
        "z": "f7c7dff4.84a878",
        "name": "Open Gate2",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "open",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "control",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 210,
        "y": 840,
        "wires": [
            [
                "150843d.3e3c5bc"
            ]
        ]
    },
    {
        "id": "6279ad34.e5249c",
        "type": "change",
        "z": "f7c7dff4.84a878",
        "name": "Close Gate2",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "close",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "control",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 810,
        "y": 460,
        "wires": [
            [
                "150843d.3e3c5bc"
            ]
        ]
    },
    {
        "id": "7d3de0e.ac55ea",
        "type": "debug",
        "z": "f7c7dff4.84a878",
        "name": "order raise",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1180,
        "y": 360,
        "wires": []
    },
    {
        "id": "957cfc2a.95f948",
        "type": "debug",
        "z": "f7c7dff4.84a878",
        "name": "Order lower",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1190,
        "y": 800,
        "wires": []
    },
    {
        "id": "dc5b447a.5abbb8",
        "type": "change",
        "z": "f7c7dff4.84a878",
        "name": "Reset Delay",
        "rules": [
            {
                "t": "set",
                "p": "reset",
                "pt": "msg",
                "to": "",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 140,
        "y": 440,
        "wires": [
            [
                "eb39983c.de23b",
                "9d214b72.543dd8"
            ]
        ]
    }
]

What’s cool about a push button is that you can control whatever you want (a motor, a latching function, a reset, program it in short or long press, double click…).

@Fabic what’s the difference with the current « button click Â» feature? :slight_smile:

Hello @pierre-gilles,

unless I am mistaken, the button click only allows reading a status sent to Gladys.
The idea here is to control, like with the « Lighting ON/OFF Â» feature but with a push button or pushbutton.

To try to illustrate, in a home for example you usually control the lights with one (or 2 switches): this is the equivalent of the « Lighting ON/OFF Â» feature.

However when the commands exceed two switches we use a latching relay (even if the wiring is possible but much more complicated) controlled by pushbutton switches (which always return to their position). The latching relay will change state with each pulse, open contact then closed (0 then 1 then 0 …) whether it is controlled with the 1st pushbutton switch or the nth.

In the application, by pressing the push button, you could send the same message via the API (for example 1) with each press to control what you want!

Indeed my bad you are right!
This button is missing in the other direction :slight_smile:

For the representation, I would have liked a blue circle that turns white for 1/2 second during the pulse

Isn’t this a toggle?

I think he just wants a push button like we did back in the v3 days with @piznel and @MathieuA

https://community.gladysassistant.com/t/devicetype-de-type-push-button/2886?u=spenceur

The button automatically returns to state 0 after a press

Oh ok I see (I hadn’t understood :sweat_smile:)

Exactly, either a toggle that automatically returns to 0 or a button that returns to its position.

Today, Gladys does this: https://www.se.com/fr/fr/product/XB4BD21/harmony-xb4-bouton-tournant-manette-ø22-2-pos-fix-noir-1f-vis-étrier/?parent-subcategory-id=89188

My suggestion: https://www.se.com/fr/fr/product/XB4BA21/harmony-xb4-bouton-poussoir-à-impulsion-ø22-noir-1f-vis-étrier/?parent-subcategory-id=89188

Yeah like a horn :grin:

Absolutely! The current Gladys toggle is the warning

I can’t vote anymore… but I upvote this feature request! :wink:

For a similar need I created a fake MQTT device acting as a switch and behind it I have a scene that activates as soon as the button goes ON and after waiting 500ms automatically sets the switch back to OFF.
Then this button can be assigned via another scene to control something else…

It works on the principle of a short press…

I don’t know if this can help in the meantime?

Hello everyone :slight_smile:

This feature is available in Gladys Assistant 4.49:

I’m closing this thread to free up the votes :folded_hands: