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 - russco - 2016-11-28

Here's a new one:

Quote:alexa ask living room
Please try again, with the device name and setting.



RE: Amazon Echo skill for Kodi - Predator004 - 2016-11-28

(2016-11-28, 22:00)russco Wrote: Here's a new one:

Quote:alexa ask living room
Please try again, with the device name and setting.

try restarting echo?


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

@Predator004, make sure you're using Python 2.7. Python 3 does not work with lambda-deploy. Not sure if this is your problem, as I'm busy with other things at the moment, so just taking a stab in the dark to give you something to look at. edit: more specifically, make sure that if you have both 2.7 and 3.x installed, that Python 2.7 is being used for this.

@russco, I'd need to see your skill's server logs to see if it's even reaching the skill. It doesn't sound like it is.


RE: Amazon Echo skill for Kodi - Predator004 - 2016-11-28

(2016-11-28, 22:43)jingai Wrote: @Predator004, make sure you're using Python 2.7. Python 3 does not work with lambda-deploy. Not sure if this is your problem, as I'm busy with other things at the moment, so just taking a stab in the dark to give you something to look at.

@russco, I'd need to see your skill's server logs to see if it's even reaching the skill. It doesn't sound like it is.

I am using 2.7 thanks!


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

(2016-11-28, 22:45)Predator004 Wrote:
(2016-11-28, 22:43)jingai Wrote: @Predator004, make sure you're using Python 2.7. Python 3 does not work with lambda-deploy. Not sure if this is your problem, as I'm busy with other things at the moment, so just taking a stab in the dark to give you something to look at.

@russco, I'd need to see your skill's server logs to see if it's even reaching the skill. It doesn't sound like it is.

I am using 2.7 thanks!

I think the other error you see there may be normal (or expected?), not really sure. I don't use Lambda so it's hard for me to say, but.. did it deploy? Can you access the skill in a web browser? You'll get an empty page and HTTP 502 as a response if it's working.

Can you use Amazon's test function to issue commands to Kodi?


RE: Amazon Echo skill for Kodi - russco - 2016-11-28

(2016-11-28, 22:43)jingai Wrote: @Predator004, make sure you're using Python 2.7. Python 3 does not work with lambda-deploy. Not sure if this is your problem, as I'm busy with other things at the moment, so just taking a stab in the dark to give you something to look at. edit: more specifically, make sure that if you have both 2.7 and 3.x installed, that Python 2.7 is being used for this.

@russco, I'd need to see your skill's server logs to see if it's even reaching the skill. It doesn't sound like it is.

Sure thing, where do I find the server logs? I'm using AWS.

Also, I tried restarting the Echo, no luck.


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

(2016-11-28, 22:58)russco Wrote:
(2016-11-28, 22:43)jingai Wrote: @Predator004, make sure you're using Python 2.7. Python 3 does not work with lambda-deploy. Not sure if this is your problem, as I'm busy with other things at the moment, so just taking a stab in the dark to give you something to look at. edit: more specifically, make sure that if you have both 2.7 and 3.x installed, that Python 2.7 is being used for this.

@russco, I'd need to see your skill's server logs to see if it's even reaching the skill. It doesn't sound like it is.

Sure thing, where do I find the server logs? I'm using AWS.

Also, I tried restarting the Echo, no luck.

On the AWS Lambda control panel. Sorry I'm not more specific, but I don't use Lambda..


RE: Amazon Echo skill for Kodi - russco - 2016-11-28

No worries, I think this is them:

Code:

20:49:18
/var/task/fuzzywuzzy/fuzz.py:35: UserWarning: Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning

20:49:18
warnings.warn('Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning')

20:49:18
START RequestId: 207cf047-b5ac-11e6-8f5e-1f6126822761 Version: $LATEST

20:49:18
lambda_handler: applicationId=amzn1.ask.skill.7db858d4-0fd5-46d6-95a8-1d4528123cee

20:49:18
on_session_started: requestId=EdwRequestId.4001528f-ca29-4fc0-9175-813a4e1d0ca9, sessionId=SessionId.e6570976-6504-4f95-ad86-41358864a7c6

20:49:18
on_intent: requestId=EdwRequestId.4001528f-ca29-4fc0-9175-813a4e1d0ca9, sessionId=SessionId.e6570976-6504-4f95-ad86-41358864a7c6

20:49:18
Requested intent: PlayRandomMovie

20:49:18
Playing a random movie

20:49:18
Sending request to http://scrubbed/jsonrpc

20:49:21
Sending request to http://scrubbed/jsonrpc

20:49:21
END RequestId: 207cf047-b5ac-11e6-8f5e-1f6126822761

20:49:21
REPORT RequestId: 207cf047-b5ac-11e6-8f5e-1f6126822761    Duration: 3703.06 ms    Billed Duration: 3800 ms Memory Size: 128 MB    Max Memory Used: 45 MB
No newer events found at the moment. Retry.

I literally just tried it again, and nothing new showed up in the log. I think where it worked, and played a random movie, was when I tested it from the dashboard.


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

You should scrub personal info from your logs when posting them.

Did you make your developer account using the same Amazon account that you have linked to your Echo device(s)?


RE: Amazon Echo skill for Kodi - russco - 2016-11-28

Done.

And yes, I'm pretty sure. When kodi-alexa-master was created using lambda-deploy, the skill showed up in my alexa app on my phone. So they must all be in the same account.

Here's the log of what happened when I deployed:

Code:
C:\kodi-alexa-master>C:\Python27\Scripts\lambda-deploy.exe deploy
2016-11-28 21:39:27:INFO:botocore.credentials: Found credentials in environment variables.
2016-11-28 21:39:27:INFO:lambda_deploy: Packaging lambda kodi-alexa-master
2016-11-28 21:39:27:WARNING:lambda_deploy: A .env file exists in your Lambda directory - be careful that it does not contain any secrets you don't want uploaded to AWS!
2016-11-28 21:39:27:WARNING:lambda_deploy: Skipping inclusion of of .env file - use LAMBDA_ENV_VARS instead (see documentation for more information)
Collecting requests (from -r C:\kodi-alexa-master\requirements.txt (line 1))
  Using cached requests-2.12.1-py2.py3-none-any.whl
Collecting gunicorn (from -r C:\kodi-alexa-master\requirements.txt (line 2))
  Using cached gunicorn-19.6.0-py2.py3-none-any.whl
Collecting yaep (from -r C:\kodi-alexa-master\requirements.txt (line 3))
  Using cached yaep-0.0.6-py2-none-any.whl
Collecting pycountry (from -r C:\kodi-alexa-master\requirements.txt (line 4))
  Using cached pycountry-16.11.27.1.tar.gz
Collecting pytz (from -r C:\kodi-alexa-master\requirements.txt (line 5))
  Using cached pytz-2016.7-py2.py3-none-any.whl
Collecting fuzzywuzzy (from -r C:\kodi-alexa-master\requirements.txt (line 6))
  Using cached fuzzywuzzy-0.14.0-py2.py3-none-any.whl
Installing collected packages: requests, gunicorn, yaep, pycountry, pytz, fuzzywuzzy
  Running setup.py install for pycountry ... done
Successfully installed fuzzywuzzy gunicorn pycountry pytz requests-2.12.1 yaep-0.0.6
You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
Starting new HTTPS connection (1): lambda.us-east-1.amazonaws.com
Updating kodi-alexa-master lambda
Successfully deployed kodi-alexa-master version 2

(I wiped the first one and tried again which is why it's version 2)

Also, when I run a test command from the Amazon developer console, it works just fine.


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

@russco, I honestly don't know then.. if the skill is enabled and can communicate with Kodi -- as you've verified with the test function -- then it should just work.

Watch your logs and try asking:

"Alexa, ask Kodi what is playing?"


RE: Amazon Echo skill for Kodi - russco - 2016-11-29

Nothing shows in the logs. Alexa just says "Sorry, something went wrong. Please try in a little while."

Can it be anything to do with me using us-east-1 when I'm not in the US? I'm in Norway, I can't imagine that matters, but it's worth asking.

I tried changing to eu-west-1 but that just returns a remote endpoint error when I try to test it out.


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

(2016-11-29, 00:22)russco Wrote: Can it be anything to do with me using us-east-1 when I'm not in the US? I'm in Norway, I can't imagine that matters, but it's worth asking.

It's possible, but I don't know definitively. I don't think so, but I do know the region in your .env file needs to match what you set in the AWS console.

(2016-11-29, 00:22)russco Wrote: I tried changing to eu-west-1 but that just returns a remote endpoint error when I try to test it out.

Have you read the README included with the skill? This part and this part in particular?

You need to change the region in both places (and re-deploy whenever you change the .env file).


RE: Amazon Echo skill for Kodi - Predator004 - 2016-11-29

(2016-11-29, 00:39)jingai Wrote:
(2016-11-29, 00:22)russco Wrote: Can it be anything to do with me using us-east-1 when I'm not in the US? I'm in Norway, I can't imagine that matters, but it's worth asking.

It's possible, but I don't know definitively. I don't think so, but I do know the region in your .env file needs to match what you set in the AWS console.

(2016-11-29, 00:22)russco Wrote: I tried changing to eu-west-1 but that just returns a remote endpoint error when I try to test it out.

Have you read the README included with the skill? This part and this part in particular?

You need to change the region in both places (and re-deploy whenever you change the .env file).

what do you mean both places? there is only supposed to be one .env file correct? That's the only file that gets edited?


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

@russco, it's set in the AWS Console too, I thought. Like I said, I've never done this with AWS Lambda, so I'm not totally sure.. but the documentation here suggests that.


This forum uses Lukasz Tkacz MyBB addons.