akhan23wgu / amazon-alexa-lg-tv

⛔️ DEPRECATED Control your LG TV (webOS 2.0+) with Amazon Alexa
57 stars 21 forks source link
deprecated

Amazon Alexa LG TV

Use your Echo or Echo Dot to turn on/off your LG TV.

Compatibility

You need a TV with WebOS 2.0+. Compatible with Linux and MacOS (Python poll is not supported by Windows).

Usage

(You can also use stop/start in place of the turn on/off invocation)

Customize Commands

See https://github.com/klattimer/LGWebOSRemote for a full list of triggers.

Install

When you try to turn on/off the TV for the first you will need to allow the script to access your TV. Alternatively, run "python lgtv.py auth [IP Address]"

Supervisord

You can use supervisord to run your script Sample config:

[program:alexa-tv]
command=/usr/bin/python /srv/amazon-alexa-lg-tv/alexa-tv.py
process_name=%(program_name)s
numprocs=1
directory=/srv/amazon-alexa-lg-tv/
autorestart=true
user=nobody                   ; setuid to this UNIX account to run the program
redirect_stderr=true
stdout_logfile=/var/log/alexa-tv.log
stdout_logfile_maxbytes=1MB
stdout_capture_maxbytes=1MB

Thanks