How to open-stop-close-stop using 2 buttons

Hi from Germany.
I use the old 433mhz transmitter and SonOff-433 to send commands to shelly devices.
How to actually i can only send open or close without using the stop command.

I suppress each message by 1 sec because I have 3 receivers on 3 floors.
Than I check the sequence string and send finally open or close command to the shelly roller units.

Con someone tell me what to add to have the function open-stop-open or close-stop-close. So if i press any button (open or close) after pressing any button before to stop the roller.

[
    {
        "id": "bc2edfa1.b6ad1",
        "type": "switch",
        "z": "f1fe3f5b.1fe31",
        "g": "c03beb6139b8f0c9",
        "name": "WZ Tür",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "cont",
                "v": "Data\":\"550015\",\"RfKey\":\"None\"",
                "vt": "str"
            },
            {
                "t": "cont",
                "v": "Data\":\"550014\",\"RfKey\":\"None\"",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": true,
        "outputs": 2,
        "x": 640,
        "y": 780,
        "wires": [
            [
                "f1d7ec6d.ce3bd"
            ],
            [
                "8a2fcf90.23853"
            ]
        ]
    },
    {
        "id": "f1d7ec6d.ce3bd",
        "type": "http request",
        "z": "f1fe3f5b.1fe31",
        "g": "c03beb6139b8f0c9",
        "name": "Open",
        "method": "POST",
        "ret": "txt",
        "paytoqs": "ignore",
        "url": "http://192.168.15.143/roller/0?go=open",
        "tls": "",
        "persist": false,
        "proxy": "",
        "insecureHTTPParser": false,
        "authType": "",
        "senderr": false,
        "headers": [],
        "x": 950,
        "y": 680,
        "wires": [
            []
        ]
    },
    {
        "id": "8a2fcf90.23853",
        "type": "http request",
        "z": "f1fe3f5b.1fe31",
        "g": "c03beb6139b8f0c9",
        "name": "Close",
        "method": "POST",
        "ret": "txt",
        "paytoqs": "ignore",
        "url": "http://192.168.15.143/roller/0?go=close",
        "tls": "",
        "persist": false,
        "proxy": "",
        "authType": "",
        "x": 950,
        "y": 800,
        "wires": [
            []
        ]
    }
]

Here is an example, but if you used the mqtt functions of the shelly devices this may be simpler.

if a statusCode 200 hundred is recieved the state open , close or stop is stored in context, when new button is pressed it checks whether the state is not stop and alters the command. the command is added to the http node url using {{mustache}} syntax

[{"id":"e3241a21f13a4f90","type":"inject","z":"d1395164b4eec73e","name":"open","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"Data\":\"550015\",\"RfKey\":\"None\"}","payloadType":"json","x":590,"y":7700,"wires":[["bc2edfa1.b6ad1"]]},{"id":"bc2edfa1.b6ad1","type":"switch","z":"d1395164b4eec73e","name":"WZ Tür","property":"payload.Data","propertyType":"msg","rules":[{"t":"cont","v":"550015","vt":"str"},{"t":"cont","v":"550014","vt":"str"}],"checkall":"true","repair":true,"outputs":2,"x":720,"y":7720,"wires":[["7cf5d70d9b72c9c6"],["71c43e56ba4791a7"]]},{"id":"4e78a96750cdc129","type":"inject","z":"d1395164b4eec73e","name":"close","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"Data\":\"550014\",\"RfKey\":\"None\"}","payloadType":"json","x":590,"y":7760,"wires":[["bc2edfa1.b6ad1"]]},{"id":"7cf5d70d9b72c9c6","type":"change","z":"d1395164b4eec73e","name":"","rules":[{"t":"set","p":"command","pt":"msg","to":"open","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":830,"y":7680,"wires":[["91bcaeeca25a540b"]]},{"id":"71c43e56ba4791a7","type":"change","z":"d1395164b4eec73e","name":"","rules":[{"t":"set","p":"command","pt":"msg","to":"close","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":830,"y":7760,"wires":[["91bcaeeca25a540b"]]},{"id":"91bcaeeca25a540b","type":"switch","z":"d1395164b4eec73e","name":"","property":"state1","propertyType":"flow","rules":[{"t":"eq","v":"stop","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":930,"y":7720,"wires":[["f1d7ec6d.ce3bd"],["0aa64ec4ae1eef90"]]},{"id":"0aa64ec4ae1eef90","type":"change","z":"d1395164b4eec73e","name":"","rules":[{"t":"set","p":"command","pt":"msg","to":"stop","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1070,"y":7760,"wires":[["f1d7ec6d.ce3bd"]]},{"id":"f1d7ec6d.ce3bd","type":"http request","z":"d1395164b4eec73e","name":"command","method":"POST","ret":"txt","paytoqs":"ignore","url":"http://192.168.15.143/roller/0?go={{payload}}","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":1100,"y":7720,"wires":[["77a0d0da099055bc"]]},{"id":"77a0d0da099055bc","type":"switch","z":"d1395164b4eec73e","name":"","property":"statusCode","propertyType":"msg","rules":[{"t":"eq","v":"200","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":1250,"y":7720,"wires":[["7abe960d17e1a4ca"]]},{"id":"7abe960d17e1a4ca","type":"change","z":"d1395164b4eec73e","name":"","rules":[{"t":"set","p":"state1","pt":"flow","to":"command","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1320,"y":7760,"wires":[["746a7ba624347c71"]]},{"id":"746a7ba624347c71","type":"debug","z":"d1395164b4eec73e","name":"debug 2487","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1270,"y":7820,"wires":[]}]

You would need a context state for each device

Thanks for the idea. I'll give it a try when I'm back in 2 weeks