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) Pages:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
|
RE: Amazon Echo skill for Kodi - abolton - 2016-08-06 Hey JoeyGecho - I'm getting this same error, would you be able to help me out with how you corrected it please? Thanks! (2016-07-05, 19:40)joeygecho Wrote: anything I ask seems to give me this error. RE: Amazon Echo skill for Kodi - abolton - 2016-08-06 Success figured out what I was doing wrong...had a TYPO in Kodi user name in the kodi.py file!!! For the others that might run across this other type of error that I hit starting off...."Handler 'lambda_handler' missing on module 'wsgi'" Pay attention to how you are zipping your files up. I was just zipping back up the folder extracted from the download after editing the Kodi file. This creates a sub directory and thus changes the file structure. Should just be zipping the files back up and not the folder. How I love the small things messing with me at night! First impression using AWS are responses seem a bit better than with Heroku. Still get some errors from Alexa but think thats more due to how long Kodi is taking to load my movies. Thanks for everyone that contributed to this awesome skill! (2016-08-06, 04:39)abolton Wrote: Hey JoeyGecho - I'm getting this same error, would you be able to help me out with how you corrected it please? RE: Amazon Echo skill for Kodi - edru - 2016-09-09 So if anyone wants to set this up on their own, here are the full start to finish instructions. I made these after spending 2 hours pulling my hair out only to realize I was missing a python module. Primary thanks to @astro14 who had most of this put together in a small comment. Feel free to share as needed or to add to any walkthrough/guide/even the opening post. Install Prereqs: Code: sudo apt install apache2 apache2-utils libexpat1 ssl-cert python-pip libapache2-mod-wsgi git-core Install python modules: Code: sudo pip install requests yaep pytz pycountry fuzzywuzzy python-Levenshtein Sync repo to folder: Code: cd /var/www/html Modify Personal KODI info: Code: sudo nano /var/www/html/kodi-alexa/kodi.py Modify the following entries to match your setup: Code: KODI_ADDRESS Enable SSL: Code: sudo a2enmod ssl Create Certs: (if further help needed https://www.digitalocean.com/community/tutorials/how-to-create-a-ssl-certificate-on-apache-for-ubuntu-14-04) Code: sudo mkdir /etc/apache2/ssl Modify SSL Conf File: Code: sudo nano /etc/apache2/sites-available/default-ssl.conf Verify DocumentRoot and add path to WSGIScriptAlias: Code: DocumentRoot /var/www/html Modify the SSLCertificate paths: Code: SSLCertificateFile /etc/apache2/ssl/apache.crt Exit and Save Enable the Site: Code: sudo a2ensite default-ssl.conf Restart Apache: Code: sudo service apache2 restart Copy contents of SSL certificate for Amazon: Code: nano /etc/apache2/ssl/apache.crt Configure Amazon Developer Portal Skill: Follow instructions here: https://github.com/m0ngr31/kodi-alexa for most configuration walk through. Mind you that the address you use will be different, and you will need to generate your show/movie/music lists (custom slots). Set your IP as https://YOUR_ADDRESS/kodi-alexa SSL: paste copied cert Save - this should do it. Even started over and followed this guide to the T and it worked for me in minutes. EDIT: Updated 1/22/2017 RE: Amazon Echo skill for Kodi - geman220 - 2016-09-20 (2016-09-09, 05:13)edru Wrote: So if anyone wants to set this up on their own, here are the full start to finish instructions. I made these after spending 2 hours pulling my hair out only to realize I was missing a python module. Primary thanks to @astro14 who had most of this put together in a small comment. Not sure what I have done wrong but I get the following error: "The remote endpoint could not be called, or the response it returned was invalid." I am able to go to HTTPS://MYURL/kodi-alexa which loads a blank page. If I try HTTPS://MYURL/kodi-alexa1 it 404s as you would expect. I have opened 443 through my router and it's forwarded to the correct local IP. I tried sudo chmod 777 wsgi.py just as a test but that didn't seem to help either. It's pretty clear that it's not talking to my local installation but I'm not sure why. EDIT: I have a service running on port 80 but I don't think tha twould matter because all traffic should be over 443 correct? I've done tcpdump 'port 443' and I see the inbound traffic coming to my HTTPS device but it's still not working. Not sure what the problem could be but it seems to be coming in fine and there is a handshake. I have the kodi.py configured correctly. RE: Amazon Echo skill for Kodi - edru - 2016-09-25 (2016-09-20, 00:27)geman220 Wrote: Not sure what I have done wrong but I get the following error: "The remote endpoint could not be called, or the response it returned was invalid." In most cases it has something to do with either the SSL certificate, or the requirements. Check out the logs and see if you can see anything blatant. I get the blank page as well when manually surfing there. With the little bit of info given, id say make sure the SSL is correct on the amazon side, verify you have the correct info added into the kodi.py, verify the services are active on KODI itself, verify the git is synced at //var/www/html/kodi-alexa/, and then verify you added the WSGI script line (and that they actually match correctly): DocumentRoot /var/www/html WSGIScriptAlias /kodi-alexa /var/www/html/kodi-alexa/wsgi.py The logs are what pointed me in the right direction as far as needing the "requests" module. Quick way to test kodi is exactly how you tested the module, just surf to the path/port being used, use the username and password, and you should be able to hit Kodi's web gui. RE: Amazon Echo skill for Kodi - mihaiii - 2016-09-25 I get an error when i try to add the intent schema "Error: There was a problem with your request: Unknown slot type 'MUSIC' for slot 'Artist' " I attached the screenshot I used copy paste so i don't think there's an error there https://imgur.com/a/lzPf9 LE.. Found the answer.. I had to add the MUSIC / MOVIES RTFM, Mihai RE: Amazon Echo skill for Kodi - Herr Pink - 2016-09-28 Edited: removed original post Ignore all of this, I've figured it out. Many thanks for the great work on this RE: Amazon Echo skill for Kodi - tmn103 - 2016-10-01 Thanks very much for this. edit: was having problems with lambda timing out. Realised my mistake - I'd set the kodi address as internal ip address! RE: Amazon Echo skill for Kodi - AgileHumor - 2016-10-02 Thank you so much for this addon. Was able to install it on Windows with your excellent guide. I did get an error on the searches though: Oct 02 00:19:36 fast-meadow-33649 app/web.1: Requested intent: DoSearch Oct 02 00:19:36 fast-meadow-33649 app/web.1: [2016-10-02 07:19:35 +0000] [12] [ERROR] Error handling request / Oct 02 00:19:36 fast-meadow-33649 app/web.1: Traceback (most recent call last): Oct 02 00:19:36 fast-meadow-33649 app/web.1: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/workers/sync.py", line 135, in handle Oct 02 00:19:36 fast-meadow-33649 app/web.1: self.handle_request(listener, req, client, addr) Oct 02 00:19:36 fast-meadow-33649 app/web.1: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/workers/sync.py", line 176, in handle_request Oct 02 00:19:36 fast-meadow-33649 app/web.1: respiter = self.wsgi(environ, resp.start_response) Oct 02 00:19:36 fast-meadow-33649 app/web.1: File "/app/wsgi.py", line 851, in application Oct 02 00:19:36 fast-meadow-33649 app/web.1: output = h[1](environ, start_response) Oct 02 00:19:36 fast-meadow-33649 app/web.1: File "/app/wsgi.py", line 791, in do_alexa Oct 02 00:19:36 fast-meadow-33649 app/web.1: response = one_intent[1](intent_slots) Oct 02 00:19:36 fast-meadow-33649 app/web.1: File "/app/wsgi.py", line 452, in alexa_do_search Oct 02 00:19:36 fast-meadow-33649 app/web.1: heard_search = str(slots['Search']['value']).lower().translate(None, string.punctuation) Oct 02 00:19:36 fast-meadow-33649 app/web.1: KeyError: 'Search' RE: Amazon Echo skill for Kodi - m0ngr31 - 2016-10-03 (2016-10-02, 05:19)AgileHumor Wrote: Thank you so much for this addon. Was able to install it on Windows with your excellent guide. I've updated this today to fix the search! RE: Amazon Echo skill for Kodi - AgileHumor - 2016-10-03 Thanks man! You rock! Really well done! PS - Tested and working. RE: Amazon Echo skill for Kodi - litfoo - 2016-10-05 hey all, was trying to get this working but seem to have gotten stuck towards the end of setting up Heroku at the point, where I should have entered: Code: git remote add heroku https://git.heroku.com/my-appname-88888.git I just entered Code: git remote add heroku https://git.heroku.com/my-appname-88888 i then pressed enter and then ran Code: git push heroku master which returned the error Code: c:\Kodistuff\Code\kodi-alexa>git push heroku master and if I try to enter Code: git remote add heroku https://git.heroku.com/my-appname-88888.git i get Code: fatal: remote heroku already exists. not sure how to get around this loop now any help would be appreciated thanks, litfoo RE: Amazon Echo skill for Kodi - m0ngr31 - 2016-10-05 Code: git remote rm heroku RE: Amazon Echo skill for Kodi - litfoo - 2016-10-05 (2016-10-05, 22:09)m0ngr31 Wrote: thanks and then start again with Code: git remote add heroku https://git.heroku.com/my-appname-88888.git or back to Code: git clone https://github.com/m0ngr31/kodi-alexa.git RE: Amazon Echo skill for Kodi - m0ngr31 - 2016-10-05 Just try adding the remote source again. Code: git remote add heroku https://git.heroku.com/my-appname-88888.git |