1.1.4 • Published 5 years ago
remote-control-samsung v1.1.4
Library for remote control Samsung TV in your NodeJS application.
Tested with Samsung UE43NU7400 and UN55NU7100
Installation
Requires Node v9 or above.
npm install remote-control-samsung --save
Usage
const Samsung = require('remote-control-samsung').default
const { KEYS } = require('remote-control-samsung/lib/keys')
const config = {
name: 'NodeJS-Test',
ip: '192.168.1.2',
mac: '123456789ABC',
token: '12345678'
}
const control = new Samsung(config)
control.turnOn()
control.isAvaliable().then(() => {
control.sendKey(KEYS.KEY_HOME, function(err, res) {
if (err) {
throw new Error(err)
} else {
console.log(res)
}
})
}).catch(e => console.error(e))
Commands List
All commands you can find here