msloth / lgtv.js

Control LG WebOS TV using node.js
MIT License
249 stars 119 forks source link

How to turn on the TV #20

Closed henrik closed 6 years ago

henrik commented 6 years ago

This isn't a question – I thought I'd put the info here since I looked for it here myself.

It seems you can't turn on the TV using these commands, presumably because it doesn't listen for commands when it's turned off.

What you instead can do is configure the TV to "wake on LAN" (wake when a certain network packet is sent to it), and then have a script send that packet.

You need to enable it on the TV: Under "general" settings, turn on "Mobile TV On".

As for the script, look for a "wake on LAN" script in your language of choice. I patched together this Ruby script, for example: https://gist.github.com/henrik/2824551d69e8e7f35ae61bd35ca08456

msloth commented 6 years ago

great, thanks 👍

also, congrats on the username!

henrik commented 6 years ago

Cheers :)