Coder Social home page Coder Social logo

Doesn't work about amazon-alexa-lg-tv HOT 14 OPEN

k-bharadwaj avatar k-bharadwaj commented on June 28, 2024
Doesn't work

from amazon-alexa-lg-tv.

Comments (14)

frekel avatar frekel commented on June 28, 2024

Can you tell me which version of python you are using?
Maybe I can help you a bit!

from amazon-alexa-lg-tv.

efpe avatar efpe commented on June 28, 2024

That line is clearly wrong, you can try to replace it (and all the similar dbg lines) to:
dbg("Failed to initialize UPnP sockets: {}".format(e))

I will push the code when I have the time. Your problem is not coming from this line but at least you will see the error message.

from amazon-alexa-lg-tv.

andrewdudex avatar andrewdudex commented on June 28, 2024

I'm having the same issues:

Traceback (most recent call last):

File "alexa-tv.py", line 49, in
u.init_socket()
File "/usr/bin/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)

I tried changing that line of code you suggested, efpe, and it seemed to move forward but my echo could never mind the server...

from amazon-alexa-lg-tv.

andrewdudex avatar andrewdudex commented on June 28, 2024

If it makes any difference I'm using a mac with python version 2.7

from amazon-alexa-lg-tv.

edupin2 avatar edupin2 commented on June 28, 2024

I receive too this error, anyone knows how to solve it?

Traceback (most recent call last):
File "/alexa-tv2/alexa-tv.py", line 69, in
u.init_socket()
File "/alexa-tv2/fauxmo.py", line 300, in init_socket
dbg("Failed to initialize UPnP sockets:",e)
TypeError: dbg() takes exactly 1 argument (2 given)

from amazon-alexa-lg-tv.

edugc310 avatar edugc310 commented on June 28, 2024

dbg("Failed to initialize UPnP sockets:",e)
TypeError: dbg() takes exactly 1 argument (2 given)

Same error over here. It was working before. Now it is not. What happened?

from amazon-alexa-lg-tv.

edugc310 avatar edugc310 commented on June 28, 2024

I use this line instead: dbg("Failed to initialize UPnP sockets: {}".format(e))

I get this DEBUG:root:Failed to initialize UPnP sockets: dbg() takes exactly 1 argument (2 given)

But all the others running.

from amazon-alexa-lg-tv.

stevena9475 avatar stevena9475 commented on June 28, 2024

i got the same, did you ever work out what was wrong

from amazon-alexa-lg-tv.

stevena9475 avatar stevena9475 commented on June 28, 2024

DEBUG:root:Failed to initialize UPnP sockets: dbg() takes exactly 1 argument (2 given)
DEBUG:root:got local address of 192.168.0.52
DEBUG:root:UPnP broadcast listener: new device registered
DEBUG:root:FauxMo device 'tv' ready on 192.168.0.52:52000
DEBUG:root:UPnP broadcast listener: new device registered
DEBUG:root:FauxMo device 'volume' ready on 192.168.0.52:52002
DEBUG:root:UPnP broadcast listener: new device registered
DEBUG:root:FauxMo device 'netflix' ready on 192.168.0.52:52003
DEBUG:root:UPnP broadcast listener: new device registered
DEBUG:root:FauxMo device 'playback' ready on 192.168.0.52:52004
DEBUG:root:UPnP broadcast listener: new device registered
DEBUG:root:FauxMo device 'plex' ready on 192.168.0.52:52001
DEBUG:root:Entering fauxmo polling loop

from amazon-alexa-lg-tv.

paulojhsousa avatar paulojhsousa commented on June 28, 2024

Hi efpe, Thanks for the code!

I got this running but it just enters in the loop but does not listen to any request.
You said that i shall grant access to the TV while running the script but i'm afraid that it is not happening.
Can you please brief me on what should be expected on that stage? Thanks and keed on with good work.

DEBUG:root:Listening for UPnP broadcasts
DEBUG:root:got local address of 192.168.0.64
DEBUG:root:UPnP broadcast listener: new device registered
DEBUG:root:FauxMo device 'Television' ready on 192.168.0.64:52000
DEBUG:root:Entering fauxmo polling loop

from amazon-alexa-lg-tv.

edugc310 avatar edugc310 commented on June 28, 2024

I remember the code was running normally and suddenly stopped working. Let me know if anyone figures it out.

from amazon-alexa-lg-tv.

Linweishengla avatar Linweishengla commented on June 28, 2024

bringing this old thread up again.

I have the script running but after DEBUG:root:Entering fauxmo polling loop nothing happens.
I am using an Echo Plus btw. It is not finding the TV but if I use the lgtv.py command in the terminal I can control the TV.

Also, the script pulls my laptops IP. shouldnt it be pulling the echos IP?

from amazon-alexa-lg-tv.

phrogg avatar phrogg commented on June 28, 2024

Same error here. Did you get it fixed?

from amazon-alexa-lg-tv.

w4qed avatar w4qed commented on June 28, 2024

Hello anyone ever find a way I changed to dbg("Failed to initialize UPnP sockets: {}".format(e))" and it does allow polling, but does not recognize the items:

DEBUG:root:UPnP broadcast listener: new device registered
DEBUG:root:FauxMo device 'lights' ready on 127.0.0.1:52215
DEBUG:root:UPnP broadcast listener: new device registered
DEBUG:root:FauxMo device 'mike' ready on 127.0.0.1:53009
DEBUG:root:UPnP broadcast listener: new device registered
DEBUG:root:FauxMo device 'mesh' ready on 127.0.0.1:53013
DEBUG:root:UPnP broadcast listener: new device registered
DEBUG:root:FauxMo device 'power' ready on 127.0.0.1:53101
DEBUG:root:UPnP broadcast listener: new device registered
DEBUG:root:FauxMo device 'flex' ready on 127.0.0.1:52315
DEBUG:root:UPnP broadcast listener: new device registered
DEBUG:root:FauxMo device 'modem' ready on 127.0.0.1:53103
DEBUG:root:UPnP broadcast listener: new device registered
DEBUG:root:FauxMo device 'icom' ready on 127.0.0.1:53001
DEBUG:root:UPnP broadcast listener: new device registered
DEBUG:root:FauxMo device 'software' ready on 127.0.0.1:53015
DEBUG:root:Entering fauxmo polling loop
DEBUG:root:Responding to search for lights
DEBUG:root:Responding to search for mike
DEBUG:root:Responding to search for mesh
DEBUG:root:Responding to search for power
DEBUG:root:Responding to search for flex
DEBUG:root:Responding to search for modem
DEBUG:root:Responding to search for icom
DEBUG:root:Responding to search for software

part of my code that calls scripts:

224 if data.find('1') != -1:
225 # on
226 dbg("Responding to ON for %s" % self.name)
227
228 if (self.name == "lights"):
229 print "Command: screen -dm bash /home/w4qed/insteon/L141$
230 os.system("screen -dm bash /home/w4qed/insteon/L1416.on")
231
232 elif (self.name == "icom"):

I have tried on several different trigger words: lights, icom, flex, modem etc.

Alexa response: lights isn't responding, please check its network connection and power supply.

Maybe not finding self name? is it any longer passed? As the python code does seem to poll right past my requests.

Python 2.7.13 may have upgraded to this version on apt update, unsure, but most likely.
On a: cpuinfo: a020d3 3B Plus 1.3 1GB
Raspbian GNU/Linux 9.13 (stretch)

from amazon-alexa-lg-tv.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.