Skip to content

A library/CLI for control your sony bravia device.

Notifications You must be signed in to change notification settings

larvata/bravia-remote

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bravia-remote

A library/CLI for control your sony bravia device.

npm version

Use as Command Line Tools

npm install -g bravia-remote
  Usage: bravia [options]

  Options:

    -h, --help                 output usage information
    -V, --version              output the version number
    -s, --server <ipaddr>      tv ip address
    -c, --commands <commands>  remote commands
    -k, --pskkey <psk>         PSK key
    -l, --list-device-info     device infomation
    -v, --verbose              verbose mode

  Examples: 
    # get device status
    bravia -s 192.168.0.111 -k 0000 -l

    # switch the input source and volume up
    bravia -s 192.168.0.111 -k 0000 -c "setInputSource(DisplayPort),VolumeUp"

Use as Library

npm install --save bravia-remote
import Bravia from 'bravia-remote';

const bravia = new Bravia('192.168.0.111', '0000');

bravia.connect()
  .then((deviceInfo) => {
    const targetInput = deviceInfo.inputSource.find(is => is.label === 'DisplayPort');
    return bravia.setInputSource(targetInput.uri);
  })
  .then(() => {
    return bravia.sendRemoteCommand('VolumeUp');
  })
  .catch((err) => {
    console.log(err);
  });

About

A library/CLI for control your sony bravia device.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published