hi all..
i have Node Red connected to OBS using websockets.. i have a basic flow to change between three OBS scenes.. the flow mostly works but im seeing some problems..
If i have the transition in OBS to be a fade, say 2 seconds duration.. when I fade from scene A to scene B, if i press scene C during the 2 seconds this interrupts the original fade.. i want the first transition to complete without interruption so i added a context variable to try and stop this..
The variable (in theory) should prevent other inputs while the initial transition is in progress and then allow new inputs at the end of the transition.. It kinda works but ive noticed if you button mash between the 3 scenes during the 2 second fade it will get stuck at times and not reset properly.. it seems like a timing thing around when the variable is being stored and retrieved..
Obviously the easy answer is dont button mash.. i dont plan to do that but i would also like the flow to be robust so no bad inputs trip it up.. would anyone know whats happening and also what would be a good way to fix it ?
[
{
"id": "f3843b2dde420604",
"type": "tab",
"label": "Flow 5",
"disabled": false,
"info": "",
"env": []
},
{
"id": "1b74465076378299",
"type": "change",
"z": "f3843b2dde420604",
"name": "",
"rules": [
{
"t": "set",
"p": "scene",
"pt": "flow",
"to": "0",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 680,
"y": 500,
"wires": [
[
"35b36ded1a84ebf7"
]
]
},
{
"id": "bfe2117bc0f72a41",
"type": "switch",
"z": "f3843b2dde420604",
"name": "",
"property": "scene",
"propertyType": "flow",
"rules": [
{
"t": "eq",
"v": "1",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 510,
"y": 500,
"wires": [
[
"1b74465076378299"
]
]
},
{
"id": "4c8ecccfc6d1f309",
"type": "change",
"z": "f3843b2dde420604",
"name": "Reset Scene",
"rules": [
{
"t": "set",
"p": "scene",
"pt": "flow",
"to": "1",
"tot": "num"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 770,
"y": 280,
"wires": [
[]
]
},
{
"id": "ebf52d2368c83990",
"type": "switch",
"z": "f3843b2dde420604",
"name": "",
"property": "scene",
"propertyType": "flow",
"rules": [
{
"t": "eq",
"v": "1",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 510,
"y": 460,
"wires": [
[
"689bcba28fd47f79"
]
]
},
{
"id": "689bcba28fd47f79",
"type": "change",
"z": "f3843b2dde420604",
"name": "",
"rules": [
{
"t": "set",
"p": "scene",
"pt": "flow",
"to": "0",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 680,
"y": 460,
"wires": [
[
"59630c7db7a972d3"
]
]
},
{
"id": "c7b1c5706eefd018",
"type": "obs connection status",
"z": "f3843b2dde420604",
"name": "",
"obsInstance": "beb40fb0849fb564",
"x": 480,
"y": 220,
"wires": [
[
"27f1284f7c8066de"
]
]
},
{
"id": "f9820109602da506",
"type": "inject",
"z": "f3843b2dde420604",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 320,
"y": 460,
"wires": [
[
"ebf52d2368c83990"
]
]
},
{
"id": "fcc20dc9ea8a289b",
"type": "inject",
"z": "f3843b2dde420604",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 320,
"y": 500,
"wires": [
[
"bfe2117bc0f72a41"
]
]
},
{
"id": "59630c7db7a972d3",
"type": "SetCurrentProgramScene",
"z": "f3843b2dde420604",
"name": "Left Cam",
"scene": "Left CAM OP",
"sceneType": "sceneName",
"obsInstance": "beb40fb0849fb564",
"x": 960,
"y": 460,
"wires": [
[]
]
},
{
"id": "35b36ded1a84ebf7",
"type": "SetCurrentProgramScene",
"z": "f3843b2dde420604",
"name": "Right Cam",
"scene": "Right CAM OP",
"sceneType": "sceneName",
"obsInstance": "beb40fb0849fb564",
"x": 970,
"y": 500,
"wires": [
[]
]
},
{
"id": "727954a46cbfb484",
"type": "obs event",
"z": "f3843b2dde420604",
"name": "",
"event": "SceneTransitionEnded",
"obsInstance": "beb40fb0849fb564",
"x": 480,
"y": 280,
"wires": [
[
"4c8ecccfc6d1f309"
]
]
},
{
"id": "27f1284f7c8066de",
"type": "change",
"z": "f3843b2dde420604",
"name": "",
"rules": [
{
"t": "set",
"p": "scene",
"pt": "flow",
"to": "1",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 780,
"y": 220,
"wires": [
[]
]
},
{
"id": "693bbb945f3bfd2e",
"type": "switch",
"z": "f3843b2dde420604",
"name": "",
"property": "scene",
"propertyType": "flow",
"rules": [
{
"t": "eq",
"v": "1",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 510,
"y": 420,
"wires": [
[
"bb0c660449eb4177"
]
]
},
{
"id": "bb0c660449eb4177",
"type": "change",
"z": "f3843b2dde420604",
"name": "",
"rules": [
{
"t": "set",
"p": "scene",
"pt": "flow",
"to": "0",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 680,
"y": 420,
"wires": [
[
"130078284492b0ac"
]
]
},
{
"id": "42b55c21324980a5",
"type": "inject",
"z": "f3843b2dde420604",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 320,
"y": 420,
"wires": [
[
"693bbb945f3bfd2e"
]
]
},
{
"id": "130078284492b0ac",
"type": "SetCurrentProgramScene",
"z": "f3843b2dde420604",
"name": "Rear Cam",
"scene": "Drums",
"sceneType": "sceneName",
"obsInstance": "beb40fb0849fb564",
"x": 970,
"y": 420,
"wires": [
[]
]
},
{
"id": "beb40fb0849fb564",
"type": "obs-instance",
"name": "OBS Instance",
"host": "192.168.178.26",
"port": "4455"
}
]