Add tvpower.js script

This commit is contained in:
Ivan Malison 2016-12-23 18:09:29 -08:00
parent c71ad074b4
commit 67ba15c79c
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8

12
dotfiles/lib/bin/tvpower.js Executable file
View File

@ -0,0 +1,12 @@
#!/usr/bin/env node
var lgtv = require("lgtv2")({
url: 'ws://10.0.0.136:3000'
});
lgtv.on('connect', function () {
console.log('connected');
lgtv.request('ssap://system/turnOff', function (err, res) {
lgtv.disconnect();
});
});