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 - davo2001 - 2017-01-04

2017-01-04 19:38:36
No older events found at the moment. Retry.
/var/task/fuzzywuzzy/fuzz.py:35: UserWarning: Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning
warnings.warn('Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning')
START RequestId: 61c8ec79-d2b5-11e6-929e-4930c7c9600a Version: $LATEST
lambda_handler: applicationId=amzn1.ask.skill.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
on_session_started: requestId=amzn1.echo-api.request.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, sessionId=amzn1.echo-api.session.xxxxxxxxxxxxxxxxxxxxxxxxx
on_intent: requestId=amzn1.echo-api.request.xxxxxxxxxxxxxxxxxxxxxxxxxx, sessionId=amzn1.echo-api.session.xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Requested intent: WatchMovie
Playing the movie 2001 a space odyssey
Sending request to http://xxxxxxxxxxx.dyndns.xx:8080/jsonrpc
END RequestId: 61c8ec79-d2b5-xxxx-929e-4930c7c9600a
REPORT RequestId: 61c8ec79-d2b5-xxxx-929e-4930c7c9600a Duration: 2670.77 ms Billed Duration: 2700 ms Memory Size: 128 MB Max Memory Used: 45 MB
START RequestId: 72171e8f-d2b5-11e6-a712-d9f25fa13e60 Version: $LATEST
lambda_handler: applicationId=amzn1.ask.skill.xxxxxxxxxxxxxxxxxxxxxx
on_session_started: requestId=amzn1.echo-api.request.xxxxxxxxxxxxxxxxxx-a842-4977dac7902b, sessionId=amzn1.echo-api.session.xxxxxxxxxxxxxx
on_intent: requestId=amzn1.echo-api.request.xxxxxxxxxxxx-4977dac7902b, sessionId=amzn1.echo-api.session.2xxxxxxxxxxxxx
Requested intent: WatchMovie
Playing the movie 2001 a space odyssey
Sending request to http://xxxxxxxxxxxxx.dyndns.xx:8080/jsonrpc
END RequestId: 72171e8f-xxxxxxxxxxx
REPORT RequestId: xxxxxxxxxxxxxxxxxx Duration: 76.55 ms Billed Duration: 100 ms Memory Size: 128 MB Max Memory Used: 45 MB


RE: Amazon Echo skill for Kodi - jingai - 2017-01-04

edit: I take it back -- it didn't find the movie. It wasn't able to get your list of movies from Kodi.

Just to verify before I look into it further.. you are trying to play a movie in your library, right? Not something streamed in an addon?


RE: Amazon Echo skill for Kodi - davo2001 - 2017-01-04

Yes, its in my library, the movies, etc are stored on a NAS on the same network, kodi is installed on a raspberry pi which is connected to my tv via HDMI, kodi accesses them via DLNA. I access them on kodi by going to VIDEOS - Files.

Does it need to be mounted to kodi via something else apart from DLNA? Maybe SMB/CIFS or NFS?


RE: Amazon Echo skill for Kodi - jingai - 2017-01-04

Hmm if you're using DLNA that might not actually count as being in your library.

I will be occupied for the remainder of the evening, but if you scan through this thread you'll find a curl command you can run to manually make the JSON request to list your movies. If that command fails to provide a list, I'm afraid the skill will too.


RE: Amazon Echo skill for Kodi - davo2001 - 2017-01-05

OK so, what i did, i installed kodi on my laptop, replicated the IP and kodi settings of the pi to kodi on the laptop. Now it works on the laptop with alexa, it can find the movies, play them, pause then etc.

So i put the settings from kodi on the laptop back on the pi, mounted the data using SMB (same as the laptop) and alexa still cant see the movies Sad

Out of ideas.


RE: Amazon Echo skill for Kodi - nsviper - 2017-01-05

Have u added movies as a source so it's scanned into kodi library, rather than just videos, files?

If it's not in database that may be why the slot generator didn't return any movies to the list...


RE: Amazon Echo skill for Kodi - nsviper - 2017-01-05

Also (off topic) but not knowing how fast your LAN is, i'm running my 2 pi's using NFS instead of SMB (lighter faster protocol) against my NAS and I can supply advancedsettings.XML settings that should help with any buffering issues if u have any on the pi?


RE: Amazon Echo skill for Kodi - adamnicholls - 2017-01-05

(2016-12-30, 21:19)nsviper Wrote: Ignore me, rebuilt the alexa app as English UK instead of default US, all working brilliantly now Smile

You wouldn't be able to help me with the intentschema and slot types for the English UK build could you please? I'm grasping at straws here! I'm sure It's pretty simple but I've tried and I can't seem to convert the US to UK.


RE: Amazon Echo skill for Kodi - leoneonekenobi - 2017-01-05

Hi All
i tried set up the skill but cant get it working, when i ask alexa 'ask kodi to stop' she responds 'playback stopped' but nothing happens.
Wondered if anyone could help?

thanks

leone


RE: Amazon Echo skill for Kodi - digiltd - 2017-01-05

(2017-01-05, 01:13)adamnicholls Wrote:
(2016-12-30, 21:19)nsviper Wrote: Ignore me, rebuilt the alexa app as English UK instead of default US, all working brilliantly now Smile

You wouldn't be able to help me with the intentschema and slot types for the English UK build could you please? I'm grasping at straws here! I'm sure It's pretty simple but I've tried and I can't seem to convert the US to UK.

There isn't any difference for the UK intents and slot types other than the language you set the Skill up in.

I posted my screenshots a few weeks back. most of it should still be relevant.

http://forum.kodi.tv/showthread.php?tid=254502&pid=2472473#pid2472473


RE: Amazon Echo skill for Kodi - digiltd - 2017-01-05

@leoneonekenobi does it work when you send commands using the developer test page?


RE: Amazon Echo skill for Kodi - davo2001 - 2017-01-05

(2017-01-05, 01:00)nsviper Wrote: Have u added movies as a source so it's scanned into kodi library, rather than just videos, files?

If it's not in database that may be why the slot generator didn't return any movies to the list...

BINGO!

Fair play to you! I had added the path and could see and access the movies on kodi but hadn't actually added them as a source for the kodi library.

All up and running now, delighted. Thanks everyone for the help Big Grin


RE: Amazon Echo skill for Kodi - leoneonekenobi - 2017-01-05

@digiltd.....Hello and thanks for the reply.

Do you mean the 'Service Simulator' with the Alexa Developer dashboard? if so i did and entered 'stop'...don't see any errors. Totally baffled.

leone


RE: Amazon Echo skill for Kodi - nsviper - 2017-01-05

(2017-01-05, 18:35)leoneonekenobi Wrote: @digiltd.....Hello and thanks for the reply.

Do you mean the 'Service Simulator' with the Alexa Developer dashboard? if so i did and entered 'stop'...don't see any errors. Totally baffled.

leone

If you used the tester and said stop, the tester should show:

Quote:{
"version": "1.0",
"response": {
"outputSpeech": {
"type": "PlainText",
"text": "Playback stopped"
},
"card": {
"content": "Playback stopped",
"title": "Stopping playback",
"type": "Simple"
},
"reprompt": {
"outputSpeech": {
"type": "PlainText",
"text": " "
}
},
"shouldEndSession": true
},
"sessionAttributes": {}
}

In addition to that, your KODI log should show (I told it to play a movie 1st, then to stop):

Quote:18:06:30 283087.781250 T:1953447936 NOTICE: DVDPlayer: Opening: nfs://xxx.xxx.xxx.xxx/MediaShare/Movies/HD/Avengers.Age.of.Ultron/Avengers.Age.of.Ultron.mkv
18:06:30 283087.781250 T:1763701680 NOTICE: Creating InputStream
18:06:35 283092.750000 T:1763701680 NOTICE: Creating Demuxer
18:07:08 283125.625000 T:1763701680 NOTICE: Opening stream: 0 source: 256
18:07:08 283125.625000 T:1763701680 NOTICE: Creating video codec with codec id: 28
18:07:08 283125.656250 T:1763701680 NOTICE: Creating video thread
18:07:08 283125.656250 T:1230336944 NOTICE: running thread: video_thread
18:07:08 283125.656250 T:1763701680 NOTICE: Opening stream: 1 source: 256
18:07:08 283125.656250 T:1763701680 NOTICE: Finding audio codec for: 86019
18:07:08 283125.656250 T:1763701680 NOTICE: Creating audio thread
18:07:08 283125.656250 T:1221948336 NOTICE: running thread: CDVDPlayerAudio:Tonguerocess()
18:07:08 283125.656250 T:1763701680 NOTICE: Opening stream: 2 source: 256
18:07:08 283125.656250 T:1221948336 NOTICE: Creating audio stream (codec id: 86019, channels: 2, sample rate: 48000, pass-through)
18:07:08 283125.687500 T:1230336944 NOTICE: fps: 23.976024, pwidth: 1920, pheight: 804, dwidth: 1919, dheight: 804
18:07:08 283125.687500 T:1230336944 NOTICE: Display resolution ADJUST : 1920x1080 (1920x1080) @ 24.00 - Full Screen (51) (weight: 0.001)

18:12:12 118.558937 T:1953091584 NOTICE: CDVDPlayer::CloseFile()
18:12:12 118.559196 T:1953091584 NOTICE: DVDPlayer: waiting for threads to exit
18:12:13 118.802711 T:1556083632 NOTICE: CDVDPlayer::OnExit()
18:12:13 118.803123 T:1556083632 NOTICE: Closing stream player 1
18:12:13 118.803322 T:1556083632 NOTICE: Waiting for audio thread to exit
18:12:13 118.803497 T:1519383472 NOTICE: thread end: CDVDPlayerAudio::OnExit()
18:12:13 118.803795 T:1556083632 NOTICE: Closing audio device
18:12:13 118.832367 T:1556083632 NOTICE: Deleting audio codec
18:12:13 118.832619 T:1556083632 NOTICE: Closing stream player 2
18:12:13 118.832733 T:1556083632 NOTICE: waiting for video thread to exit
18:12:13 118.854065 T:1527772080 NOTICE: thread end: video_thread

(you should also see traffic on your router log as well)


RE: Amazon Echo skill for Kodi - leoneonekenobi - 2017-01-05

@nsviper

Used the tester and said stop....got the same result as your pasted Lambda Response code above.
Will have to test/check after work to see what the kodi log file states upon the stop request.

Thanks

leone