akhan23wgu / amazon-alexa-lg-tv

⛔️ DEPRECATED Control your LG TV (webOS 2.0+) with Amazon Alexa
57 stars 21 forks source link

Alexa skill doesn't show up in Alex app #10

Open kryptAXEripper opened 6 years ago

kryptAXEripper commented 6 years ago

I have everything running on a virtual machine ubuntu box but I can't see the skill in discover smart devices in the Alexa app. Any ideas?

akhan23wgu commented 6 years ago

Is the script running when you try to discover smart devices?

kryptAXEripper commented 6 years ago

Yes it is. I think the issue might be with fauxmo as I see there is an open issue below where echo devices have stopped discovering emulated wemo switches.

https://github.com/n8henrie/fauxmo/issues/38

pler commented 6 years ago

Same issue here with Echo 2 with firmware version 595530420.

I can see the Echo search requests coming in, but none seems to match the one that is checked here: https://github.com/akhan23wgu/amazon-alexa-lg-tv/blob/master/fauxmo.py#L311

urn:Belkin:device:**

I assume this means that Echo isn't searching for any WeMo devices (which is what's emulated here).

~It could be the case that there was a change on the Echo side to require users to install the vendor Apps (Wemo in this case) in order for the Echo to actually include it in its discovery. This post seems to support this statement.~ Update: According to https://github.com/n8henrie/fauxmo/issues/38 this might be fixed by some minor changes on the discovery spoofing

pler commented 6 years ago

I actually managed to run that newer version of fauxmo (https://github.com/n8henrie/fauxmo) and have my Echo recognize my devices after applying the fix mentioned there.

I haven't yet looked into how to apply these fixed to the fauxmo that is shipped with this package (amazon-alexa-lg-tv) though.

For now, I've combined both of these to control my LGTV with Echo:

akhan23wgu commented 6 years ago

Just replace the fauxmo package, do a pull request and we should be good. Thanks for looking into it! I didn't have a way to troubleshoot as I only have Dot devices.

On Jan 4, 2018 2:13 AM, "Philipp Lerche" notifications@github.com wrote:

There is an ongoing discussion regarding this here: n8henrie/fauxmo#38 https://github.com/n8henrie/fauxmo/issues/38

I actually managed to run that newer version of fauxmo ( https://github.com/n8henrie/fauxmo) and have my Echo recognize my devices after applying the fix mentioned there.

I haven't yet looked into how to apply these fixed to the fauxmo that is shipped with this package (amazon-alexa-lg-tv) though.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/akhan23wgu/amazon-alexa-lg-tv/issues/10#issuecomment-355233085, or mute the thread https://github.com/notifications/unsubscribe-auth/APdw4z7qNPFIwNxaN9n-YZNlS-lvpOAAks5tHJZBgaJpZM4Q8pB0 .

chrisrb32 commented 6 years ago

I tried to replace the fauxmo package but the latest package requires Python3.6 whilst alexa-tv needs Python 2. I installed Python 3.6 as it's not included in Stretch and adapted alexa-tv.py to Python 3 but I'm getting an error. However I assume the error lays in the fauxmo package or the way I run it. I'll get back later with the exact error message.

akhan23wgu commented 6 years ago

I'll be doing some testing tomorrow as well with fauxmo and updating alexa-tv.py to Python 3. Ideally this would pull the latest versions of fauxmo and lgtvwebosremote from their respective repos when running requirements.txt.

Interested to see what you find :)

On Jan 6, 2018 4:29 AM, "Christian Büschel" notifications@github.com wrote:

I tried to replace the fauxmo package but the latest package requires Python3.6 whilst alexa-tv needs Python 2. I installed Python 3.6 as it's not included in Stretch and adapted alexa-tv.py to Python 3 but I'm getting an error. However I assume the error lays in the fauxmo package or the way I run it. I'll get back later with the exact error message.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/akhan23wgu/amazon-alexa-lg-tv/issues/10#issuecomment-355740911, or mute the thread https://github.com/notifications/unsubscribe-auth/APdw48z9ZS7QrU7fkix0KkUbUC3CUVn1ks5tH1kOgaJpZM4Q8pB0 .

chrisrb32 commented 6 years ago

Just mind that the latest fixes of fauxmo are actually in this Branch: https://github.com/n8henrie/fauxmo/tree/issue_38

Kirby212 commented 6 years ago

@akhan23wgu How'd you go with updating to Python 3? Got an Echo v2 yesterday and couldn't get this working

akhan23wgu commented 6 years ago

@pler How did you go about setting up the REST API?

@Kirby212 It got the latest fauxmo version to find my fake devices and advertise it to the Echo, but I couldn't get it to respond to any voice commands (yet). Another issue is I do not have any v2 Echo's aside from the Dot, so I have no idea if it'll even work, as the latest fauxmo/v2's do not support polling (which is the reason why we're at this point, yeah?). I tried avoiding setting up a REST API, which I have not done before - hopefully @pler can expand on that :)

See: https://github.com/n8henrie/fauxmo/issues/38, looks like they merged to the dev branch.

pler commented 6 years ago

@akhan23wgu I was a bit busy so sorry for the delay.

See: https://gist.github.com/pler/abb0501796c1aaecc8a0e31bab05df39

Run the latest fauxmo with the config.json. This lets fauxmo delegate on/off commands to the service listed in the config (http://localhost:3000/tv/on). I have a separate HTTP server running (I experimentally set up a node server for that) listening to 3000 that accepts requests to /tv/on (/tv/off) and executespython lgtv.py on (python lgtv.py off) when a request comes in. Not a very elegant solution, but yeah.

I thought about just writing a custom plugin for fauxmo (similar to SimpleHTTPPlugin) that would be able to control lgtv directly, but I didn't have the time so far.

timothe commented 6 years ago

Sorry about the spam (https://github.com/akhan23wgu/amazon-alexa-lg-tv/issues/13#issuecomment-380040886)... Converted the code to Python3 now, but still run into the issue described here. Do we have a simpler/more elegant solution just yet?

phrogg commented 5 years ago

Any solutions now?