Control VLC in node red 3

Hi everybody,

I search to control VLC in node red.

I've vidéo needs to be play in loop mode. to make this i use a trigger to send go at the video end.

[
    {
        "id": "60e7fec1d0aab87d",
        "type": "exec",
        "z": "b3a4f8600535e6f2",
        "command": "export DISPLAY=:0 && vlc /home/timoxy/Desktop/boucledef.mp4",
        "addpay": "",
        "append": "",
        "useSpawn": "false",
        "timer": "0",
        "winHide": false,
        "oldrc": false,
        "name": "Video boucle",
        "x": 3830,
        "y": 1300,
        "wires": [
            [],
            [],
            []
        ]
    },
    {
        "id": "6ed2b9fa8d8ce8cf",
        "type": "trigger",
        "z": "b3a4f8600535e6f2",
        "name": "Boucle vidéo 88 s",
        "op1": "1",
        "op2": "0",
        "op1type": "str",
        "op2type": "str",
        "duration": "-88",
        "extend": false,
        "overrideDelay": false,
        "units": "s",
        "reset": "stop",
        "bytopic": "all",
        "topic": "topic",
        "outputs": 1,
        "x": 3610,
        "y": 1300,
        "wires": [
            [
                "60e7fec1d0aab87d"
            ]
        ]
    },
    {
        "id": "3718eef95a9b8ed4",
        "type": "inject",
        "z": "b3a4f8600535e6f2",
        "name": "Auto start boucle",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": true,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "1",
        "payloadType": "num",
        "x": 3370,
        "y": 1300,
        "wires": [
            [
                "6ed2b9fa8d8ce8cf"
            ]
        ]
    }
]

This is ok.
Now i need to launch an other vidéo at the end of the game.

And for this i use it :

[
    {
        "id": "60e7fec1d0aab87d",
        "type": "exec",
        "z": "b3a4f8600535e6f2",
        "command": "export DISPLAY=:0 && vlc /home/timoxy/Desktop/boucledef.mp4",
        "addpay": "",
        "append": "",
        "useSpawn": "false",
        "timer": "0",
        "winHide": false,
        "oldrc": false,
        "name": "Video boucle",
        "x": 3830,
        "y": 1300,
        "wires": [
            [],
            [],
            []
        ]
    },
    {
        "id": "6ed2b9fa8d8ce8cf",
        "type": "trigger",
        "z": "b3a4f8600535e6f2",
        "name": "Boucle vidéo 88 s",
        "op1": "1",
        "op2": "0",
        "op1type": "str",
        "op2type": "str",
        "duration": "-88",
        "extend": false,
        "overrideDelay": false,
        "units": "s",
        "reset": "stop",
        "bytopic": "all",
        "topic": "topic",
        "outputs": 1,
        "x": 3610,
        "y": 1300,
        "wires": [
            [
                "60e7fec1d0aab87d"
            ]
        ]
    },
    {
        "id": "01e6ec691f86fe25",
        "type": "exec",
        "z": "b3a4f8600535e6f2",
        "command": "export DISPLAY=:0 && vlc /home/timoxy/Desktop/perdudef.mp4",
        "addpay": "",
        "append": "",
        "useSpawn": "false",
        "timer": "0",
        "winHide": false,
        "oldrc": false,
        "name": "Video perdu",
        "x": 3370,
        "y": 1420,
        "wires": [
            [],
            [],
            []
        ]
    },
    {
        "id": "b12896a6c43edfde",
        "type": "ui_button",
        "z": "b3a4f8600535e6f2",
        "name": "Vidéo perdu",
        "group": "c610de28f5057fa3",
        "order": 2,
        "width": 6,
        "height": 1,
        "passthru": false,
        "label": "Video perdu",
        "tooltip": "",
        "color": "",
        "bgcolor": "{{background}}",
        "className": "",
        "icon": "",
        "payload": "stop",
        "payloadType": "str",
        "topic": "stop",
        "topicType": "msg",
        "x": 3010,
        "y": 1400,
        "wires": [
            [
                "01e6ec691f86fe25",
                "86defcd86817f1a2",
                "87e55050e6fa4486",
                "16da204e4edf1eb3"
            ]
        ]
    },
    {
        "id": "3718eef95a9b8ed4",
        "type": "inject",
        "z": "b3a4f8600535e6f2",
        "name": "Auto start boucle",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": true,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "1",
        "payloadType": "num",
        "x": 3370,
        "y": 1300,
        "wires": [
            [
                "6ed2b9fa8d8ce8cf"
            ]
        ]
    },
    {
        "id": "c7edae2312bfc3fc",
        "type": "change",
        "z": "b3a4f8600535e6f2",
        "name": "Vert",
        "rules": [
            {
                "t": "set",
                "p": "background",
                "pt": "msg",
                "to": "Green",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 2890,
        "y": 1520,
        "wires": [
            [
                "b12896a6c43edfde"
            ]
        ]
    },
    {
        "id": "02f34dceb093a3b9",
        "type": "change",
        "z": "b3a4f8600535e6f2",
        "name": "Rouge",
        "rules": [
            {
                "t": "set",
                "p": "background",
                "pt": "msg",
                "to": "red",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 3110,
        "y": 1520,
        "wires": [
            [
                "b12896a6c43edfde"
            ]
        ]
    },
    {
        "id": "87e55050e6fa4486",
        "type": "delay",
        "z": "b3a4f8600535e6f2",
        "name": "Delai passage vert",
        "pauseType": "delay",
        "timeout": "0.5",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "1",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": false,
        "allowrate": false,
        "outputs": 1,
        "x": 2910,
        "y": 1460,
        "wires": [
            [
                "c7edae2312bfc3fc",
                "1d084d36709c99b6"
            ]
        ]
    },
    {
        "id": "1d084d36709c99b6",
        "type": "delay",
        "z": "b3a4f8600535e6f2",
        "name": "Délai rouge",
        "pauseType": "delay",
        "timeout": "60",
        "timeoutUnits": "minutes",
        "rate": "1",
        "nbRateUnits": "1",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": false,
        "allowrate": false,
        "outputs": 1,
        "x": 3110,
        "y": 1460,
        "wires": [
            [
                "02f34dceb093a3b9"
            ]
        ]
    },
    {
        "id": "16da204e4edf1eb3",
        "type": "change",
        "z": "b3a4f8600535e6f2",
        "name": "Stop boucle ",
        "rules": [
            {
                "t": "change",
                "p": "payload",
                "pt": "msg",
                "from": "0",
                "fromt": "num",
                "to": "stop",
                "tot": "str"
            },
            {
                "t": "change",
                "p": "payload",
                "pt": "msg",
                "from": "COURT",
                "fromt": "str",
                "to": "stop",
                "tot": "str"
            },
            {
                "t": "change",
                "p": "payload",
                "pt": "msg",
                "from": "stop",
                "fromt": "str",
                "to": "stop",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 3370,
        "y": 1360,
        "wires": [
            [
                "6ed2b9fa8d8ce8cf"
            ]
        ]
    },
    {
        "id": "c610de28f5057fa3",
        "type": "ui_group",
        "name": "Fin",
        "tab": "cb8fc504867904ea",
        "order": 5,
        "disp": true,
        "width": "6",
        "collapse": false,
        "className": ""
    },
    {
        "id": "cb8fc504867904ea",
        "type": "ui_tab",
        "name": "Salle INDIANA",
        "icon": "dashboard",
        "order": 1,
        "disabled": false,
        "hidden": false
    }
]

Problem, i can ear the sound, but my vidéo loop don't stop. I try with an exec node when i push on "vidéo perdu" and the msg.kill but nothing too. My vidéo loop stay play.

What is your purpose to male this correctly ?

thanks in advance.

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