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 - miststlkr - 2018-04-16

IT'S   ALLLIIIIIIIIIVE!!!!!!!

Thanks so much!


RE: Amazon Echo skill for Kodi - m0ngr31 - 2018-04-16

Just a reminder for everyone to upgrade the cli. New update fixed a few things.


RE: Amazon Echo skill for Kodi - liminal1 - 2018-04-16

Hey guys, 

Trying to set this up. But having issues with the webapp not getting anything out of Kodi. I can log in fine outside the network. I am using Plex Codi Connect though. 

Would this cause any issues?

Error I'm getting is: Please validate your server information and try again

But I promise, im getting to it outside the network? Port forwarding is working fine.


RE: Amazon Echo skill for Kodi - erikhogs - 2018-04-16

I get the same error after approx. 1 minute


RE: Amazon Echo skill for Kodi - m0ngr31 - 2018-04-16

(2018-04-16, 11:05)liminal1 Wrote: Hey guys,

Trying to set this up. But having issues with the webapp not getting anything out of Kodi. I can log in fine outside the network. I am using Plex Codi Connect though.

Would this cause any issues?

Error I'm getting is: Please validate your server information and try again

But I promise, im getting to it outside the network? Port forwarding is working fine.

(2018-04-16, 11:25)erikhogs Wrote: I get the same error after approx. 1 minute
  
Just as a test, can you both try the old slot generator just to see if it connects? https://slot-generator.herokuapp.com/


RE: Amazon Echo skill for Kodi - erikhogs - 2018-04-16

(2018-04-16, 16:51)m0ngr31 Wrote:
(2018-04-16, 11:05)liminal1 Wrote: Hey guys,

Trying to set this up. But having issues with the webapp not getting anything out of Kodi. I can log in fine outside the network. I am using Plex Codi Connect though.

Would this cause any issues?

Error I'm getting is: Please validate your server information and try again

But I promise, im getting to it outside the network? Port forwarding is working fine.
(2018-04-16, 11:25)erikhogs Wrote: I get the same error after approx. 1 minute
  
Just as a test, can you both try the old slot generator just to see if it connects? https://slot-generator.herokuapp.com/ 
 Yes, working!


RE: Amazon Echo skill for Kodi - mysteron09 - 2018-04-16

Encountering a bit of a problem deploying to Heroku. 
Quote:-----> Python app detected
 !     The latest version of Python 2 is python-2.7.14 (you are using python-2.7.13, which is unsupported).
 !     We recommend upgrading by specifying the latest version (python-2.7.14).
       Learn More: https://devcenter.heroku.com/articles/python-runtimes
-----> Installing python-2.7.13
-----> Installing pip
-----> Installing requirements with pip
       Collecting gunicorn (from -r /tmp/build_a8dd076287a329584d31358841053d78/requirements.txt (line 1))
         Downloading https://files.pythonhosted.org/packages/64/32/becbd4089a4c06f0f9f538a76e9fe0b19a08f010bcb47dcdbfbc640cdf7d/gunicorn-19.7.1-py2.py3-none-any.whl (111kB)
       Collecting pytz (from -r /tmp/build_a8dd076287a329584d31358841053d78/requirements.txt (line 2))
         Downloading https://files.pythonhosted.org/packages/dc/83/15f7833b70d3e067ca91467ca245bae0f6fe56ddc7451aa0dc5606b120f2/pytz-2018.4-py2.py3-none-any.whl (510kB)
       Collecting flask-ask>=0.9.8 (from -r /tmp/build_a8dd076287a329584d31358841053d78/requirements.txt (line 3))
         Downloading https://files.pythonhosted.org/packages/6a/f5/d4709ae94584a0b1541e9b52b2d25a8a1bdb6e2da9d6870f23fdd0523a30/Flask-Ask-0.9.8.tar.gz (40kB)
           Complete output from command python setup.py egg_info:
           Traceback (most recent call last):
             File "<string>", line 1, in <module>
             File "/tmp/pip-install-eE1HKR/flask-ask/setup.py", line 8, in <module>
               from pip.req import parse_requirements
           ImportError: No module named req
           
           ----------------------------------------
       Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-eE1HKR/flask-ask/
 !     Push rejected, failed to compile Python app.

 !     Push failed

Apart from the hostname and password everything in the config is unchanged. Suggestions appreciated - thanks!


RE: Amazon Echo skill for Kodi - m0ngr31 - 2018-04-16

Did you use the 'Deploy to Heroku' button or did you deploy from the command line?

Also, I updated the Heroku Python version, and PyPi was having issues earlier today when they did a migration. I'd say give it another shot.


RE: Amazon Echo skill for Kodi - mysteron09 - 2018-04-16

I used the 'Deploy' button.

Just tried again. Same error.


RE: Amazon Echo skill for Kodi - m0ngr31 - 2018-04-16

Yeah, looks like an issue with how Flask-Ask is setting requirements breaks in pip 10: https://mail.python.org/pipermail/distutils-sig/2017-October/031642.html

I'll create a PR for that to be fixed.


RE: Amazon Echo skill for Kodi - erikhogs - 2018-04-18

(2018-04-16, 21:21)erikhogs Wrote:
(2018-04-16, 16:51)m0ngr31 Wrote:
(2018-04-16, 11:05)liminal1 Wrote: Hey guys,

Trying to set this up. But having issues with the webapp not getting anything out of Kodi. I can log in fine outside the network. I am using Plex Codi Connect though.

Would this cause any issues?

Error I'm getting is: Please validate your server information and try again

But I promise, im getting to it outside the network? Port forwarding is working fine.
(2018-04-16, 11:25)erikhogs Wrote: I get the same error after approx. 1 minute
  
Just as a test, can you both try the old slot generator just to see if it connects? https://slot-generator.herokuapp.com/  
 Yes, working! 
Just to clarify, the slot generator is connecting but I'm still not able to deploy... Is there some log where it's possible to see where in the process it's failing? 

A question. I remember when going through the setup that it said that the port 9090 was in use but since that is kodi I did not pay any attention to it. Should I stop kodi on the device and start all over alternatively run the setup on another device?


RE: Amazon Echo skill for Kodi - erikhogs - 2018-04-19

Hi m0ngr31,

Saw now that you sent me a PM. For some reason I'm not able to reply to that (not allowed for some reason) so I post my kodi.config here (have removed all the passwords etc.

#
# Global configuration
#
[global]
# Currently supported languages: en, de
language = en

# By default, if you ask to play media without specifying the type, the skill
# will search through the entire library to find a match.
#
# For example, if you ask, "Alexa, ask Kodi to play ninety nine red balloons,"
# the skill will search library items in the following order to find the song:
#
#   Movies -> Shows -> Artists -> Songs -> Albums
#
# If your library is really large, this can take some time to complete.  While
# it will eventually execute, Alexa may report that the skill timed out.  If
# this behavior bothers you, you can disable deep searches.
#
# When disabled, Alexa will simply provide help in the response directing you
# to issue a play command that includes the media type of the item.
deep_search = yes

# Limit number of items we add to playlists.
#
# Some requests will cause the skill to create a temporary playlist in Kodi
# before executing your command.  This operation is expensive in Kodi, so we
# provide the option here to limit the number of items added.
#
# The default is 100 to match Kodi's own 'party mode.'  Higher values will
# make these operations slower, but if your setup can handle it, you're free
# to set this to whatever you like.
#
# Set to an empty string for unlimited.
playlist_max_items = 100

# Search result limits for new (unwatched) Movies and Episodes.
#
# By default we ask kodi to return a max of 100 results per JSON request.
# Here you can set this figure to optimize the system for you.
# Results are always retrieved in order of newest episodes and movies first.
#
# Lower figures will produce faster results and limit them to only media that
# you've recently added to the library.
unwatched_shows_max_results     = 100
unwatched_episodes_max_results  = 100
unwatched_movies_max_results    = 100

# Set logging level.  Possible values are:
#
# CRITICAL
# ERROR
# WARNING
# INFO
# DEBUG
loglevel = INFO

# Log sensitive or personally identifying information.
#
# Disabling this prevents the skill from logging the target address for Kodi
# and your device IDs.
#
# It is enabled by default to make it easy for you to identify your Echo
# devices for mapping to specific instances of Kodi.
logsensitive = yes


# Global Alexa skill configuration
#
[alexa]
# Set skill_id to enable verification of requests by Flask-Ask.
skill_id = 

# Maximum number of items to generate per slot.
#
# If the skill is failing to save, you may need to reduce this.  Conversely,
# if Alexa is having problems distinguishing your requests (executing the
# wrong Intent, for instance), you may need to increase this.
slot_items_max = 100


#
# Default parameters common to all Alexa devices and the web simulator
#
[DEFAULT]
# The Kodi webserver only supports HTTP, but if you've set up a reverse HTTPS
# proxy you can change this to https.
scheme   = http
address  = my-dns.com
port     = 8080
# If using a reverse proxy you might need to add an extra bit to the url
# before "jsonrpc" (don't use slashes before or after).
subpath  =
username = kodi
password = mypassword

# Caching of Kodi responses.
#
# Provide an Amazon S3 bucket or a directory name here and provide credentials
# for one of the cache backends below to enable.
cache_bucket =

# Amazon S3 cache backend.
#
# Provide an AWS user key and key ID here to enable.
s3_cache_aws_access_key_id =
s3_cache_aws_secret_access_key =

# ownCloud/nextCloud cache backend.
#
# Provide the base URL for your ownCloud server and a valid user and password
# combination to enable.
owncloud_cache_url =
owncloud_cache_user =
owncloud_cache_password =

# Read timeout -- how long to wait for responses from Kodi before giving up.
#
# Normally there is no need to change this.
read_timeout = 120

# For some commands, we don't care about the response from Kodi, so we send
# them "fire-and-forget."  If you've got a proxy server in the middle, though,
# it's possible the command might not make it to Kodi before the skill exits.
#
# If Alexa is telling you she has completed a command but it sometimes does
# not actually execute on Kodi, you may need to increase this.
read_timeout_async = 0.01

# Set shutdown to 'quit' if you'd like "Alexa, tell Kodi to shut down"
# to quit Kodi instead of shutting down the system.
shutdown =

# 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:
# timezone = US/Eastern
#
# Leave empty if you don't need or want absolute time responses.  An example
# is asking when the currently playing item will end.  If you have this
# defined, it will also tell you the wall-clock time when the item will
# conclude.
timezone = Europe/Stockholm


# Override default values by specifying them below for individual devices.
#
# The usual reason to do this is to associate a given Echo device with a
# particular instance of Kodi in your house, but you can override any of
# the other configuration variables from the DEFAULT section here too.
#
# Device IDs can be found in the skill server / lambda log.

# living room dot
[amzn1.ask.device.XXX]
address = living-room-kodi

# kitchen echo
[amzn1.ask.device.XXX]
address = living-room-kodi

# kids room dot
[amzn1.ask.device.XXX]
address = kids-room-kodi

# office dot
[amzn1.ask.device.XXX]
address = office-kodi

# tap
[amzn1.ask.device.XXX]
address = living-room-kodi


RE: Amazon Echo skill for Kodi - mysteron09 - 2018-04-20

Hi m0ngr31 - It's building now. Deployed - haven't tested yet, but I'll give it a shot this afternoon. Thanks!!!!!

Update - just started testing and I'm getting "There was a problem with the skill's response" from my Echo. Here's the log from the server:
Quote:ALL PROCESSES 
2018-04-20T19:58:06.362897+00:00 app[web.1]:     value = str(extension)
2018-04-20T19:58:06.362898+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/OpenSSL/crypto.py", line 779, in __str__
2018-04-20T19:58:06.362899+00:00 app[web.1]:     return self._subjectAltNameString()
2018-04-20T19:58:06.362900+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/OpenSSL/crypto.py", line 740, in _subjectAltNameString
2018-04-20T19:58:06.362902+00:00 app[web.1]:     method = _lib.X509V3_EXT_get(self._extension)
2018-04-20T19:58:06.362903+00:00 app[web.1]: AttributeError: 'module' object has no attribute 'X509V3_EXT_get'
2018-04-20T19:58:06.363487+00:00 app[web.1]: 10.151.195.140 - - [20/Apr/2018:19:58:06 +0000] "POST / HTTP/1.1" 500 291 "-" "Apache-HttpClient/4.5.x (Java/1.8.0_131)"
2018-04-20T19:58:06.363438+00:00 heroku[router]: at=info method=POST path="/" host=kanzi-mwb-v1.herokuapp.com request_id=5d25e42b-636d-42ae-8ea7-3fc847326f6d fwd="72.21.217.97" dyno=web.1 connect=0ms service=29ms status=500 bytes=456 protocol=https
2018-04-20T20:01:46.063462+00:00 heroku[router]: at=info method=GET path="/" host=kanzi-mwb-v1.herokuapp.com request_id=80f61219-f342-4b7e-af97-82796fdac84f fwd="75.133.125.94" dyno=web.1 connect=0ms service=3ms status=405 bytes=362 protocol=https



RE: Amazon Echo skill for Kodi - m0ngr31 - 2018-04-20

Try deploying again. I found an issue with a package version.


RE: Amazon Echo skill for Kodi - mysteron09 - 2018-04-20

Hi m0ngr31 - redeployed from scratch, and it's working. Thanks so much for your work on this and your help!