1.0.1 • Published 4 years ago
@leonardosalles/remote-control-samsung v1.0.1
Library for remote control Samsung TV in your NodeJS application.
Tested with Samsung UE43NU7400 and UN55NU7100
Installation
Requires Node v9 or above.
npm install @leonardosalles/remote-control-samsung --save
Or
yarn add @leonardosalles/remote-control-samsung
Usage
const { Samsung, KEYS } = require('@leonardosalles/remote-control-samsung')
(async () => {
const config = {
name: 'NodeJS-Test',
ip: '192.168.1.2',
mac: '123456789ABC',
token: '12345678'
}
const control = new Samsung(config)
try {
const isAvaliable = await control.isAvaliable()
if (isAvaliable) {
const response = await control.sendKey(KEYS.KEY_HOME)
console.log(response)
}
} catch(e) {
console.error(e)
}
})()
Commands List
All commands you can find here