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 - ziggy73701 - 2017-08-31

(2017-08-31, 16:07)jingai Wrote:
(2017-08-31, 16:05)ziggy73701 Wrote: Hello!!! Am getting

File "generate_custom_slots.py", line 81
print 'Writing: %s' % (filename)
^
SyntaxError: invalid syntax

When running python generate_custom_slots.py should I be adding something else?

Use Python 2.x -- not Python 3 -- as the README states at the top.

Man.. that's.... head hung in shame.... people messing with my Laptop... changing stuff.... ahem....

Thanks man!


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

(2017-08-31, 18:37)sparky0820 Wrote: Ask Kodi to watch Season 5 Episode 3 of Srubs I get the internal 500 error.

Please.. I'm not just messing with you -- I really do need logs if you want help. That error is as meaningless to me as it is to you.. it basically means "something broke."


RE: Amazon Echo skill for Kodi - sparky0820 - 2017-08-31

(2017-08-31, 18:46)jingai Wrote:
(2017-08-31, 18:37)sparky0820 Wrote: Ask Kodi to watch Season 5 Episode 3 of Srubs I get the internal 500 error.

Please.. I'm not just messing with you -- I really do need logs if you want help. That error is as meaningless to me as it is to you.. it basically means "something broke."

Understood. Thankful for the help as I'm learning myself. Now, keep in mind, I'm remote to my home setup right now so I'm using the test simulator when trying the commands. Here is the error that I received when trying "watch season 05 episode 04 of Scrubs"

File "c:\users\parks\appdata\local\temp\pip-build-flebj3\kodi-voice\kodi_voice\kodi.py", line 1334, in GetSpecificEpisode
TypeError: int() argument must be a string or a number, not 'NoneType'


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

In the simulator, you need to spell out numbers as words, like so:

"watch season five episode three of scrubs"

In the future, please do not post log snippets -- most of the time we will need the log entries leading up to the error, not just the last error.


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

Ok. I followed the readme and have everything down to the point of the initial deployment to Lambda. I run "zappa deploy dev" at which point I get"Warning! couldn't get function kodi-alexa-dev in us-east-1 - have you deployed yet?" Can anyone help me with this? I have no idea what I'm doing wrong here. In the amazon setup I cant tick the SSL setting required until I input the URL that I get from deploying. I tried pip install packaging and zappa update dev but got the same result.


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

(2017-08-30, 14:32)jingai Wrote: @thehatboxghost, Post the skill log for the request and I'll sort it out for you.

@jingai I'm not sure where to find what you are asking for but my best guess is this:

START RequestId: 91f21401-8ee7-11e7-a9a8-ad2f27f83482 Version: $LATEST
[DEBUG] 2017-09-01T07:31:29.618Z 91f21401-8ee7-11e7-a9a8-ad2f27f83482 Zappa Event: {u'body': u'IHsic2Vzc2lvbiI6IAp7InNlc3Npb25JZCI6IlNlc3Npb25JZC45ZTVlMzk0Yy0xYmI4LTQyZDktOGE0Zi01YmNkODczZjZmMzIiLCJhcHBsaWNhdGlvbiI6eyJhcHBsaWNhdGlvbklkIjoiYW16bjEuYXNrLnNraWxsLmI0ZjUxMDBkLTMwZGMtNDk2Yy05MTQxLTM0ZTE0MWUwODllMCJ9LCJhdHRyaWJ1dGVzIjp7fSwidXNlciI6eyJ1c2VySWQiOiJhbXpuMS5hc2suYWNjb3VudC5BR1g1RVU2M1lRTzZLSUVSSFNOVVdYVlRER1hGNk9ZR1NGMkEyM01YSjJXVzVYMjRJVDRYSzRQUlFXTUlOU01YUkJWWU9RU1VISUdMWlNHUFpFMkg1MkJUNTZLREdHRUxWNlI1TU8zMkxCM1BEVVEzU1VZRk43QVVMRVVWWFBCSFBHSFRGR0NJQ0dZWVlFREJTTU9YSzQ1WkFMRFBWU041S1hGUUpRVzU0RzJIUkJUMlJDQTJFQkhPTlRDNFdPNFJTQVY3RktUSkNJR1hYSFEiLCJhY2Nlc3NUb2tlbiI6bnVsbH0sIm5ldyI6dHJ1ZX0sCiJyZXF1ZXN0IjoKeyJpbnRlbnQiOnsibmFtZSI6IlN0b3AiLCJzbG90cyI6e319LCJyZXF1ZXN0SWQiOiJFZHdSZXF1ZXN0SWQuZWZjYjQ2ZGEtMTk1My00ZDJjLTg2YjAtYmJiMjU4NWUzZjQwIiwidHlwZSI6IkludGVudFJlcXVlc3QiLCJsb2NhbGUiOiJlbi1VUyIsInRpbWVzdGFtcCI6IjIwMTctMDktMDFUMDc6MzE6MjlaIn0sImNvbnRleHQiOnsiQXVkaW9QbGF5ZXIiOnsicGxheWVyQWN0aXZpdHkiOiJJRExFIn0sIlN5c3RlbSI6eyJhcHBsaWNhdGlvbiI6eyJhcHBsaWNhdGlvbklkIjoiYW16bjEuYXNrLnNraWxsLmI0ZjUxMDBkLTMwZGMtNDk2Yy05MTQxLTM0ZTE0MWUwODllMCJ9LCJ1c2VyIjp7InVzZXJJZCI6ImFtem4xLmFzay5hY2NvdW50LkFHWDVFVTYzWVFPNktJRVJIU05VV1hWVERHWEY2T1lHU0YyQTIzTVhKMldXNVgyNElUNFhLNFBSUVdNSU5TTVhSQlZZT1FTVUhJR0xaU0dQWkUySDUyQlQ1NktER0dFTFY2UjVNTzMyTEIzUERVUTNTVVlGTjdBVUxFVVZYUEJIUEdIVEZHQ0lDR1lZWUVEQlNNT1hLNDVaQUxEUFZTTjVLWEZRSlFXNTRHMkhSQlQyUkNBMkVCSE9OVEM0V080UlNBVjdGS1RKQ0lHWFhIUSJ9LCJkZXZpY2UiOnsic3VwcG9ydGVkSW50ZXJmYWNlcyI6e319fX0sInZlcnNpb24iOiIxLjAifQ==', u'resource': u'/', u'requestContext': {u'resourceId': u'fu7rz2cxel', u'apiId': u'elcksxnlt3', u'resourcePath': u'/', u'httpMethod': u'POST', u'requestId': u'91eb5d75-8ee7-11e7-8d5b-4d68e50fa817', u'path': u'/dev', u'accountId': u'079534769547', u'identity': {u'apiKey': u'', u'userArn': None, u'cognitoAuthenticationType': None, u'accessKey': None, u'caller': None, u'userAgent': u'Apache-HttpClient/UNAVAILABLE (Java/1.8.0_112)', u'user': None, u'cognitoIdentityPoolId': None, u'cognitoIdentityId': None, u'cognitoAuthenticationProvider': None, u'sourceIp': u'72.21.217.178', u'accountId': None}, u'stage': u'dev'}, u'queryStringParameters': None, u'httpMethod': u'POST', u'pathParameters': None, u'headers': {u'Content-Type': u'application/json; charset=utf-8', u'Via': u'1.1 2f58837c73ff25163966d00a02414d37.cloudfront.net (CloudFront)', u'CloudFront-Is-Desktop-Viewer': u'true', u'CloudFront-Is-SmartTV-Viewer': u'false', u'SignatureCertChainUrl': u'https://s3.amazonaws.com/echo.api/echo-api-cert-4.pem', u'CloudFront-Is-Mobile-Viewer': u'false', u'X-Forwarded-For': u'72.21.217.178, 54.182.230.46', u'CloudFront-Viewer-Country': u'US', u'X-Forwarded-Port': u'443', u'Accept': u'application/json', u'User-Agent': u'Apache-HttpClient/UNAVAILABLE (Java/1.8.0_112)', u'X-Amzn-Trace-Id': u'Root=1-59a90cd1-37145f3a39ece13a41fa454d', u'Accept-Charset': u'utf-8', u'Host': u'elcksxnlt3.execute-api.us-east-1.amazonaws.com', u'X-Forwarded-Proto': u'https', u'X-Amz-Cf-Id': u'GT_P0BT3tfWMlNiJ-sD9IDt6DIJzNoUaoQNpOb88fIl6W9Ilyu90Bw==', u'CloudFront-Is-Tablet-Viewer': u'false', u'Signature': u'dqaTiusIv5doyVQccnV3SfVDRrtDMIEW7PQSL2eLhY5nQJ7bKP6roZeYHWUopt97MG3KeXovpTXp5PZmGcqQxF9zadgxSUnVLxwZfUQULTtpp1I+wYCzvjm7II1RsqysZL70PA73JdSVcQhGa7ElojvNj4ILPZBJ4OxGIyoGtHWknle2AH3Pd7fkx88a4xppKZ/fXI53MloZg5O2yjmk40xg+s0n0OsOe6kesSd0xDEjzv3ixeZO1lrB7XW/1vM2drjxIzKQzgUlaWwXzWPMBfLAFtwHQaNuJABVkx/hFhdqqVQwlp0lkVeaXPh6wSKNK0tgPiB5adIjAwrkXeUt7g==', u'CloudFront-Forwarded-Proto': u'https'}, u'stageVariables': None, u'path': u'/', u'isBase64Encoded': True}
[2017-09-01 07:31:29,756] ERROR in app: Exception on / [POST]
Traceback (most recent call last):
File "/tmp/pip-build-M5Rvek/Flask/flask/app.py", line 1982, in wsgi_app
File "/tmp/pip-build-M5Rvek/Flask/flask/app.py", line 1614, in full_dispatch_request
File "/tmp/pip-build-M5Rvek/Flask/flask/app.py", line 1517, in handle_user_exception
File "/tmp/pip-build-M5Rvek/Flask/flask/app.py", line 1612, in full_dispatch_request
File "/tmp/pip-build-M5Rvek/Flask/flask/app.py", line 1598, in dispatch_request
File "/tmp/pip-build-M5Rvek/flask-ask/flask_ask/core.py", line 670, in _flask_view_func
File "/tmp/pip-build-M5Rvek/flask-ask/flask_ask/core.py", line 689, in _map_intent_to_view_func
NotImplementedError: Intent "Stop" not found and no default intent specified.
[INFO] 2017-09-01T07:31:29.757Z 91f21401-8ee7-11e7-a9a8-ad2f27f83482 72.21.217.178 - - [01/Sep/2017:07:31:29 +0000] "POST / HTTP/1.1" 500 291 "" "Apache-HttpClient/UNAVAILABLE (Java/1.8.0_112)" 0/138.734
END RequestId: 91f21401-8ee7-11e7-a9a8-ad2f27f83482


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

@thehatboxghost, hmm.. did you by chance upgrade the skill code recently and forget to update the interaction model on Amazon's skill builder site?


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

(2017-09-01, 02:48)DonBrutto Wrote: Ok. I followed the readme and have everything down to the point of the initial deployment to Lambda. I run "zappa deploy dev" at which point I get"Warning! couldn't get function kodi-alexa-dev in us-east-1 - have you deployed yet?" Can anyone help me with this? I have no idea what I'm doing wrong here. In the amazon setup I cant tick the SSL setting required until I input the URL that I get from deploying. I tried pip install packaging and zappa update dev but got the same result.

Kinda guessing, but I think you missed setting up your AWS credentials. Did you create a user and use aws configure to enter in your access key id and secret access key? Are they correct?


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

(2017-09-01, 02:48)DonBrutto Wrote: In the amazon setup I cant tick the SSL setting required until I input the URL that I get from deploying. I tried pip install packaging and zappa update dev but got the same result.

Please try to follow the README in order, too. If you skip around you're more likely to cause yourself grief.


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

Sorry guys am back... got all the skill built... working... and I can send some simple commands through which is all.. amazing!

I am struggling generating the slots, I have gone with the HEROKU setup, tried the slot generator and it just wont connect. tried from multiple sources and even tried multiple end points here. I can connect via a web browser and as I said, the vocal commands work I just cant generate the slots. Is there anything I can trouble shoot? Or is there a manual process?


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

(2017-09-01, 14:04)ziggy73701 Wrote: I am struggling generating the slots, I have gone with the HEROKU setup, tried the slot generator and it just wont connect. tried from multiple sources and even tried multiple end points here. I can connect via a web browser and as I said, the vocal commands work I just cant generate the slots. Is there anything I can trouble shoot?

Are you receiving an error message?

You're positive the fully-qualified domain name you're providing can be connected to from the internet? The port is the one you opened on your router, and not the internal port Kodi is listening on (they can be the same, but they don't have to be)?

Dumb question.. did you try scrolling down after submitting the form?

I just checked the web slot generator here and it's working for me.

(2017-09-01, 14:04)ziggy73701 Wrote: Or is there a manual process?

There is a python generator in the code base, but you'd have to pull the code down to your machine and set up a kodi.config file to use it.


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

The generator comes back with

Please validate your server information and try again

On the same machine I am able to logon to my kodi install fine... running 17.3

Pulling the code down I assume I just run through the instructions as though am setting up to use AWS... clone the git etc...


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

(2017-09-01, 14:40)ziggy73701 Wrote: The generator comes back with

Please validate your server information and try again

If you can give me an example of what you're entering in I can probably help more. Just something like what you're typing.

(2017-09-01, 14:40)ziggy73701 Wrote: On the same machine I am able to logon to my kodi install fine... running 17.3

The web slot generator connects over the internet. Try entering the same details (e.g., http://myhost.mydomain.com:myport/jsonrpc) on your mobile phone with WiFi turned off.

(2017-09-01, 14:40)ziggy73701 Wrote: Pulling the code down I assume I just run through the instructions as though am setting up to use AWS... clone the git etc...

Clone the git repo, fetch kodi.config.example, rename it to kodi.config, and then edit it as instructed in the README in the AWS section.


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

Entering fully qualified domain which is using Dynamic DNS, but get same result when putting in the External IP. Port 8080 and username and password. Process runs for a few seconds then comes back with the error.

I have tried it from inside my house, using the external address of course... also tried from the office.. and in fact from several offices Big Grin All the same result.

From all those machines I can access the default website using the same details.

Running locally.... kodi configured to look at the local IP of the same instance I get

C:\Users\XXXXX\kodi-alexa>python generate_custom_slots.py
Traceback (most recent call last):
File "generate_custom_slots.py", line 5, in <module>
from kodi_voice import KodiConfigParser, Kodi
File "C:\Users\xxxxxx\kodi-alexa\kodi_voice\__init__.py", line 1, in <module>
from .kodi import (
File "C:\Users\xxxxxxx\kodi-alexa\kodi_voice\kodi.py", line 7, in <module>
import requests
ImportError: No module named requests


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

(2017-09-01, 15:00)ziggy73701 Wrote: Entering fully qualified domain which is using Dynamic DNS, but get same result when putting in the External IP. Port 8080 and username and password. Process runs for a few seconds then comes back with the error.

You're not entering "http://" in front, are you? It's already there on the form. All you need for that field is the FQDN, such as ziggy73701.dyndns.org

Port 8080 is what you have open on your router? Remember, it can be different from the port Kodi is listening on.

Other than that, all I can think of is that you're not actually using the correct credentials. Even if you think you are, please re-verify Smile

(2017-09-01, 15:00)ziggy73701 Wrote: I have tried it from inside my house, using the external address of course... also tried from the office.. and in fact from several offices Big Grin All the same result.

From all those machines I can access the default website using the same details.

You need to try it from outside of your house. Easiest way to do that is to use a mobile device with access to mobile data and disable WiFi.

(2017-09-01, 15:00)ziggy73701 Wrote: Running locally.... kodi configured to look at the local IP of the same instance I get

C:\Users\XXXXX\kodi-alexa>python generate_custom_slots.py
Traceback (most recent call last):
File "generate_custom_slots.py", line 5, in <module>
from kodi_voice import KodiConfigParser, Kodi
File "C:\Users\xxxxxx\kodi-alexa\kodi_voice\__init__.py", line 1, in <module>
from .kodi import (
File "C:\Users\xxxxxxx\kodi-alexa\kodi_voice\kodi.py", line 7, in <module>
import requests
ImportError: No module named requests

Run pip install -r requirements.txt


This forum uses Lukasz Tkacz MyBB addons.