forked from colonelpanic/dotfiles
Add tvpower.js script
This commit is contained in:
parent
c71ad074b4
commit
67ba15c79c
12
dotfiles/lib/bin/tvpower.js
Executable file
12
dotfiles/lib/bin/tvpower.js
Executable 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();
|
||||||
|
});
|
||||||
|
});
|
Loading…
Reference in New Issue
Block a user