efpe / amazon-alexa-lg-tv Goto Github PK
View Code? Open in Web Editor NEWControl your LG TV (webOS 3) with Amazon Alexa
Control your LG TV (webOS 3) with Amazon Alexa
amazon-alexa-lg-tv submitter$ python alexa-tv.py
Traceback (most recent call last):
File "alexa-tv.py", line 49, in
u.init_socket()
File "/Users/submitter/amazon-alexa-lg-tv/fauxmo.py", line 300, in init_socket
dbg("Failed to initialize UPnP sockets:",e)
TypeError: dbg() takes exactly 1 argument (2 given)
Do I need to create or enable a new Alexa skill for this to work?
Also are any other commands supported other than on/off?
Platform: Windows 10
Python version 2.7.13
It should be noted in the readme that you should pip install requests as a requirement.
Also, when running in windows, I get the following error when trying to run the script:
Traceback (most recent call last):
File "alexa-tv.py", line 47, in
p = fauxmo.poller()
File "C:\Scripts\amazon-alexa-lg-tv-master\fauxmo.py", line 67, in init
self.poller = select.poll()
AttributeError: 'module' object has no attribute 'poll'
This is caused because poll is not properly implemented in the Windows or MacOS versions of python. The newest version of fauxmo fixes this problem.
C:\Users\Yoga\Desktop\TB>c:\Python27\python.exe alexa-tv.py
Traceback (most recent call last):
File "alexa-tv.py", line 13, in
import fauxmo
File "C:\Users\Yoga\Desktop\TB\fauxmo.py", line 31, in
import requests
ImportError: No module named requests
When I run alexa-tv.py
I get critical exception
Listening for UPnP broadcasts UPnP broadcast listener: new device registered FauxMo device 'tv' ready on 192.168.1.8:52000 DEBUG:root:Entering fauxmo polling loop CRITICAL:root:Critical exception: argument should be integer or bytes-like object, not 'str'
When I discover devices on my Alexa, the console says "DEBUG:root:Responding to search for tv" but it does not show up in the list of devices on the app and says "Sorry, I didn't find TV" when i try to use the command.
on running tv off i'm getting the following error:
module.js:471
throw err;
^
Error: Cannot find module 'lgtv'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (/opt/amazon-alexa-lg-tv/tv_shutdown.js:1:70)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
TV turned off!
$ python alexa-tv.py
Traceback (most recent call last):
File "alexa-tv.py", line 17, in
from wakeonlan import wol
ImportError: cannot import name wol
Can you please help me resolve this error message?
I've ported the functionality of lgjs into python - https://github.com/klattimer/LGWebOSRemote
It's a command line tool using websockets but should be suitable for your needs too. Would remove the dependency on node from your project.
Everything else works fine, set my TV's mac address, however when I run the final command
C:\Projects\lgtv>python alexa-tv.py
Traceback (most recent call last):
File "alexa-tv.py", line 47, in
p = fauxmo.poller()
File "C:\Projects\lgtv\fauxmo.py", line 67, in init
self.poller = select.poll()
AttributeError: 'module' object has no attribute 'poll'
I get that error. Not a python guy, so any help would be appreciated.
install wakeonlan:
sudo git clone https://github.com/remcohaszing/pywakeonlan
sudo cd pywakeonlan/
sudo python setup.py install
Hi.
I'm unable to find this option "Mobile TV on" on my smartTV. could you tell me where is that option?
Thanks!!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.