Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Remote 2 obs instances #245

Unanswered
fgraux asked this question in Q&A
Discussion options

Hi there,
I'm working on a node app to remote and link several services (Obs studio, casparCG, Xkeys keyboards...) and it fails to connect to two obs instances:
the app worked well untill I added the OBS AUX Device function (see the third function in my code). When the second obs server is called, it crashes immediately.
Basically, it this possible to connect 2 devices with the excellent obs-websocket-js ?
Thanks for your help

`//Connect to an OBS MAIN Device
function obsMain_detect(obsIP,callback){
obs.connect({ address: obsIP, password: '' }).then(() => {
obs_List(function(err, response){
if(!err){
term(response);
}
});
}).catch(console.error);
callback(undefined, "\n"+dateTimeNow()+"\t^#^M^W OBS AUX ^ \tOBS MAIN INSTANCE Connected: \t"+obsIP)
}

// OBS: Get Scenes & sources List from the main obs
async function obs_List(callback){
var nlist;
let obsList = await obs.send('GetSceneList').then(() => {
return obs.send('GetSceneList');
})
.then(data => {
nlist = (${data.scenes.length});
data.scenes.forEach(scene => {
obsSceneL +=(${scene.name}+';');
});
}).catch(console.error);
obsSceneL = obsSceneL.replace('undefined','');
IOSendData(['web'], 'obslist', obsSceneL);
callback(undefined, "\n"+dateTimeNow()+"\t^#^B^W \t ^ \tOBS Scenes List Loaded: "+nlist+" Scenes! \t ^ \t"+obsSceneL)
}

//Connect to an OBS AUX Device
function obsAux_detect(obsAux,callback){
if (obsAux!= ''){
obsAUX1.connect({ address: obsAux, password: '' }).catch(console.error);
callback(undefined, "\n"+dateTimeNow()+"\t^#^M^W OBS AUX ^ \tOBS AUX INSTANCE Connected: \t"+obsAux)
}}`

Versions Used (if applicable):

  • OS : Windows 10 pro 64-bit
  • obs-websocket-js version: 6.14.5
  • obs-websocket plugin version: 4.7.0
  • obs-studio version: 25.0.8 64-bit
  • node version: 13.13.0
You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant
Converted from issue

This discussion was converted from issue #200 on June 12, 2021 15:31.

AltStyle によって変換されたページ (->オリジナル) /