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 - jingai - 2016-11-29

What you have on that tab is correct. Continue on Smile


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

@ jingai, thanks for the heads up!

Cheers!


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

(2016-11-29, 22:39)jingai Wrote: What you have on that tab is correct. Continue on Smile

so i chose north america and using this:

arn:aws:lambda:us-east-1:021182**********xa

what do I put for endpoint?
Endpoint
Service Endpoint Type:


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

Yep, keep going. You can stop at the test tab, where you can see if your requests actually make it to Kodi.


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

(2016-11-29, 23:00)jingai Wrote: Yep, keep going. You can stop at the test tab, where you can see if your requests actually make it to Kodi.

You I did tried a test:

play a random show

The remote endpoint could not be called, or the response it returned was invalid.


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

(2016-11-29, 23:03)Predator004 Wrote:
(2016-11-29, 23:00)jingai Wrote: Yep, keep going. You can stop at the test tab, where you can see if your requests actually make it to Kodi.

You I did tried a test:

play a random show

The remote endpoint could not be called, or the response it returned was invalid.

So, it can't communicate with Kodi. Verify the domain name and port for Kodi and your Kodi credentials are correct in .env.

If they are, check the logs on your AWS Console for what the skill is saying is happening.


RE: Amazon Echo skill for Kodi - TearDrop1319 - 2016-11-30

@ predator change your invocation name. if you really want it to be kodi, spell cody, the voice server does not do well with "kodi" as the invocation name. I am using "media center" and she never has an issues understanding that. When i used "cody" it was 50/50, and when I first tried "kodi" it never worked.... For examples "Alexa, ask media center to play the movie ghostbusters"


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

(2016-11-29, 23:48)jingai Wrote:
(2016-11-29, 23:03)Predator004 Wrote:
(2016-11-29, 23:00)jingai Wrote: Yep, keep going. You can stop at the test tab, where you can see if your requests actually make it to Kodi.

You I did tried a test:

play a random show

The remote endpoint could not be called, or the response it returned was invalid.

So, it can't communicate with Kodi. Verify the domain name and port for Kodi and your Kodi credentials are correct in .env.

If they are, check the logs on your AWS Console for what the skill is saying is happening.

here is my .env file again:

Quote:# The Kodi webserver only supports HTTP.
# Uncomment KODI_SCHEME to tell the skill to use https between AWS and your local network
# (only use if you have already set this up with your own certificates)
#
# KODI_SCHEME = https

# If using a reverse proxy you might need to add an extra bit to the url before "jsonrpc"
# You can do this with KODI_SUBPATH (don't use slashes before or after)
#
# KODI_SUBPATH =

KODI_ADDRESS = http://preda*********.com
KODI_PORT = 8070
KODI_USERNAME = username
KODI_PASSWORD = password

SKILL_APPID =

# Your local time zone for responses that include absolute times.
# See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
#
# For example, if you are in the Eastern US time zone, you would use:
# SKILL_TZ = US/Eastern
#
# Leave empty or undefined (commented out) if you don't need or want absolute
# time responses. An example is asking when the currently playing item will
# end. If you have SKILL_TZ defined, it will also tell you the wall-clock
# time when the item will conclude.
SKILL_TZ =

LAMBDA_ENV_VARS = KODI_SCHEME,KODI_ADDRESS,KODI_PORT,KODI_SUBPATH,KODI_USERNAME,KODI_PASSWORD,SKILL_APPID,SKILL_TZ

AWS_DEFAULT_REGION = us-east-1
LAMBDA_TIMEOUT = 60
LAMBDA_MEMORY_SIZE = 128
LAMBDA_HANDLER = wsgi.lambda_handler

AWS_ACCESS_KEY_ID = Akeyhere
AWS_SECRET_ACCESS_KEY = 0keyhere
LAMBDA_ROLE = arn:aws:iam::0211820fddfdfg:/pred04

is there not supposed to be spaces? Am I doing something wrong? I don't get it lol. Thanks!@


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

I can't tell you if your address/port and credentials are correct. You need to verify those match.

If you're positive they do, you need to check the AWS server logs for the skill.


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

(2016-11-30, 01:24)jingai Wrote: I can't tell you if your address/port and credentials are correct. You need to verify those match.

If you're positive they do, you need to check the AWS server logs for the skill.

if I go to: http://predsodjsdf.net

then use the port 8070 and the username and pass it works correctly.

Were can I get those logs for you?


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

And you are positive there are no typos?

If so, you get the logs from the AWS console where you pushed the skill to.


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

positive no typos and the web part works

Now i tried: Invocation Name
The living room'
Alexa: I can't find the living room under my account
also for SKILL_APPID =
I have that blank as the instructions do not use that. Is that correct?

here I think are logs:

Quote:22:52:18
on_intent: requestId=EdwRequestId.5afb1720-66aa-44e7-acfa, sessionId=SessionId.712755c4-6162-478d-

22:52:18
Requested intent: PlayPause

22:52:18
Playing or pausing

22:52:18
Sending request to http://http:/SERVER***.yest:8070/jsonrpc

22:52:18
END RequestId: 7aa782db-b686-11e6-9dc5-41d57eeec209

22:52:18
REPORT RequestId: 7aa782db-b686-11e6-9dc5-41d57eeec209 Duration: 6.24 ms Billed Duration: 100 ms Memory Size: 128 MB Max Memory Used: 44 MB

22:52:26
START RequestId: 7f7389cb-b686-11e6-8277-bf2c2ac6b49b Version: $LATEST

22:52:26
lambda_handler: applicationId=amzn1.ask.skill.97473e55-7b98-4488888*********

22:52:26
on_session_started: requestId=EdwRequestId.cfe0f5e6-efff1e89ba, sessionId=SessionId.7e3e6aff-d30a-40eac

22:52:26
on_intent: requestId=EdwRequestId.cfe0f5e6-e3d9-fff1e89ba, sessionId=SessionId.7e3e6aff-d3065eeac

22:52:26
Requested intent: PlayRandomMovie

22:52:26
Playing a random movie

22:52:26
Sending request to http://http:/SERVER***.test.net:8070/jsonrpc

22:52:26
'result': KeyError Traceback (most recent call last): File "/var/task/wsgi.py", line 1659, in lambda_handler return on_intent(event['request'], event['session']) File "/var/task/wsgi.py", line 1626, in on_intent return one_intent[1](intent_slots) File "/var/task/wsgi.py", line 1111, in alexa_play_random_movie movies_array = kodi.GetUnwatchedMovies() File "/var/task/kodi.py", li

22:52:26
END RequestId: 7f7389cb-b686-11e6-8277-bf2c2ac

22:52:26
REPORT RequestId: 7f7389cb-b68c2ac6b49b Duration: 20.62 ms Billed Duration: 100 ms Memory Size: 128 MB Max Memory Used: 44 MB



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

It's not returning the list of movies to the skill.

If you have access to curl, try running:

Code:
curl --data-binary '{"jsonrpc":"2.0", "method":"VideoLibrary.GetMovies", "id":1}' -H 'content-type: application/json;' -u username:password http://host:port/jsonrpc



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

(2016-11-30, 01:50)jingai Wrote: It's not returning the list of movies to the skill.

If you have access to curl, try running:

Code:
curl --data-binary '{"jsonrpc":"2.0", "method":"VideoLibrary.GetMovies", "id":1}' -H 'content-type: application/json;' -u username:password http://host:port/jsonrpc

curl: (6) Could not resolve host: method
curl: (3) [globbing] unmatched close brace/bracket in column 5
curl: (6) Could not resolve host: application

but if I go direct to: http://test.net:8070/jsonrpc

I get

{
"description": "JSON-RPC API of XBMC",
"id": "http://xbmc.org/jsonrpc/ServiceDescription.json",
"methods": {
"Addons.ExecuteAddon": {
"description": "Executes the given addon with the given parameters (if possible)",
"params": [
{
"name": "addonid",

etc


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

I assume you're on Windows, so it'd be the quoting. I think this should work:

Code:
curl --data-binary "{""jsonrpc"":""2.0"", ""method"":""VideoLibrary.GetMovies"", ""id"":1}" -H "content-type: application/json;" -u username:password http://host:port/jsonrpc