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 - digiltd - 2017-01-09

(2017-01-07, 21:01)nsviper Wrote: @digiltd, if u want to PM me, if u want to send me your external facing link via PM, maybe I can at least test that part for u?

Thanks, but I think wires got crossed on a post where I was helping someone out, as I am not having any issues with my setup Smile


RE: Amazon Echo skill for Kodi - Gibsarno - 2017-01-09

Sorry for the stupid questions but should my .env file be in the same folder as lambda deploy?


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

Yes.


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

(2017-01-09, 17:17)Gibsarno Wrote: Sorry for the stupid questions but should my .env file be in the same folder as lambda deploy?

It should be in the same folder as kodi.py, wsgi.py and deploy-to-lambda.py


RE: Amazon Echo skill for Kodi - cozi_andrew - 2017-01-09

for all us that are 'stuck' with this can someone PLEASE who has it running fine, back-up their copy of kodi (using backup app in kodi) with alexa built in and post it so we can download it and enjoy this wonderful kodi/alexa addon.


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

(2017-01-09, 19:34)cozi_andrew Wrote: for all us that are 'stuck' with this can someone PLEASE who has it running fine, back-up their copy of kodi (using backup app in kodi) with alexa built in and post it so we can download it and enjoy this wonderful kodi/alexa addon.

The only thing "inside" Kodi is enabling the web interface (http://kodi.wiki/view/web_interface)

Everything else is covered in the instructions in the link in 1st post ...


RE: Amazon Echo skill for Kodi - Gibsarno - 2017-01-09

Thanks for the help, just one more question when I try to run python deploy-to-lambda.py in terminal it says it can't find file even though I'm directing it to the folder that it's in.

Is there a walk through for this part on mac? As I'm sure it's not as hard as I seem to be making it.


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

(2017-01-09, 20:17)Gibsarno Wrote: Thanks for the help, just one more question when I try to run python deploy-to-lambda.py in terminal it says it can't find file even though I'm directing it to the folder that it's in.

Is there a walk through for this part on mac? As I'm sure it's not as hard as I seem to be making it.

It can't find which file?

What is the error message?

You are running on a Mac so we can assume you have Python working (macOS has a version built in) but just to be sure open a new Terminal and type

Code:
python --version

It should display the version number, it should be some variation of 2.7. As long as it is, and is not version 3, then you should be ok.

Then type

Code:
pip --version

If it finds pip copy and paste what it outputs.


RE: Amazon Echo skill for Kodi - lurkio321 - 2017-01-09

i have this set up, but it seems to be stuck after adding a custom slot MOVIES. it's stuck updating

Please wait while this Alexa skill is updated... has been for about 20 minutes, is this normal ?


RE: Amazon Echo skill for Kodi - Gibsarno - 2017-01-09

Last login: Mon Jan 9 16:14:07 on ttys000
Media-Center:~ Media$ PYTHON --VERSION
Unknown option: --
usage: /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Try `python -h' for more information.Media-Center:~ Media$ pip --version

pip 9.0.1 from /Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg (python 2.7)
Media-Center:~ Media$




then the two lines and this comes up internal


Media-Center:desktop Media$ cd kodi-alexa-master
Media-Center:kodi-alexa-master Media$ pip install lambda-deploy
Collecting lambda-deploy
Using cached lambda_deploy-0.1.2-py2-none-any.whl
Collecting yaep>=0.0.4 (from lambda-deploy)
Using cached yaep-0.0.6-py2-none-any.whl
Collecting requests>=2.9.1 (from lambda-deploy)
Using cached requests-2.12.4-py2.py3-none-any.whl
Collecting boto3>=1.3.0 (from lambda-deploy)
Using cached boto3-1.4.3-py2.py3-none-any.whl
Collecting jmespath<1.0.0,>=0.7.1 (from boto3>=1.3.0->lambda-deploy)
Using cached jmespath-0.9.0-py2.py3-none-any.whl
Collecting s3transfer<0.2.0,>=0.1.10 (from boto3>=1.3.0->lambda-deploy)
Using cached s3transfer-0.1.10-py2.py3-none-any.whl
Collecting botocore<1.5.0,>=1.4.1 (from boto3>=1.3.0->lambda-deploy)
Using cached botocore-1.4.93-py2.py3-none-any.whl
Collecting futures<4.0.0,>=2.2.0; python_version == "2.6" or python_version == "2.7" (from s3transfer<0.2.0,>=0.1.10->boto3>=1.3.0->lambda-deploy)
Using cached futures-3.0.5-py2-none-any.whl
Collecting docutils>=0.10 (from botocore<1.5.0,>=1.4.1->boto3>=1.3.0->lambda-deploy)
Using cached docutils-0.13.1-py2-none-any.whl
Collecting python-dateutil<3.0.0,>=2.1 (from botocore<1.5.0,>=1.4.1->boto3>=1.3.0->lambda-deploy)
Using cached python_dateutil-2.6.0-py2.py3-none-any.whl
Collecting six>=1.5 (from python-dateutil<3.0.0,>=2.1->botocore<1.5.0,>=1.4.1->boto3>=1.3.0->lambda-deploy)
Using cached six-1.10.0-py2.py3-none-any.whl
Installing collected packages: yaep, requests, jmespath, futures, docutils, six, python-dateutil, botocore, s3transfer, boto3, lambda-deploy
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_set.py", line 784, in install
**kwargs
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_install.py", line 851, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_install.py", line 1064, in move_wheel_files
isolated=self.isolated,
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/wheel.py", line 345, in move_wheel_files
clobber(source, lib_dir, True)
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/wheel.py", line 316, in clobber
ensure_dir(destdir)
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/utils/__init__.py", line 83, in ensure_dir
os.makedirs(path)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/yaep'

Media-Center:kodi-alexa-master Media$ python deploy-to-lambda.py
/bin/sh: lambda-deploy: command not found


RE: Amazon Echo skill for Kodi - goldari - 2017-01-09

Hi,
d
Thank you to developers who documented, developed and made this wonderful package work!!!!

Sorry for been absolute nob on first post, couple questions.

I see there is a new release, can I update this on top of my working environment or new setup?

Only command that seems to work "Alexa, ask tv to play die hard", any other movie I say ends up as "random movie", even thought the app shows correct movie is said and registered...why is this? The movie is available, and in the custom slot

Regards


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

@Gibsarno

Ok, I think all caps for PYTHON --VERSION was causing it to fail. I can see it is installed from the error message for pip.

The short answer is it is a permissions issue. Your Python is installed in /Library which means you need to run the command as an admin user.

It is tricky to know what to recommend, there is a very simple answer which is run the
Code:
pip install lambda-deploy
command as a root user by putting "sudo" in front of it
Code:
sudo pip install lambda-deploy
.

Using sudo is very risky and especially if you do not know what you are doing. So I advise against it as you do not want to be installing anything in the system version of Python, though I think you may have already done so with pip.

You should not have to use sudo for python etc on mac. You do this by running "local" versions that are kept separate from the system version.

The easiest way to do this is by using homebrew http://brew.sh/

Follow the instructions on the homepage, you only have to copy and paste one line, but DO NOT use sudo to run it. Homebrew does a great job at keeping separate at a user level, so you should never use sudo.

After installing you run
Code:
brew install python

After you have done that and followed the instructions, close terminal and open it again. Try
Code:
which python
and
Code:
where python
and
Code:
which pip
Code:
where pip

What this does is ask "which is the version of python/pip ready to use?" and "where are the versions of python/pip on my system?"

You should see something like:

Image

If "which python" and "which pip" are both reporting /usr/local/bin/python then you can install lambda-deploy using

Code:
pip install lambda-deploy

Then fingers crossed, when you cd into your kodi-alexa-master folder, you should be able to run
Code:
python deploy-to-lambda.py
sucesfully.


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

(2017-01-09, 22:22)goldari Wrote: I see there is a new release, can I update this on top of my working environment or new setup?

You can update, it does vary depending on how you originally install, just search this thread for "update" for info

(2017-01-09, 22:22)goldari Wrote: Only command that seems to work "Alexa, ask tv to play die hard", any other movie I say ends up as "random movie", even thought the app shows correct movie is said and registered...why is this? The movie is available, and in the custom slot

I think this might be a bug, it also happens to me sometimes. But other commands should work like "ask tv to pause" ask tv what is playing" etc. Are they not?


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

(2017-01-09, 21:05)lurkio321 Wrote: i have this set up, but it seems to be stuck after adding a custom slot MOVIES. it's stuck updating

Please wait while this Alexa skill is updated... has been for about 20 minutes, is this normal ?

How many movies do you have?


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

(2017-01-09, 22:22)goldari Wrote: I see there is a new release, can I update this on top of my working environment or new setup?

Yes. Update the code locally, then add any new slots (and fill them using the slot generator) to your skill on the Amazon skill developer site. While still on the Amazon skill developer site, update the utterances and intents at the same time. Finally, deploy the new code to Lambda.

You need to do the above every time the you want to deploy a new version of the code.

(2017-01-09, 22:22)goldari Wrote: Only command that seems to work "Alexa, ask tv to play die hard", any other movie I say ends up as "random movie", even thought the app shows correct movie is said and registered...why is this? The movie is available, and in the custom slot

The incantation is, "Alexa, ask tv to play movie die hard". Currently you need to specify the media type.

This will change soon, but we're in the middle of restructuring the code at the moment.