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 - KevinH21151 - 2016-11-24

Unfortunately it is still happening. Where can I look at my server log?


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

Wherever you're hosting the skill.


RE: Amazon Echo skill for Kodi - edru - 2016-11-26

Updated my walk through if you want to host this yourself on Ubuntu.

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


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

Anyone no how to get past the must specifiy a region, when deploying, I have changed the .env multiple times and every time get the same no region error.


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

Well if anyone has any suggestions that would be great. I even installed python in the same directory as the .env file and still says no region. I have a feeling that lambda-deploy is not seeing the .env file at all.


RE: Amazon Echo skill for Kodi - KevinH21151 - 2016-11-27

(2016-11-27, 04:02)TearDrop1319 Wrote: Well if anyone has any suggestions that would be great. I even installed python in the same directory as the .env file and still says no region. I have a feeling that lambda-deploy is not seeing the .env file at all.

I also had the problem, my problem was that I never saved as a .env file like below

http://imgur.com/a/dc3cw


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

Thank you that was it!


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

Ok i tried setting this up with no luck it wont work. But it does select on the screen. I used this to set it up: http://www.howtogeek.com/249336/how-to-control-your-kodi-media-center-with-an-amazon-echo/

Does anyone have a updated easy guide? I tried using the one on the post and seems outdated or amazon has changed things around


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

Here is what happens when I type in the codes
Maybe something is wrong?:


Quote:C:\kodi-alexa-master>python deploy-to-lambda.py
2016-11-28 10:30:08:INFO:botocore.credentials: Found credentials in environment variables.
2016-11-28 10:30:08:INFO:lambda_deploy: Packaging lambda kodi-alexa
2016-11-28 10:30:08: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 10:30:08:WARNING:lambda_deploy: Skipping inclusion of of .env file - use LAMBDA_ENV_VARS instead (see documentation for more information)
Exception:
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "C:\Python27\lib\site-packages\pip\commands\install.py", line 431, in run
shutil.rmtree(temp_target_dir)
File "C:\Python27\lib\shutil.py", line 247, in rmtree
rmtree(fullname, ignore_errors, onerror)
File "C:\Python27\lib\shutil.py", line 256, in rmtree
onerror(os.rmdir, path, sys.exc_info())
File "C:\Python27\lib\shutil.py", line 254, in rmtree
os.rmdir(path)
WindowsError: [Error 145] The directory is not empty: 'c:\\users\\admin\\appdata\\local\\temp\\tmprxwnej\\bin'
Traceback (most recent call last):
File "C:\Python27\lib\runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "C:\Python27\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Python27\Scripts\lambda-deploy.exe\__main__.py", line 9, in <module>
File "C:\Python27\lib\site-packages\lambda_deploy\lambda_deploy.py", line 376, in main
method()
File "C:\Python27\lib\site-packages\lambda_deploy\lambda_deploy.py", line 172, in deploy
zfh = self.package()
File "C:\Python27\lib\site-packages\lambda_deploy\lambda_deploy.py", line 156, in package
self.lambda_name
lambda_deploy.lambda_deploy.DependencyInstallationError: Failed to install dependencies of kodi-alexa
Collecting requests (from -r C:\kodi-alexa-master\kodi-alexa\requirements.txt (line 1))
Using cached requests-2.12.1-py2.py3-none-any.whl
Collecting gunicorn (from -r C:\kodi-alexa-master\kodi-alexa\requirements.txt (line 2))
Using cached gunicorn-19.6.0-py2.py3-none-any.whl
Collecting yaep (from -r C:\kodi-alexa-master\kodi-alexa\requirements.txt (line 3))
Using cached yaep-0.0.6-py2-none-any.whl
Collecting pycountry (from -r C:\kodi-alexa-master\kodi-alexa\requirements.txt (line 4))
Collecting pytz (from -r C:\kodi-alexa-master\kodi-alexa\requirements.txt (line 5))
Using cached pytz-2016.7-py2.py3-none-any.whl
Collecting fuzzywuzzy (from -r C:\kodi-alexa-master\kodi-alexa\requirements.txt (line 6))
Using cached fuzzywuzzy-0.14.0-py2.py3-none-any.whl
Installing collected packages: requests, gunicorn, yaep, pycountry, pytz, fuzzywuzzy
Successfully installed fuzzywuzzy-0.14.0 gunicorn-19.6.0 pycountry-16.11.27.1 pytz-2016.7 requests-2.12.1 yaep-0.0.6


C:\kodi-alexa-master>python deploy-to-lambda.py
2016-11-28 10:30:30:INFO:botocore.credentials: Found credentials in environment variables.
2016-11-28 10:30:30:INFO:lambda_deploy: Packaging lambda kodi-alexa
2016-11-28 10:30:30: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 10:30:30:WARNING:lambda_deploy: Skipping inclusion of of .env file - use LAMBDA_ENV_VARS instead (see documentation for more information)
Traceback (most recent call last):
File "C:\Python27\lib\runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "C:\Python27\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Python27\Scripts\lambda-deploy.exe\__main__.py", line 9, in <module>
File "C:\Python27\lib\site-packages\lambda_deploy\lambda_deploy.py", line 376, in main
method()
File "C:\Python27\lib\site-packages\lambda_deploy\lambda_deploy.py", line 215, in deploy
Publish=True
File "C:\Python27\lib\site-packages\botocore\client.py", line 251, in _api_call
return self._make_api_call(operation_name, kwargs)
File "C:\Python27\lib\site-packages\botocore\client.py", line 537, in _make_api_call
raise ClientError(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (InvalidParameterValueException) when calling the CreateFunction operation: The role defined for the function cannot be assumed by Lambda.
Collecting requests (from -r C:\kodi-alexa-master\kodi-alexa\requirements.txt (line 1))
Using cached requests-2.12.1-py2.py3-none-any.whl
Collecting gunicorn (from -r C:\kodi-alexa-master\kodi-alexa\requirements.txt (line 2))
Using cached gunicorn-19.6.0-py2.py3-none-any.whl
Collecting yaep (from -r C:\kodi-alexa-master\kodi-alexa\requirements.txt (line 3))
Using cached yaep-0.0.6-py2-none-any.whl
Collecting pycountry (from -r C:\kodi-alexa-master\kodi-alexa\requirements.txt (line 4))
Collecting pytz (from -r C:\kodi-alexa-master\kodi-alexa\requirements.txt (line 5))
Using cached pytz-2016.7-py2.py3-none-any.whl
Collecting fuzzywuzzy (from -r C:\kodi-alexa-master\kodi-alexa\requirements.txt (line 6))
Using cached fuzzywuzzy-0.14.0-py2.py3-none-any.whl
Installing collected packages: requests, gunicorn, yaep, pycountry, pytz, fuzzywuzzy
Successfully installed fuzzywuzzy-0.14.0 gunicorn-19.6.0 pycountry-16.11.27.1 pytz-2016.7 requests-2.12.1 yaep-0.0.6
Starting new HTTPS connection (1): lambda.us-east-1.amazonaws.com
Adding new kodi-alexa lambda

HERE is my .env file: maybe the spaces are wrong?[/quote]

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 = predat.****.net
KODI_PORT = 8070
KODI_USERNAME = admin
KODI_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 = US/Pacific

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 = AKIAIXZETC...
AWS_SECRET_ACCESS_KEY = Bo84oe/fBETC
LAMBDA_ROLE = arn:aws:iam::02***************:role/Predator*********[\
quote]


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

Okay, I got it all set up in Windows. I think everything went well, and when I run a test from the AWS service simulator, it works perfectly.

But whenever I say "Alexa, ask Kodi to watch a film," or ask Alexa to ask Kodi anything, nothing happens. Alexa says something like "I'm not sure how to help you with that." Nothing is showing up in the log in my Echo app.

Where have I gone wrong here?


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

(2016-11-28, 21:08)russco Wrote: Okay, I got it all set up in Windows. I think everything went well, and when I run a test from the AWS service simulator, it works perfectly.

But whenever I say "Alexa, ask Kodi to watch a film," or ask Alexa to ask Kodi anything, nothing happens. Alexa says something like "I'm not sure how to help you with that." Nothing is showing up in the log in my Echo app.

Where have I gone wrong here?

try changing it to something longer. Like the living room. Or kodi in the bedroom. Etc see if that helps


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

(2016-11-28, 21:26)Predator004 Wrote: try changing it to something longer. Like the living room. Or kodi in the bedroom. Etc see if that helps
I tried XBMC and the living room, and none of those worked. Sometimes Alexa doesn't respond at all, the blue light just goes off.

Here's some of the results from the log:

Quote:ask living room to watch a movie
Hmm, I couldn't find any films called living room to watch a.

Quote:alexa tell kodi to watch a film
I can't find any cinemas near...

Quote:alexa ask kodi to play episode
I'm not quite sure how to help you with that.



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

(2016-11-28, 21:41)russco Wrote:
(2016-11-28, 21:26)Predator004 Wrote: try changing it to something longer. Like the living room. Or kodi in the bedroom. Etc see if that helps
I tried XBMC and the living room, and none of those worked. Sometimes Alexa doesn't respond at all, the blue light just goes off.

hmm not sure. i still cant get it setup Sad
I mean it is online and everything correct? It works for any other commands?


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

All other commands work great. I edited the above post to show some of the logs, so it's hearing exactly what I'm saying, it just doesn't seem to know what to do with it.

Which is weird, because the skill is definitely added, and it works when I run a test.


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

(2016-11-28, 21:48)russco Wrote: All other commands work great. I edited the above post to show some of the logs, so it's hearing exactly what I'm saying, it just doesn't seem to know what to do with it.

Which is weird, because the skill is definitely added, and it works when I run a test.

do you have ports forwarded for the kodi box? Is it static? Maybe the ip changed and the port isn't forwarded
or if your using something like dyndns maybe it hasn't updated with the new ip?
I use dyndns and use that on my router so its always connected/updated