You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
}}`
This discussion was converted from issue #200 on June 12, 2021 15:31.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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):
Beta Was this translation helpful? Give feedback.
All reactions