felina22 / amazon-alexa-as-lg-tv-remote Goto Github PK
View Code? Open in Web Editor NEWControl your LG WebOS 3.0+ TV with Amazon Alexa
License: GNU General Public License v3.0
Control your LG WebOS 3.0+ TV with Amazon Alexa
License: GNU General Public License v3.0
I am running this in a Windows environment, I have installed node.js and python successfully installed all the requirements however when it comes to running the setup.py script it imports the LG module then fails on line 113 complaining about syntax with the brackets, please can someone advise who has this working in a Windows env.
Thanks
Hello, everything is fine on my tv.
I putted on the wake on lan.
TV is connected by ethernet
Hi FeLiNa22 - Opening a new issue as I received the following syntax error when running python Alexa.py (after running setup.py and entering my sinric API key in line 80):
File "Alexa.py", line 81
ws = websocket.WebSocketApp("ws://iot.sinric.com/",header={'Authorization:' + base64.b64encode('apikey: +' api '+ ')},on_message = on_message,on_error = on_error, on_close = on_close)
^
SyntaxError: invalid syntax
Hi,
I succesfully made this app working with alexa, but the only problem is that every time I ask alexa to do something with tv there is a promt on my tv to allow access for the app.
Here is the error I receive when I run setup.py:
Traceback (most recent call last):
File "setup.py", line 3, in
LGparser(['scan'])
NameError: name 'LGparser' is not defined
I tried running using sudo and receive the following error:
Traceback (most recent call last):
File "setup.py", line 1, in
import lgtv
File "/home/pi/GitHub/amazon-alexa-lg-tv/lgtv.py", line 6, in
from LGTV import LGTVScan, LGTVClient, getCommands
File "/home/pi/GitHub/amazon-alexa-lg-tv/LGTV/init.py", line 2, in
from ws4py.client.threadedclient import WebSocketClient
ImportError: No module named ws4py.client.threadedclient
Got it working on OLED55B7A, also any plans to implement app launching? Or any guidelines so I can implement?
I have a router running on a raspberry pi and I have this Lg tv controller on the same device. When I have the TV connected to the main network this program works fine. I have my phone connected to the subnetwork router on the pi so I would also like the tv connected to that same network so I can easily use the Lg tv app. When I run the setup.py it cannot find the tv even when typing in the IP address or localhost. Is there any way to do this?
Hi , i did every step and at the Initiating new websocket connection, it doesn't respond , would be it looking for the tv?
After I say YES on the TV I got the error
$ sudo python setup.py
timed out
timed out
timed out
timed out
{
"count": 0,
"result": "failed"
}
Enter IP of TV : '192.168.1.68'
No handlers could be found for logger "ws4py"
{"closing": {"reason": "Going away", "code": 1006}}
Traceback (most recent call last):
File "setup.py", line 10, in
lgtv.LGparser(['listChannels'])
File "/home/ribeiro/amazon-alexa-lg-tv-master/lgtv.py", line 113, in LGparser
ws.connect()
File "/home/ribeiro/.local/lib/python2.7/site-packages/ws4py/client/init.py", line 217, in connect
self.sock.connect(self.bind_addr)
File "/usr/lib/python2.7/socket.py", line 228, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 111] Connection refused
$
Hi again :)
Everything is working great, tested many of the functions. The only function that I can't get to work is to have Alexa power on my TV..
After I ask Alexa to turn TV on, I see the following in terminal:
messy : {"deviceId":"5c4bac8c398dcc587988bd0f","action":"setPowerState","value":"ON"}
ERROR LOL : Connection is already closed.
### closed ###
### Initiating new websocket connection ###
Hi,
i have used your script to control my old 55UK6750 which 3 weeks ago, died. Now i have UN74003LB, i and setup your application as last time. Everything works, but the LG TV UN74003LB is constantly is asking me AUTHORISE that LG remote app to connect to my TV, when i ask ALEXA to do something.
Last time, 55UK6750 TV only the first time ask me and that's all.
Is it possible to fix the LG TV UN74003LB, by adding some code in the script as automatic authorization, after setup?
I have openhab2, and everything works, NO authorization is needed.
The project was shut down and moved to 2.0 this project no longer works with sinric anymore. Will it be updated?
Hi there!,
I followed all instruction, I authorized the app in my TV. The device is recognized in Alexa, but when I say some instruction, nothing happen on the tv and Alexa says "ok". In the shell I have the following lines:
messy : {"deviceId":"5cb11c6e9f58230ab4c3c525","action":"setPowerState","value":"OFF"}
messy : {"deviceId":"5cb11c6e9f58230ab4c3c525","action":"setPowerState","value":"OFF"}
messy : {"deviceId":"5cb11c6e9f58230ab4c3c525","action":"SetVolume","value":{"volume":10}}
messy : {"deviceId":"5cb11c6e9f58230ab4c3c525","action":"SetVolume","value":{"volume":0}}
Something to do extra or again??
regards!
Hi,
Thank you for your amazing Alexa LG tv remote :)
Generally, most functions work well but I found that I can't turn on the TV after off
I know this issue happened before, but It happens again that reporting here
messy : {"deviceId":"5da2a92ca0866720351af2cd","action":"setPowerState","value":"OFF"}
{"type": "response", "id": "0", "payload": {"returnValue": true}}
{"closing": {"reason": "server shutting down", "code": 1001}}
messy : {"deviceId":"5da2a92ca0866720351af2cd","action":"setPowerState","value":"ON"}
ERROR LOL : [Errno 54] Connection reset by peer
It seems the main problem is a "connection"
May I ask how to solve this issue? (I know you don't handle this project anymore :( So, I apologise)
Thank you
Is there a python3 version of this
Tested on [LG] webOS TV OLED65B6P - works great!
Any idea what (if possible) the wording is for the Alexa command to open an app like YouTube or Netflix? These apps do show up in applists.json .
Has anyone converted this to sinric.pro yet? It won't be long before sinric.com is taken down.
See:
https://sinric.pro
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.