It used to work, using the snap version that was version 27 or maybe slightly less, with the plugin preinstalled, and I used it to have a Slave instance follow a Master one on the same machine, using this python script:
Now, with version 28 installed from OBS's PPA, which of course has websockets built-in, I can't set multiple instances differently. Different profiles, different scene collections, and they still insist on using the same websocket. I also tried to disable one and enable the other, so that the Advanced Scene Switcher plugin might send a message straight across, but I can't even do that. They completely insist on having the exact same settings in their entirety.
Is there a solution to this? Can two instances of OBS 28 on the same machine be made to use different websocket settings?
Python:
#!/usr/bin/env python
import re
import sys
import subprocess
from obswebsocket import obsws, events, requests
wsSlv = obsws("localhost", 4456, "NotTheRealPassword!")
try:
wsSlv.connect()
except:
print("Error: Could not connect to OBS Slave")
sys.exit(-1)
def on_switch(message):
name = message.getSceneName()
if re.match("Camera.*", name):
wsSlv.call(requests.SetCurrentScene("Camera"))
if re.match("Feature.*", name):
wsSlv.call(requests.SetCurrentScene("Feature"))
if re.match("Voiceover.*", name):
wsSlv.call(requests.SetCurrentScene("Voiceover"))
wsMst = obsws("localhost", 4455, "NotTheRealPassword!")
wsMst.register(on_switch, events.SwitchScenes)
try:
wsMst.connect()
except:
try:
wsSlv.disconnect()
except:
pass
print("Error: Could not connect to OBS Master")
sys.exit(-2)
# Expect a dialog command and message, to be passed as arguments to this script
# Closing the dialog is taken as a shutdown command, so this doesn't return until then
subprocess.run(sys.argv[1:])
# Disconnect from both, if possible
# If not, don't worry about it; it probably is already
try:
wsMst.disconnect()
except:
pass
try:
wsSlv.disconnect()
except:
pass
sys.exit(0)
Is there a solution to this? Can two instances of OBS 28 on the same machine be made to use different websocket settings?