Kodi Community Forum
Release Kanzi: Amazon Alexa skill for Kodi - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Supplementary Tools for Kodi (https://forum.kodi.tv/forumdisplay.php?fid=116)
+--- Thread: Release Kanzi: Amazon Alexa skill for Kodi (/showthread.php?tid=254502)



RE: Amazon Echo skill for Kodi - newoski - 2016-11-01

(2016-11-01, 19:55)jingai Wrote: Well, I think if you really want to diagnose the problem, executing the command remotely is the next step.

The two commands I gave you to try via curl are the exact commands the PlayMovie Intent sends in this case.

The only other thing I can think is even a little feasible is that maybe Comcast is throttling bandwidth on certain ports. If you're using port 80 or 8080, they may be throttling it to prevent you from running a web server at home. It's a long shot, but maybe try changing the port to something else.

If you're not afraid of going into the code a little, in alexa_play_movie() in wsgi.ini (around line 973 if your copy is current) you can add some additional print statements around things to see how long they're taking to execute. Particularly, I'd check around kodi.GetMovies(), kodi.matchHeard(), and kodi.PlayMovie(). I think kodi.matchHeard() is the only thing left here that could be the problem, but it'd be odd for this to take 10 seconds.
I'll start with the port. That's something I understand

Sent from my HTC6535LVW


RE: Amazon Echo skill for Kodi - newoski - 2016-11-01

(2016-11-01, 19:55)jingai Wrote: Well, I think if you really want to diagnose the problem, executing the command remotely is the next step.

The two commands I gave you to try via curl are the exact commands the PlayMovie Intent sends in this case.

The only other thing I can think is even a little feasible is that maybe Comcast is throttling bandwidth on certain ports. If you're using port 80 or 8080, they may be throttling it to prevent you from running a web server at home. It's a long shot, but maybe try changing the port to something else.

If you're not afraid of going into the code a little, in alexa_play_movie() in wsgi.ini (around line 973 if your copy is current) you can add some additional print statements around things to see how long they're taking to execute. Particularly, I'd check around kodi.GetMovies(), kodi.matchHeard(), and kodi.PlayMovie(). I think kodi.matchHeard() is the only thing left here that could be the problem, but it'd be odd for this to take 10 seconds.

Crap. Since I didn't create the AWS, I enlisted help there, I can't easily change the port.

With that said, would a better workaround to this entire problem to create a VM on my Unraid server and host the app locally on my network?

What would the best Unraid VM container type be for this kind of thing?


RE: Amazon Echo skill for Kodi - jingai - 2016-11-01

(2016-11-01, 20:31)newoski Wrote:
(2016-11-01, 19:55)jingai Wrote: Well, I think if you really want to diagnose the problem, executing the command remotely is the next step.

The two commands I gave you to try via curl are the exact commands the PlayMovie Intent sends in this case.

The only other thing I can think is even a little feasible is that maybe Comcast is throttling bandwidth on certain ports. If you're using port 80 or 8080, they may be throttling it to prevent you from running a web server at home. It's a long shot, but maybe try changing the port to something else.

If you're not afraid of going into the code a little, in alexa_play_movie() in wsgi.ini (around line 973 if your copy is current) you can add some additional print statements around things to see how long they're taking to execute. Particularly, I'd check around kodi.GetMovies(), kodi.matchHeard(), and kodi.PlayMovie(). I think kodi.matchHeard() is the only thing left here that could be the problem, but it'd be odd for this to take 10 seconds.

Crap. Since I didn't create the AWS, I enlisted help there, I can't easily change the port.

With that said, would a better workaround to this entire problem to create a VM on my Unraid server and host the app locally on my network?

What would the best Unraid VM container type be for this kind of thing?

Well, probably not easier to host it yourself.. and I can't really help you with Unraid as I'm not at all familiar with it. There is a Docker file present in the package though, so that may be one way to go.

For me, personally, to help you further you'll either need to acquaint yourself with the AWS Lamba deployment process (the README for the skill does a decent job of getting you there) so we can change things to debug the problem, and/or run the curl command I gave you remotely.


RE: Amazon Echo skill for Kodi - newoski - 2016-11-01

(2016-11-01, 20:38)jingai Wrote:
(2016-11-01, 20:31)newoski Wrote:
(2016-11-01, 19:55)jingai Wrote: Well, I think if you really want to diagnose the problem, executing the command remotely is the next step.

The two commands I gave you to try via curl are the exact commands the PlayMovie Intent sends in this case.

The only other thing I can think is even a little feasible is that maybe Comcast is throttling bandwidth on certain ports. If you're using port 80 or 8080, they may be throttling it to prevent you from running a web server at home. It's a long shot, but maybe try changing the port to something else.

If you're not afraid of going into the code a little, in alexa_play_movie() in wsgi.ini (around line 973 if your copy is current) you can add some additional print statements around things to see how long they're taking to execute. Particularly, I'd check around kodi.GetMovies(), kodi.matchHeard(), and kodi.PlayMovie(). I think kodi.matchHeard() is the only thing left here that could be the problem, but it'd be odd for this to take 10 seconds.

Crap. Since I didn't create the AWS, I enlisted help there, I can't easily change the port.

With that said, would a better workaround to this entire problem to create a VM on my Unraid server and host the app locally on my network?

What would the best Unraid VM container type be for this kind of thing?

Well, probably not easier to host it yourself.. and I can't really help you with Unraid as I'm not at all familiar with it. There is a Docker file present in the package though, so that may be one way to go.

For me, personally, to help you further you'll either need to acquaint yourself with the AWS Lamba deployment process (the README for the skill does a decent job of getting you there) so we can change things to debug the problem, and/or run the curl command I gave you remotely.

Can you give me a quick overview of what you mean by running it remotely? Would I just curl my external IP:port with the commands you outlined?


RE: Amazon Echo skill for Kodi - jingai - 2016-11-01

I mean from outside your LAN, pointing the command at your DDNS. If you can use your mobile data, for instance, that would work. Or take a machine to a coffee shop/friends house.. or SSH into a machine off-site.. etc.


RE: Amazon Echo skill for Kodi - newoski - 2016-11-01

(2016-11-01, 20:44)jingai Wrote: I mean from outside your LAN, pointing the command at your DDNS. If you can use your mobile data, for instance, that would work. Or take a machine to a coffee shop/friends house.. or SSH into a machine off-site.. etc.

OK, installed cURL on my Android phone and disconnected from my house WiFi.

Connected via 4G, if I use the time curl command, with "time" removed, it processes all the movies pretty much instantly...


RE: Amazon Echo skill for Kodi - jingai - 2016-11-01

Then we need to isolate which call is causing the delay, but that will require you have the ability to deploy new code.


RE: Amazon Echo skill for Kodi - newoski - 2016-11-01

(2016-11-01, 22:25)jingai Wrote: Then we need to isolate which call is causing the delay, but that will require you have the ability to deploy new code.
Looking into it

Sent from my HTC6535LVW


RE: Amazon Echo skill for Kodi - jingai - 2016-11-01

Since it sounds like you're running an older version of the skill, the first thing you might try is simply updating to the latest.


RE: Amazon Echo skill for Kodi - newoski - 2016-11-01

(2016-11-01, 23:00)jingai Wrote: Since it sounds like you're running an older version of the skill, the first thing you might try is simply updating to the latest.
did my git pull yesterday

Sent from my HTC6535LVW


RE: Amazon Echo skill for Kodi - newoski - 2016-11-01

After restarting from scratch with Heroku, I somehow got it working. 6th time is the charm? No idea what I did differently this time, but very happy to have it working. About a second delay now, which is much better.

My sincere thanks for all the effort today to get me squared away. Not sure what I did differently this time with Heroku, but very happy to have everything working!


RE: Amazon Echo skill for Kodi - jingai - 2016-11-02

I'm happy you got it working, though I have to admit I'm genuinely curious what was wrong lol


RE: Amazon Echo skill for Kodi - Rickt1962 - 2016-11-02

WOW Cant wait to try it !!


RE: Amazon Echo skill for Kodi - BDPNA - 2016-11-02

Is there any way to have this running on 2 different Kodi installations with 2 different wake words?


RE: Amazon Echo skill for Kodi - jingai - 2016-11-02

Just set up two copies of the skill with different names.


This forum uses Lukasz Tkacz MyBB addons.