Closed StarfighterJ closed 6 years ago
In thinking about this problem, all design choices are poor due to the fact that the TV might lose it's IP address after being turned off. One work around would be to use a device connected to an HDMI port like a chromecast or raspberry pi (see http://blog.davidvassallo.me/2018/02/03/developing-alexa-skills/) to turn on, this will ensure the device is turned on due to HDMI-CEC. That said, the current application can be used to turn off the device as we can be sure that there is an IP address.
I'll add a better handling of the turn off state in a future release, but welcome any suggestions to the code in the meantime if anyone disagrees with the above.
That fooling around to that wake on lan you did was get my TV to turn on after the off, but now it does not with the Heroku branch now ., and of course on a Cold Trun on it did not work.
FYI I got this App on my tablet called LG Wifi "Start TV for LG Smart tv" works real good it actually finds your tv even the model, and it does turn the TV on and off , PLUS volume and Chanel all vis WIFI so the has go to be away to do it. LOL I wish I could find the APK file and un pack it.
Yep, there is a 'bug'/feature of the app where if you are connected using the app and turn off the TV, you can tell the tv to by asking the TV to turn off and it will actually turn on. thanks for the app reference, I'll check it out. If I come up with anything different, will let you know.
I think there a time out issue here not sure. This is what Ask says in the test: ask lg tv turn off
There is a problem with the device. (It does trun off) ask lg tv turn on
The requested skill took too long to respond (Possible Timing issue) ask lg tv turn on
OK.
ask lg tv turn on
Connected. (This was a cold trun on when TV was off . this area I think your still working on with WOL)
Node Prompt response for the for the Above: alexa-lgtv-remote listening on port 3000! Fire of request 'ssap://system/turnOff' with payload: undefined Executing turnOff 1000 Executing turnOn { Error: connect ETIMEDOUT xxx.xx.xxx.xx:3000 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1174:14) errno: 'ETIMEDOUT', code: 'ETIMEDOUT', syscall: 'connect', address: 'xxx.xx.xxxx.xx', port: 3000 } Executing turnOn Fire of request 'ssap://system/turnOff' with payload: undefined Executing turnOff 1000 Executing turnOn { Error: connect ETIMEDOUT xxx.xx.xxx.xx:3000 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1174:14) errno: 'ETIMEDOUT', code: 'ETIMEDOUT', syscall: 'connect', address: 'xxx.xx.xxx.xx', port: 3000 }