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-06-25

Yup, that is enough.


RE: Amazon Echo skill for Kodi - skydancer - 2017-06-25

Hi, I'm getting 503 error on last update.
heroku log:
ile "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 126, in init_process
2017-06-25T15:49:14.555232+00:00 app[web.1]: self.load_wsgi()
2017-06-25T15:49:14.555233+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 148, in load_wsgi
2017-06-25T15:49:14.555234+00:00 app[web.1]: self.reloader.add_extra_file(exc_val.filename)
2017-06-25T15:49:14.555234+00:00 app[web.1]: AttributeError: 'NoneType' object has no attribute 'add_extra_file'
2017-06-25T15:49:14.555314+00:00 app[web.1]: [2017-06-25 15:49:14 +0000] [9] [INFO] Worker exiting (pid: 9)
2017-06-25T15:49:14.663973+00:00 app[web.1]: [2017-06-25 15:49:14 +0000] [4] [INFO] Shutting down: Master
2017-06-25T15:49:14.664091+00:00 app[web.1]: [2017-06-25 15:49:14 +0000] [4] [INFO] Reason: Worker failed to boot.
2017-06-25T15:49:14.741387+00:00 heroku[web.1]: Process exited with status 3
2017-06-25T15:49:14.753107+00:00 heroku[web.1]: State changed from starting to crashed
2017-06-25T15:53:52.025767+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=POST path="/" host=warm-ocean-67074.herokuapp.com request_id=cf268f70-4118-4918-9ef3-947e1b5bce4d fwd="72.21.217.70" dyno= connect= service= status=503 bytes= protocol=https

any advice please?


RE: Amazon Echo skill for Kodi - MANswers - 2017-06-26

I have close to 2000+ movies in my library, do i need to add all of these movies in the Custom Slots for MOVIES with a concatenation?
That will be a massive effort.. Sad
Or just a few movies for the sake of examples will do?


RE: Amazon Echo skill for Kodi - jingai - 2017-06-26

@skydancer, try this in your virtualenv and see if the problem goes away:

Code:
pip install -r requirements.txt
pip install packaging
zappa update dev

@MANswers, you're going to want to read the documentation a lot more carefully. You're going to run into a lot of issues if you just skim through it.

The documentation pretty clearly points you at two different ways to generate the slot contents.


RE: Amazon Echo skill for Kodi - MANswers - 2017-06-26

Ok, i get it now, I was able to paste the movies generated by the slot generator site.
However here's a quick question.. i only see close to 100 movies showing up in the slot generator. the rest of the 1900 movies do not show up. What am i doing wrong.


RE: Amazon Echo skill for Kodi - jingai - 2017-06-26

Nothing. The Slot generators trim it to fit size requirements.

The slots are just examples. They don't need to contain every single library item.


RE: Amazon Echo skill for Kodi - jingai - 2017-06-26

New release -- changes:

v2.7.0 (06/26/2017)
  • Better matching for songs and albums in certain cases.
  • Return newest instead of most recently-added album when asking for newest album by an artist.

v2.6.6 (06/20/2017)
  • Speed up speech responses for certain requests.
  • Add ability to specify an album when playing a song.
  • Add playlist_max_items option.



RE: Amazon Echo skill for Kodi - MANswers - 2017-06-26

Thanks for your replies, this helps.

I have completed the setup, and did not receive any errors so far.
I have the portfowarding also working fine through my firewall. Checked 8080 is open.
However Echo still does not recognize the Kodi skill/keyword.
First it was saying it cannot find the skill kodi, and now for the last 5 mins its saying that "there is a problem with the requested skill response".
I am wondering if i did something wrong in the kodi.config file. Can you verify these two things for me?

Do i need to add my public IP here or this is just fine?

# 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 = 127.0.0.1
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 = 0000

Do i need to change the address here to Local IP address instead of "living-room-kodi"
# living room dot
[amzn1.ask.device.XXX]
address = living-room-kodi


RE: Amazon Echo skill for Kodi - jingai - 2017-06-26

@MANswers, the IP address should be your public (internet) IP address. If this isn't static, you will want to use a dynamic DNS like dyndns, noip, etc.

If you have more than one Kodi device you want to control, you will have to forward different ports. The port can be 8080 on all of the Kodi clients, but the ports opened on your router will all have to be different, of course.


RE: Amazon Echo skill for Kodi - MANswers - 2017-06-26

Does this look ok ? Please check the last line as well (i have confusions about this one).

# 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 = "static public ip here"
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 = 0000

Do i need to change the address here to Local IP address instead of "living-room-kodi"
# living room dot
[amzn1.ask.device.XXX]
address = "Static public ip here"


RE: Amazon Echo skill for Kodi - jingai - 2017-06-26

Are you trying to control more than one instance of Kodi? If not, you don't need the device ID sections at all.

If you are, you'll want to override port -- not address -- if they're all behind the same public address.


RE: Amazon Echo skill for Kodi - MANswers - 2017-06-26

I am sorry about all these posts. I am just in the final bit, and after all this work, i am stuck at a very silly point. I assure you, i have read the git page word to word, and have followed every bit of instructions.
But after replacing the public ip now, i got this error.. is this cos of port forwarding or something else?


Code:
(venv) C:\Python27\kodi-alexa>python generate_custom_slots.py
Sending request to http://xxx.xxx.xxx.xxx:8080/jsonrpc from device Unknown Device
Traceback (most recent call last):
  File "generate_custom_slots.py", line 13, in <module>
    retrieved = kodi.GetMusicArtists()
  File "C:\Python27\kodi-alexa\venv\lib\site-packages\kodi_voice\kodi.py", line 1066, in GetMusicArtists
    return self.SendCommand(RPCString("AudioLibrary.GetArtists", {"albumartistsonly": False}))
  File "C:\Python27\kodi-alexa\venv\lib\site-packages\kodi_voice\kodi.py", line 306, in SendCommand
    r = requests.post(url, data=command, auth=(self.username, self.password), timeout=timeout)
  File "C:\Python27\kodi-alexa\venv\lib\site-packages\requests\api.py", line 112, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "C:\Python27\kodi-alexa\venv\lib\site-packages\requests\api.py", line 58, in request
    return session.request(method=method, url=url, **kwargs)
  File "C:\Python27\kodi-alexa\venv\lib\site-packages\requests\sessions.py", line 502, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Python27\kodi-alexa\venv\lib\site-packages\requests\sessions.py", line 612, in send
    r = adapter.send(request, **kwargs)
  File "C:\Python27\kodi-alexa\venv\lib\site-packages\requests\adapters.py", line 496, in send
    raise ConnectTimeout(e, request=request)
requests.exceptions.ConnectTimeout: HTTPConnectionPool(host='xxx.xxx.xxx.xxx', port=8080): Max retries exceeded with url: /jsonrpc (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x00000000044A0DA0>, 'Connection to xxx.xxx.xxx.xxx timed out. (connect timeout=10)'))

P.s. I have replaced the host ip address with xxx


RE: Amazon Echo skill for Kodi - MANswers - 2017-06-26

(2017-06-26, 20:22)jingai Wrote: Are you trying to control more than one instance of Kodi? If not, you don't need the device ID sections at all.

If you are, you'll want to override port -- not address -- if they're all behind the same public address.

I am controlling only one instance. And its on my PC based media server.


RE: Amazon Echo skill for Kodi - jingai - 2017-06-26

That log is stating simply that the skill is unable to connect to Kodi. This could mean one or more of many things:

1) The IP/host you entered is wrong,
2) Your port-forwarding configuration is wrong,
3) Kodi isn't running,
4) Kodi's web server isn't running/enabled,
5) The username and/or password for the Kodi web server is wrong.


RE: Amazon Echo skill for Kodi - MANswers - 2017-06-26

Question.. For testing purposes should the public ip and the port number togather (xxx.xxx.xxx.xxx:8080) should show up the kodi web interface?
If thats the case, its not showing up for me..