Skip to content

Wrapper for API that allows controlling Samsung Multiroom speaker

Notifications You must be signed in to change notification settings

cosminlupu/samsung-multiroom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

samsung-multiroom

by @cosminlupu

Wrapper for the API provided by the Samsung MultiRoom speakers (R1 R3 R5)

Tested only with a Samsung R1 speaker

Current features

  • Get mute status
  • Set mute
  • Get volume
  • Set volume

How to use

const SamsungMultiroom = require('samsung-multiroom');
const sm = new SamsungMultiroom({
    host: '192.168.0.4',
    port: 55001, //optional
    timeout: 5000 //optional
});

sm.getVolume( (error, volume) => {
    if(error){
        console.log(error);
        return;
    }
    console.log(volume);// 0-100
});

sm.setVolume(volume, (error, volumeSet) => {
    if(error){
        console.log(error);
        return;
    }
    console.log(volumeSet);//boolean
});

sm.getMute( (error, muted) => {
    if(error){
        console.log(error);
        return;
    }
    console.log(muted);//boolean
});

sm.setMute(true, (error, muteSet) => {
    if(error){
        console.log(error);
        return;
    }
    console.log(muteSet); //boolean
});

Many thanks to bacl for documenting how the speaker can be controlled in WAM_API_DOC

License

MIT

About

Wrapper for API that allows controlling Samsung Multiroom speaker

Resources

Stars

Watchers

Forks

Packages

No packages published