Giter VIP home page Giter VIP logo

Comments (7)

FeLiNa22 avatar FeLiNa22 commented on September 26, 2024

Yes I have been having the same problem very recently, I believe it may be due to the new LG webOS update which has stopped this feature from working with my program, I will definitely be looking for away around this problem, but as for now, you may just have to bear with.

I am thinking that the only to turn the TV back might be using WOL packet sending, which becomes a complicated process. If you have any ideas I am open to suggestions.

from amazon-alexa-as-lg-tv-remote.

nxferenc avatar nxferenc commented on September 26, 2024

In Alexa.py there is a section:

    if(action == "setPowerState") :
        lgtv.LGparser(['off'])

Change it to:

    if(action == "setPowerState") :
	power = json_data["value"]
	if (power == "OFF"):
	    lgtv.LGparser(['off'])
	else:
	    lgtv.LGparser(['on'])

from amazon-alexa-as-lg-tv-remote.

FeLiNa22 avatar FeLiNa22 commented on September 26, 2024

Hi nxferenc, thank you for this solution,

I have tried this in the past, and it works fine for a while, however after the TV has been turned off for a while (2-3 hours) an issue rises as the WOL packet sender will not turn on the TV because the router no longer recognises the device. I am still searching for a solution to this.

If you have any ideas to tackle this problem, please let me know :)

from amazon-alexa-as-lg-tv-remote.

nxferenc avatar nxferenc commented on September 26, 2024

My TV was turned off all day long and now turned on with alexa. LG 49UK6200
I don't know if it helps but I have static IP on TV.

from amazon-alexa-as-lg-tv-remote.

FeLiNa22 avatar FeLiNa22 commented on September 26, 2024

Oh, fairs. Perhaps my router is just blocking it. If it is working for you, then that is perfect :)

from amazon-alexa-as-lg-tv-remote.

outoftheblue62 avatar outoftheblue62 commented on September 26, 2024

Hi - I updated the code from nxferenc (Thanks!)

I can turn the TV off and on, however I need to keep asking Alexa to turn the TV off to turn on. See output below for example.

Turning TV off (success)

### Initiating new websocket connection ###
messy : {"deviceId":"5c4bac8c398dcc587988bd0f","action":"setPowerState","value":"OFF"}
{"type": "response", "id": "0", "payload": {"returnValue": true}}
{"closing": {"reason": "", "code": 1000}}

Turning TV on (not successful)

messy : {"deviceId":"5c4bac8c398dcc587988bd0f","action":"setPowerState","value":"ON"}

While TV is off, ask Alexa to turn TV off (TV turns on)

messy : {"deviceId":"5c4bac8c398dcc587988bd0f","action":"setPowerState","value":"OFF"}
{"type": "response", "id": "0", "payload": {"returnValue": true}}
{"closing": {"reason": "", "code": 1000}}

Turning TV off (successful)

messy : {"deviceId":"5c4bac8c398dcc587988bd0f","action":"setPowerState","value":"OFF"}
{"type": "response", "id": "0", "payload": {"returnValue": true}}
{"closing": {"reason": "", "code": 1000}}

TV off, ask Alexa to turn TV off (TV turns on)

messy : {"deviceId":"5c4bac8c398dcc587988bd0f","action":"setPowerState","value":"OFF"}
{"type": "response", "id": "0", "payload": {"returnValue": true}}
{"closing": {"reason": "", "code": 1000}}

Not sure why the TV turns on when I ask Alexa to turn off?

from amazon-alexa-as-lg-tv-remote.

FeLiNa22 avatar FeLiNa22 commented on September 26, 2024

Hi outoftheblue62, I have updated the Alexa.py, if you clone and replace this file, then try the program, see if the error persists.

If it does, then send me the error report, thank you !

from amazon-alexa-as-lg-tv-remote.

Related Issues (18)

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.