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 - 2017-08-12

(2017-08-12, 23:34)steve55792 Wrote: I'm using AWS

How did you run these:

Code:
zappa init
zappa deploy dev

if zappa doesn't exist?


RE: Amazon Echo skill for Kodi - steve55792 - 2017-08-12

In the command prompt. what part of the aws are we supposed to run, i think i remember doing the zappa dev thing and it went thru the process but that was my first time doing it but i did the aws service and lambda thing so many times because i was confused maybe it got deleted some how, if possible.


RE: Amazon Echo skill for Kodi - jingai - 2017-08-12

If the above two zappa commands worked, then
Code:
zappa tail dev
will work (or, at least, it won't tell you it can't find the command).

You're supposed to run absolutely everything it says to run in the README. Unfortunately, I really have absolutely no idea where you went wrong, so I'd suggest either trying to figure out how to get the logs so I can see what's happening (zappa tail dev), or start over from the beginning and be very careful to do everything exactly as outlined in the documentation.


RE: Amazon Echo skill for Kodi - shyyour - 2017-08-12

(2017-08-12, 23:29)jingai Wrote:
(2017-08-12, 23:02)shyyour Wrote:
(2017-08-12, 21:31)jingai Wrote: Specify the url in kodi.config without slashes or HTTP

I dont have a kodi.config file, or rarther dont know where it is.

The description for the KODI_ADDRESS field in the Heroku setup is wrong -- it's supposed to be an address, i.e., a fully-qualified domain name or IP address, like myhost.dyndns.org or 229.101.84.5.

In other words, not a URL, and it should not contain any slashes or anything either.

I've fixed the description of the field upstream.

Thanks is there any way to edit my settings in heroku or do i delete the app and redeploy

Thanks again


RE: Amazon Echo skill for Kodi - steve55792 - 2017-08-12

i probably start fresh and thank you.


RE: Amazon Echo skill for Kodi - jingai - 2017-08-12

@shyyour, I don't think you need to delete it -- just deploy again with the correct settings.


RE: Amazon Echo skill for Kodi - shyyour - 2017-08-12

Never mind figured out how to edit thanks


RE: Amazon Echo skill for Kodi - shyyour - 2017-08-12

(2017-08-12, 23:55)jingai Wrote: @shyyour, I don't think you need to delete it -- just deploy again with the correct settings.

Thanks

i noticed that KODI_SCHEME & KODI_SUBPATH are empty is that ok ?


RE: Amazon Echo skill for Kodi - jingai - 2017-08-12

(2017-08-12, 23:57)shyyour Wrote: i noticed that KODI_SCHEME & KODI_SUBPATH are empty is that ok ?

If you're not sure, probably yes, it's OK.


RE: Amazon Echo skill for Kodi - shyyour - 2017-08-13

ok so now alexa says " the requested skill took too long".

Please advice
Thanks

2017-08-12T21:55:23.519542+00:00 heroku[web.1]: Starting process with command `gunicorn alexa:app`
2017-08-12T21:55:26.966601+00:00 app[web.1]: [2017-08-12 21:55:26 +0000] [10] [INFO] Booting worker with pid: 10
2017-08-12T21:55:26.947386+00:00 app[web.1]: [2017-08-12 21:55:26 +0000] [4] [INFO] Using worker: sync
2017-08-12T21:55:26.946464+00:00 app[web.1]: [2017-08-12 21:55:26 +0000] [4] [INFO] Starting gunicorn 19.7.1
2017-08-12T21:55:26.947200+00:00 app[web.1]: [2017-08-12 21:55:26 +0000] [4] [INFO] Listening at: http://0.0.0.0:30502 (4)
2017-08-12T21:55:26.954438+00:00 app[web.1]: [2017-08-12 21:55:26 +0000] [9] [INFO] Booting worker with pid: 9
2017-08-12T21:55:27.307863+00:00 heroku[web.1]: State changed from starting to up
2017-08-12T21:55:28.875200+00:00 app[web.1]: /app/.heroku/python/lib/python2.7/site-packages/fuzzywuzzy/fuzz.py:35: UserWarning: Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning
2017-08-12T21:55:28.875205+00:00 app[web.1]: warnings.warn('Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning')
2017-08-12T21:55:29.041833+00:00 app[web.1]: /app/.heroku/python/lib/python2.7/site-packages/fuzzywuzzy/fuzz.py:35: UserWarning: Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning
2017-08-12T21:55:29.041836+00:00 app[web.1]: warnings.warn('Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning')
2017-08-12T21:59:10.734156+00:00 heroku[router]: at=info method=POST path="/" host=shyyour.herokuapp.com request_id=4353a8fb-0e5b-449d-930f-a93694302f56 fwd="72.21.217.174" dyno=web.1 connect=1ms service=51ms status=200 bytes=428 protocol=https
2017-08-12T21:59:10.730037+00:00 app[web.1]: Welcome to Kodi.
2017-08-12T21:59:20.522476+00:00 app[web.1]: Playing recently added songs
2017-08-12T21:59:20.523035+00:00 app[web.1]: Sending request to http:///jsonrpc from device amzn1.ask.device.AG4HLWOPENKDUMIPSSB7Z6BPQS4MNYAV5SIIPVBPDKHCEX6ENWHSJVBQKV5UV4EKIH6ENLLGDPRJMP752LPTN56MVADF4EROHK6LOHATLLWQ5CZUPLSNWKZNJHJQFCTJHM5TA7FPXXCLY626ANP65QLGFNQA
2017-08-12T21:59:30.560819+00:00 heroku[router]: at=info method=POST path="/" host=shyyour.herokuapp.com request_id=9b429cbc-e445-4d38-86a8-69565443ca8a fwd="72.21.217.174" dyno=web.1 connect=1ms service=10113ms status=500 bytes=456 protocol=https
2017-08-12T21:59:30.543732+00:00 app[web.1]: [2017-08-12 21:59:30,539] ERROR in app: Exception on / [POST]
2017-08-12T21:59:30.543743+00:00 app[web.1]: Traceback (most recent call last):
2017-08-12T21:59:30.543744+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/flask/app.py", line 1982, in wsgi_app
2017-08-12T21:59:30.543744+00:00 app[web.1]: response = self.full_dispatch_request()
2017-08-12T21:59:30.543745+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/flask/app.py", line 1614, in full_dispatch_request
2017-08-12T21:59:30.543746+00:00 app[web.1]: rv = self.handle_user_exception(e)
2017-08-12T21:59:30.543747+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/flask/app.py", line 1517, in handle_user_exception
2017-08-12T21:59:30.543747+00:00 app[web.1]: reraise(exc_type, exc_value, tb)
2017-08-12T21:59:30.543748+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/flask/app.py", line 1612, in full_dispatch_request
2017-08-12T21:59:30.543749+00:00 app[web.1]: rv = self.dispatch_request()
2017-08-12T21:59:30.543749+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/flask/app.py", line 1598, in dispatch_request
2017-08-12T21:59:30.543750+00:00 app[web.1]: return self.view_functions[rule.endpoint](**req.view_args)
2017-08-12T21:59:30.543751+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/flask_ask/core.py", line 629, in _flask_view_func
2017-08-12T21:59:30.543752+00:00 app[web.1]: result = self._map_intent_to_view_func(self.request.intent)()
2017-08-12T21:59:30.543752+00:00 app[web.1]: File "/app/alexa.py", line 880, in alexa_listen_recently_added_songs
2017-08-12T21:59:30.543753+00:00 app[web.1]: songs_result = kodi.GetRecentlyAddedSongs()
2017-08-12T21:59:30.543754+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/kodi_voice/kodi.py", line 1237, in GetRecentlyAddedSongs
2017-08-12T21:59:30.543755+00:00 app[web.1]: return self.SendCommand(RPCString("AudioLibrary.GetRecentlyAddedSongs", {'properties':['artist']}))
2017-08-12T21:59:30.543755+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/kodi_voice/kodi.py", line 313, in SendCommand
2017-08-12T21:59:30.543756+00:00 app[web.1]: r = requests.post(url, data=command, auth=(self.username, self.password), timeout=timeout)
2017-08-12T21:59:30.543756+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/requests/api.py", line 112, in post
2017-08-12T21:59:30.543757+00:00 app[web.1]: return request('post', url, data=data, json=json, **kwargs)
2017-08-12T21:59:30.543758+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/requests/api.py", line 58, in request
2017-08-12T21:59:30.543758+00:00 app[web.1]: return session.request(method=method, url=url, **kwargs)
2017-08-12T21:59:30.543759+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/requests/sessions.py", line 508, in request
2017-08-12T21:59:30.543760+00:00 app[web.1]: resp = self.send(prep, **send_kwargs)
2017-08-12T21:59:30.543760+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/requests/sessions.py", line 618, in send
2017-08-12T21:59:30.543761+00:00 app[web.1]: r = adapter.send(request, **kwargs)
2017-08-12T21:59:30.543761+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/requests/adapters.py", line 496, in send
2017-08-12T21:59:30.543762+00:00 app[web.1]: raise ConnectTimeout(e, request=request)
2017-08-12T21:59:30.543768+00:00 app[web.1]: ConnectTimeout: HTTPConnectionPool(host='', port=8047): Max retries exceeded with url: /jsonrpc (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f437c9507d0>, 'Connection to timed out. (connect timeout=10)'))
2017-08-12T21:59:30.619175+00:00 heroku[router]: at=info method=POST path="/" host=shyyour.herokuapp.com request_id=409ad683-84b2-4c19-a790-0b189c557bd1 fwd="72.21.217.174" dyno=web.1 connect=1ms service=33ms status=200 bytes=161 protocol=https
2017-08-12T21:59:47.955558+00:00 app[web.1]: Playing recently added songs
2017-08-12T21:59:47.956385+00:00 app[web.1]: Sending request to http:///jsonrpc from device amzn1.ask.device.AG4HLWOPENKDUMIPSSB7Z6BPQS4MNYAV5SIIPVBPDKHCEX6ENWHSJVBQKV5UV4EKIH6ENLLGDPRJMP752LPTN56MVADF4EROHK6LOHATLLWQ5CZUPLSNWKZNJHJQFCTJHM5TA7FPXXCLY626ANP65QLGFNQA
2017-08-12T21:59:57.977357+00:00 heroku[router]: at=info method=POST path="/" host=shyyour.herokuapp.com request_id=33706f6a-33a2-4c00-b600-d5260977a435 fwd="72.21.217.174" dyno=web.1 connect=1ms service=10066ms status=500 bytes=456 protocol=https
2017-08-12T21:59:57.974365+00:00 app[web.1]: [2017-08-12 21:59:57,973] ERROR in app: Exception on / [POST]
2017-08-12T21:59:57.974375+00:00 app[web.1]: Traceback (most recent call last):
2017-08-12T21:59:57.974376+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/flask/app.py", line 1982, in wsgi_app
2017-08-12T21:59:57.974377+00:00 app[web.1]: response = self.full_dispatch_request()
2017-08-12T21:59:57.974378+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/flask/app.py", line 1614, in full_dispatch_request
2017-08-12T21:59:57.974378+00:00 app[web.1]: rv = self.handle_user_exception(e)
2017-08-12T21:59:57.974379+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/flask/app.py", line 1517, in handle_user_exception
2017-08-12T21:59:57.974380+00:00 app[web.1]: reraise(exc_type, exc_value, tb)
2017-08-12T21:59:57.974380+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/flask/app.py", line 1612, in full_dispatch_request
2017-08-12T21:59:57.974381+00:00 app[web.1]: rv = self.dispatch_request()
2017-08-12T21:59:57.974382+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/flask/app.py", line 1598, in dispatch_request
2017-08-12T21:59:57.974382+00:00 app[web.1]: return self.view_functions[rule.endpoint](**req.view_args)
2017-08-12T21:59:57.974385+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/flask_ask/core.py", line 629, in _flask_view_func
2017-08-12T21:59:57.974387+00:00 app[web.1]: result = self._map_intent_to_view_func(self.request.intent)()
2017-08-12T21:59:57.974387+00:00 app[web.1]: File "/app/alexa.py", line 880, in alexa_listen_recently_added_songs
2017-08-12T21:59:57.974388+00:00 app[web.1]: songs_result = kodi.GetRecentlyAddedSongs()
2017-08-12T21:59:57.974389+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/kodi_voice/kodi.py", line 1237, in GetRecentlyAddedSongs
2017-08-12T21:59:57.974390+00:00 app[web.1]: return self.SendCommand(RPCString("AudioLibrary.GetRecentlyAddedSongs", {'properties':['artist']}))
2017-08-12T21:59:57.974390+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/kodi_voice/kodi.py", line 313, in SendCommand
2017-08-12T21:59:57.974391+00:00 app[web.1]: r = requests.post(url, data=command, auth=(self.username, self.password), timeout=timeout)
2017-08-12T21:59:57.974392+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/requests/api.py", line 112, in post
2017-08-12T21:59:57.974392+00:00 app[web.1]: return request('post', url, data=data, json=json, **kwargs)
2017-08-12T21:59:57.974393+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/requests/api.py", line 58, in request
2017-08-12T21:59:57.974393+00:00 app[web.1]: return session.request(method=method, url=url, **kwargs)
2017-08-12T21:59:57.974394+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/requests/sessions.py", line 508, in request
2017-08-12T21:59:57.974394+00:00 app[web.1]: resp = self.send(prep, **send_kwargs)
2017-08-12T21:59:57.974395+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/requests/sessions.py", line 618, in send
2017-08-12T21:59:57.974396+00:00 app[web.1]: r = adapter.send(request, **kwargs)
2017-08-12T21:59:57.974396+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/requests/adapters.py", line 496, in send
2017-08-12T21:59:57.974397+00:00 app[web.1]: raise ConnectTimeout(e, request=request)
2017-08-12T21:59:57.974398+00:00 app[web.1]: ConnectTimeout: HTTPConnectionPool(host='', port=): Max retries exceeded with url: /jsonrpc (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f437c41a710>, 'Connection to timed out. (connect timeout=10)'))
2017-08-12T21:59:58.085457+00:00 heroku[router]: at=info method=POST path="/" host=shyyour.herokuapp.com request_id=af2fcd6c-817a-4af1-9a10-4bc04881d127 fwd="72.21.217.174" dyno=web.1 connect=1ms service=61ms status=200 bytes=161 protocol=https


RE: Amazon Echo skill for Kodi - jingai - 2017-08-13

@shyyour, you really should redact your personal info (domain name, etc), but.. to answer your question: it is unable to connect to Kodi. Any of the following could be the problem:
  • the domain name is still incorrect
  • the port is incorrect
  • your port-forwarding configuration on your router is incorrect
  • Kodi's web server was not enabled
  • Kodi isn't running



RE: Amazon Echo skill for Kodi - shyyour - 2017-08-13

(2017-08-13, 00:06)jingai Wrote: @shyyour, you really should redact your personal info (domain name, etc), but.. to answer your question: it is unable to connect to Kodi. Any of the following could be the problem:
  • the domain name is still incorrect
  • the port is incorrect
  • your port-forwarding configuration on your router is incorrect
  • Kodi's web server was not enabled
  • Kodi isn't running

Thanks will do so but how do i resolve the issue. Please is there anything else i can try ?
  • the domain name is still incorrect - i can access other applications using the dns name (e.g plex)
  • the port is incorrect - i can access kodi's web server
  • your port-forwarding configuration on your router is incorrect - i can access kodi's web server
  • Kodi's web server was not enabled - i can access kodi's web server
  • Kodi isn't running - i'm using kodi as i type



RE: Amazon Echo skill for Kodi - jingai - 2017-08-13

But can you access Kodi's web server from outside of your LAN?


RE: Amazon Echo skill for Kodi - shyyour - 2017-08-13

(2017-08-13, 00:18)jingai Wrote: But can you access Kodi's web server from outside of your LAN?

You're right again. It seems to be broken.

Thanks ill check the router


RE: Amazon Echo skill for Kodi - shyyour - 2017-08-13

it seems the problem is with the domain name, when i used the ip, i could access Kodi's web server on my mobile. Its weird because the domain name works for other apps outside my lan.

ill update heroku and test again.

thanks so much

EDIT: It's working now. Thanks @jingai for all your help, i wont have figured it out otherwise.

Thanks