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 - MANswers - 2016-01-12 Thanks i've followed your steps.. looks like this time there is a different error.. Now in the service response i get an error saying.. "The remote endpoint could not be called, or the response it returned was invalid." I have a dedicated IP, should i use the public ip or should i use the local ip in the kodi.py file or the command rhc env set KODI_ADDRESS='xxx.xxx.x.xx' KODI_PORT='8081' KODI_USERNAME='kodi' KODI_PASSWORD='xxxx' -a kodi Is there anything else that comes to your mind that i might be doing wrong which is causing this issue? the url in the aws i have set is what i have obtained from openshift.. and i have modified it to start with https:// which looks something like this. https://kodi-something.rhcloud.com RE: Amazon Echo skill for Kodi - m0ngr31 - 2016-01-12 Okay, now we're getting there... Okay, so if you have a dedicated IP, just use that in the kodi.py file. You have to make sure that your router is forwarding the port you specify in kodi.py to the IP and port of your Kodi box. Give that a shot, and if it doesn't work, run this: Code: rhc tail -o "-n 20" -a kodi RE: Amazon Echo skill for Kodi - MANswers - 2016-01-12 (2016-01-12, 22:14)m0ngr31 Wrote: Okay, now we're getting there... Thanks for your quick reply. Yes the port has been forwarded in my router admin page, plus i have disabled the Kaspersky Internet security suite for now. The results for the above command. Quote:RSA 1024 bit CA certificates are loaded due to old openssl compatibility RE: Amazon Echo skill for Kodi - m0ngr31 - 2016-01-12 Hmmm. Nothing interesting there. Do you think you could PM me your ip and credentials so I can see if I can talk to it? RE: Amazon Echo skill for Kodi - MANswers - 2016-01-12 (2016-01-12, 22:35)m0ngr31 Wrote: Hmmm. Nothing interesting there. Do you think you could PM me your ip and credentials so I can see if I can talk to it? Cool sir, sending it now. RE: Amazon Echo skill for Kodi - Echellon - 2016-01-13 I'm having a slight issue as well. Asking Alexa (or testing utterance) gets me a HTTP 500 internal server error. The tail log (below) confirms the 500 'apache/http client unavailable'. Do you know if this is referring to the openshift instance or my kodi http interface? I can confirm port forwarding is available on my external IP as if I go to http://mydomain.com:90 I receive kodi's password prompt and can then login. Also, for KODI_ADDRESS, can it be set to a url as well? ie: "http://mydomain.com" or does it have to be ipv4 xxx.xxx.xxx.xxx? (I've tried both) Thanks again for the help and creation of this. output of log after "ask kodi to play a random movie" [Tue Jan 12 17:46:35 2016] [error] [client 127.2.192.129] File "/var/lib/openshift/569429820c1e66f414000172/app-root/runtime/repo/wsgi.py", line 338, in alexa_pick_random_movie [Tue Jan 12 17:46:35 2016] [error] [client 127.2.192.129] movies = movies_response['result']['movies'] [Tue Jan 12 17:46:35 2016] [error] [client 127.2.192.129] KeyError: 'result' 72.21.217.67 - - [12/Jan/2016:17:46:35 -0500] "POST / HTTP/1.1" 500 622 "-" "Apache-HttpClient/UNAVAILABLE (Java/1.8.0_66)" [Tue Jan 12 17:52:08 2016] [notice] caught SIGWINCH, shutting down gracefully - - - [12/Jan/2016:17:52:08 -0500] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.15 (Red Hat) (internal dummy connection)" [Tue Jan 12 17:52:14 2016] [notice] SELinux policy enabled; httpd running as context unconfined_uystem_r:openshift_t0:c1,c387 [Tue Jan 12 17:52:14 2016] [notice] Digest: generating secret for digest authentication ... [Tue Jan 12 17:52:14 2016] [notice] Digest: done [Tue Jan 12 17:52:14 2016] [notice] Apache/2.2.15 (Unix) mod_wsgi/3.4 Python/2.7.8 configured -- resuming normal operations [Tue Jan 12 17:56:24 2016] [error] [client 127.2.192.129] mod_wsgi (pid=440658): Exception occurred processing WSGI script '/var/lib/openshift/569429820c1e66f414000172/app-root/runtime/repo/wsgi.py'. [Tue Jan 12 17:56:24 2016] [error] [client 127.2.192.129] Traceback (most recent call last): [Tue Jan 12 17:56:24 2016] [error] [client 127.2.192.129] File "/var/lib/openshift/569429820c1e66f414000172/app-root/runtime/repo/wsgi.py", line 772, in application [Tue Jan 12 17:56:24 2016] [error] [client 127.2.192.129] output = h[1](environ, start_response) [Tue Jan 12 17:56:24 2016] [error] [client 127.2.192.129] File "/var/lib/openshift/569429820c1e66f414000172/app-root/runtime/repo/wsgi.py", line 742, in do_alexa [Tue Jan 12 17:56:24 2016] [error] [client 127.2.192.129] response = one_intent[1](intent_slots) [Tue Jan 12 17:56:24 2016] [error] [client 127.2.192.129] File "/var/lib/openshift/569429820c1e66f414000172/app-root/runtime/repo/wsgi.py", line 338, in alexa_pick_random_movie [Tue Jan 12 17:56:24 2016] [error] [client 127.2.192.129] movies = movies_response['result']['movies'] [Tue Jan 12 17:56:24 2016] [error] [client 127.2.192.129] KeyError: 'result' 72.21.217.99 - - [12/Jan/2016:17:56:24 -0500] "POST / HTTP/1.1" 500 622 "-" "Apache-HttpClient/UNAVAILABLE (Java/1.8.0_66)" RE: Amazon Echo skill for Kodi - m0ngr31 - 2016-01-13 Just figured this out with MANswers. Turns out there is something wrong with OpenShift causing this. Had him switch to Heroku and it worked great. Process is pretty similar, you'll just need to update a few things in the files: 1. Add a new line in the requirements.txt that just has the word gunicorn on it 2. Create a new file called Procfile (no extension or anything) that has this as text: Code: web: gunicorn wsgi:application RE: Amazon Echo skill for Kodi - m0ngr31 - 2016-01-13 And you can use a URL or IP address. RE: Amazon Echo skill for Kodi - FDorsey - 2016-01-13 (2016-01-12, 07:27)MANswers Wrote: Ok, after spending a few hours on this trial and error, i think i was able to work my self up a few further steps. That sounds like you have the wrong URL endpoint setup on your Alexa skill. Make sure it matches the one from the commands above. [/quote] This is where I am stuck too, my URL is an HTTP not an HTTPS which will not allow in the amazon developers section, and will not work if I just add the S on Amazon and not do anything about the real URL. RE: Amazon Echo skill for Kodi - m0ngr31 - 2016-01-13 Can you PM me the domain name that you are trying? RE: Amazon Echo skill for Kodi - Echellon - 2016-01-13 Was going to PM you, but for some reason this boards on here say i don't have permission to do to. Anyways.. So rather than use heroruku, I realized I could just spin up a webserver in the same amount of time at home to use instead. However, after getting everything setup, I still receive a 500 internal server error. Below is the log and the lines it is erroring out on after an utterance test: [Wed Jan 13 11:21:12.726331 2016] [mpm_event:notice] [pid 1379:tid 140389967804288] AH00489: Apache/2.4.7 (Ubuntu) mod_wsgi/3.4 Python/2.7.6 configured -- resuming normal operations [Wed Jan 13 11:21:12.726411 2016] [core:notice] [pid 1379:tid 140389967804288] AH00094: Command line: '/usr/sbin/apache2' mod_wsgi (pid=1380, process='', application='kodi.mywebsite.com|'): Loading WSGI script '/opt/www/kodi-alexa/wsgi.py'. mod_wsgi (pid=1380): Exception occurred processing WSGI script '/opt/www/kodi-alexa/wsgi.py'. Traceback (most recent call last): File "/opt/www/kodi-alexa/wsgi.py", line 772, in application output = h[1](environ, start_response) File "/opt/www/kodi-alexa/wsgi.py", line 742, in do_alexa response = one_intent[1](intent_slots) File "/opt/www/kodi-alexa/wsgi.py", line 338, in alexa_pick_random_movie movies = movies_response['result']['movies'] KeyError: 'movies' RE: Amazon Echo skill for Kodi - m0ngr31 - 2016-01-13 Yeah, that's the same issue I worked out with MANswers yesterday with Openshift. I'm not sure why exactly it's having that issue. It's mishandling the response from Kodi somehow. I bet you'll get a 200 on Play/Pause/Stop and it won't do anything? I'll PM you and you can give me your server details so I can test from my computer. RE: Amazon Echo skill for Kodi - edwsn2005 - 2016-01-19 (2016-01-13, 01:20)m0ngr31 Wrote: Just figured this out with MANswers. Turns out there is something wrong with OpenShift causing this. Had him switch to Heroku and it worked great. Hi, I tried using Heroku in place of OpenShift, but I'm having no luck. My logs go as follows: Erics-Mac:kodicommander aonelova$ heroku logs 2016-01-18T22:13:20.516508+00:00 app[web.1]: self.wsgi = self.app.wsgi() 2016-01-18T22:13:20.516514+00:00 app[web.1]: application} 2016-01-18T22:13:20.516520+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi 2016-01-18T22:13:20.512232+00:00 app[web.1]: SyntaxError: unexpected EOF while parsing 2016-01-18T22:13:20.516509+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi 2016-01-18T22:13:20.516515+00:00 app[web.1]: ^ 2016-01-18T22:13:20.516521+00:00 app[web.1]: self.callable = self.load() 2016-01-18T22:13:20.512380+00:00 app[web.1]: [2016-01-18 22:13:20 +0000] [10] [INFO] Worker exiting (pid: 10) 2016-01-18T22:13:20.516509+00:00 app[web.1]: self.callable = self.load() 2016-01-18T22:13:20.516515+00:00 app[web.1]: SyntaxError: unexpected EOF while parsing 2016-01-18T22:13:20.516521+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 65, in load 2016-01-18T22:13:20.516504+00:00 app[web.1]: Traceback (most recent call last): 2016-01-18T22:13:20.516510+00:00 app[web.1]: return self.load_wsgiapp() 2016-01-18T22:13:20.516516+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 515, in spawn_worker 2016-01-18T22:13:20.516522+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp 2016-01-18T22:13:20.516505+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 515, in spawn_worker 2016-01-18T22:13:20.516511+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp 2016-01-18T22:13:20.516517+00:00 app[web.1]: worker.init_process() 2016-01-18T22:13:20.516506+00:00 app[web.1]: worker.init_process() 2016-01-18T22:13:20.516512+00:00 app[web.1]: return util.import_app(self.app_uri) 2016-01-18T22:13:20.516518+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/workers/base.py", line 122, in init_process 2016-01-18T22:13:20.516524+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/util.py", line 368, in import_app 2016-01-18T22:13:20.516506+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/workers/base.py", line 122, in init_process 2016-01-18T22:13:20.516512+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/util.py", line 368, in import_app 2016-01-18T22:13:20.516518+00:00 app[web.1]: self.load_wsgi() 2016-01-18T22:13:20.516524+00:00 app[web.1]: app = eval(obj, mod.__dict__) 2016-01-18T22:13:20.516507+00:00 app[web.1]: self.load_wsgi() 2016-01-18T22:13:20.516513+00:00 app[web.1]: app = eval(obj, mod.__dict__) 2016-01-18T22:13:20.516519+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/workers/base.py", line 130, in load_wsgi 2016-01-18T22:13:20.516525+00:00 app[web.1]: File "<string>", line 1 2016-01-18T22:13:20.516507+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/workers/base.py", line 130, in load_wsgi 2016-01-18T22:13:20.516513+00:00 app[web.1]: File "<string>", line 1 2016-01-18T22:13:20.516519+00:00 app[web.1]: self.wsgi = self.app.wsgi() 2016-01-18T22:13:20.516525+00:00 app[web.1]: application} 2016-01-18T22:13:20.516510+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 65, in load 2016-01-18T22:13:20.516516+00:00 app[web.1]: Traceback (most recent call last): 2016-01-18T22:13:20.516522+00:00 app[web.1]: return self.load_wsgiapp() 2016-01-18T22:13:20.541380+00:00 app[web.1]: [2016-01-18 22:13:20 +0000] [3] [INFO] Shutting down: Master 2016-01-18T22:13:20.516526+00:00 app[web.1]: ^ 2016-01-18T22:13:20.516527+00:00 app[web.1]: SyntaxError: unexpected EOF while parsing 2016-01-18T22:13:20.516705+00:00 app[web.1]: [2016-01-18 22:13:20 +0000] [9] [INFO] Worker exiting (pid: 9) 2016-01-18T22:13:20.541629+00:00 app[web.1]: [2016-01-18 22:13:20 +0000] [3] [INFO] Reason: Worker failed to boot. 2016-01-18T22:13:20.516523+00:00 app[web.1]: return util.import_app(self.app_uri) 2016-01-18T22:13:21.529524+00:00 heroku[web.1]: State changed from starting to crashed 2016-01-18T22:13:21.514637+00:00 heroku[web.1]: Process exited with status 3 2016-01-18T22:51:41.068215+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=POST path="/" host=kodicommander.herokuapp.com request_id=2082e2ab-feda-4f5f-9c09-63b254d62c03 fwd="72.21.217.180" dyno= connect= service= status=503 bytes= 2016-01-18T22:57:43.932952+00:00 heroku[api]: Deploy 4f51d44 by [email protected] 2016-01-18T22:57:43.932952+00:00 heroku[api]: Release v5 created by [email protected] 2016-01-18T22:57:44.045152+00:00 heroku[slug-compiler]: Slug compilation started 2016-01-18T22:57:44.045161+00:00 heroku[slug-compiler]: Slug compilation finished 2016-01-18T22:57:44.818829+00:00 heroku[web.1]: State changed from crashed to starting 2016-01-18T22:57:47.039059+00:00 heroku[web.1]: Starting process with command `gunicorn wsgi:application\` 2016-01-18T22:59:47.471768+00:00 heroku[web.1]: State changed from starting to down 2016-01-18T23:08:56.927229+00:00 heroku[api]: Scale to web=1, worker=1 by [email protected] 2016-01-18T23:08:59.626024+00:00 heroku[worker.1]: Starting process with command `python worker.py}` 2016-01-18T23:09:00.353824+00:00 heroku[worker.1]: State changed from starting to up 2016-01-18T23:09:01.713706+00:00 app[worker.1]: python: can't open file 'worker.py}': [Errno 2] No such file or directory 2016-01-18T23:09:02.414223+00:00 heroku[worker.1]: State changed from up to crashed 2016-01-18T23:09:02.415490+00:00 heroku[worker.1]: State changed from crashed to starting 2016-01-18T23:09:02.415877+00:00 heroku[worker.1]: Process exited with status 2 2016-01-18T23:09:04.152583+00:00 heroku[worker.1]: Starting process with command `python worker.py}` 2016-01-18T23:09:04.836246+00:00 heroku[worker.1]: State changed from starting to up 2016-01-18T23:09:05.330375+00:00 app[worker.1]: python: can't open file 'worker.py}': [Errno 2] No such file or directory 2016-01-18T23:09:05.956213+00:00 heroku[worker.1]: State changed from up to crashed 2016-01-18T23:09:05.889941+00:00 heroku[worker.1]: Process exited with status 2 2016-01-18T23:11:40.275415+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=kodicommander.herokuapp.com request_id=2f260db3-1abf-4ca5-9096-8da2f115f04d fwd="96.253.113.115" dyno= connect= service= status=503 bytes= 2016-01-18T23:19:16.244361+00:00 heroku[api]: Set maintenance mode on by [email protected] 2016-01-18T23:19:25.042870+00:00 heroku[router]: at=info code=H80 desc="Maintenance mode" method=GET path="/" host=kodicommander.herokuapp.com request_id=e070554a-fee4-4271-9667-2ae565835b98 fwd="96.253.113.115" dyno= connect= service= status=503 bytes= 2016-01-18T23:20:09.078020+00:00 heroku[router]: at=info code=H80 desc="Maintenance mode" method=POST path="/" host=kodicommander.herokuapp.com request_id=3bcffa91-b70e-413c-b3de-b6ff0bdded33 fwd="72.21.217.83" dyno= connect= service= status=503 bytes= 2016-01-18T23:20:14.371511+00:00 heroku[router]: at=info code=H80 desc="Maintenance mode" method=POST path="/" host=kodicommander.herokuapp.com request_id=6d2b7a5c-8660-4057-a48c-ea16b9dac2e8 fwd="72.21.217.79" dyno= connect= service= status=503 bytes= 2016-01-18T23:22:40.424921+00:00 heroku[worker.1]: State changed from crashed to starting 2016-01-18T23:22:42.852132+00:00 heroku[worker.1]: Starting process with command `python worker.py}` 2016-01-18T23:22:43.398201+00:00 heroku[worker.1]: State changed from starting to up 2016-01-18T23:22:44.642421+00:00 app[worker.1]: python: can't open file 'worker.py}': [Errno 2] No such file or directory 2016-01-18T23:22:45.232585+00:00 heroku[worker.1]: Process exited with status 2 2016-01-18T23:22:45.255101+00:00 heroku[worker.1]: State changed from up to crashed 2016-01-18T23:35:49.525122+00:00 heroku[worker.1]: State changed from crashed to starting 2016-01-18T23:35:51.378762+00:00 heroku[worker.1]: Starting process with command `python worker.py}` 2016-01-18T23:35:51.913544+00:00 heroku[worker.1]: State changed from starting to up 2016-01-18T23:35:53.270098+00:00 app[worker.1]: python: can't open file 'worker.py}': [Errno 2] No such file or directory 2016-01-18T23:35:53.874345+00:00 heroku[worker.1]: State changed from up to crashed 2016-01-18T23:35:53.874897+00:00 heroku[worker.1]: Process exited with status 2 2016-01-18T23:37:37.752768+00:00 heroku[router]: at=info code=H80 desc="Maintenance mode" method=GET path="/" host=kodicommander.herokuapp.com request_id=382c37e3-5459-4ac7-bbe6-d3996b63c358 fwd="96.253.113.115" dyno= connect= service= status=503 bytes= 2016-01-18T23:45:51.248130+00:00 heroku[web.1]: State changed from down to starting 2016-01-18T23:45:51.280736+00:00 heroku[worker.1]: State changed from crashed to starting 2016-01-18T23:45:53.187852+00:00 heroku[worker.1]: Starting process with command `python worker.py}` 2016-01-18T23:45:53.855208+00:00 heroku[worker.1]: State changed from starting to up 2016-01-18T23:45:53.904399+00:00 heroku[web.1]: Starting process with command `gunicorn wsgi:application\` 2016-01-18T23:45:54.798985+00:00 app[worker.1]: python: can't open file 'worker.py}': [Errno 2] No such file or directory 2016-01-18T23:45:55.355757+00:00 heroku[worker.1]: State changed from up to crashed 2016-01-18T23:45:55.345924+00:00 heroku[worker.1]: Process exited with status 2 2016-01-18T23:46:36.743756+00:00 heroku[router]: at=info code=H80 desc="Maintenance mode" method=GET path="/" host=kodicommander.herokuapp.com request_id=f589b80d-0914-40d3-a8a3-71f874f3cfcb fwd="96.253.113.115" dyno= connect= service= status=503 bytes= 2016-01-18T23:47:43.602698+00:00 heroku[router]: at=info code=H80 desc="Maintenance mode" method=POST path="/" host=kodicommander.herokuapp.com request_id=de6fa747-e771-4ccd-bf49-de189bcbcaf3 fwd="72.21.217.175" dyno= connect= service= status=503 bytes= 2016-01-18T23:48:00.085208+00:00 heroku[web.1]: State changed from starting to down 2016-01-18T23:48:11.541303+00:00 heroku[router]: at=info code=H80 desc="Maintenance mode" method=GET path="/" host=kodicommander.herokuapp.com request_id=d7c734b7-a2b2-4a4a-ba70-9ce815a82b14 fwd="96.253.113.115" dyno= connect= service= status=503 bytes= 2016-01-18T23:48:43.853239+00:00 heroku[worker.1]: State changed from crashed to starting 2016-01-18T23:48:46.130176+00:00 heroku[worker.1]: Starting process with command `python worker.py}` 2016-01-18T23:48:46.776237+00:00 heroku[worker.1]: State changed from starting to up 2016-01-18T23:48:48.116608+00:00 app[worker.1]: python: can't open file 'worker.py}': [Errno 2] No such file or directory 2016-01-18T23:48:48.904906+00:00 heroku[worker.1]: State changed from up to crashed 2016-01-18T23:48:48.888956+00:00 heroku[worker.1]: Process exited with status 2 RE: Amazon Echo skill for Kodi - m0ngr31 - 2016-01-19 It's looking like it's looking for a worker instance. Go to the app settings in heroku and make sure that the worker dynos are set to 0 RE: Amazon Echo skill for Kodi - edwsn2005 - 2016-01-20 I set it to 0 and still no luck. I'm new to all of this. The setup for Heroku seems a little more complicated than OpenShift. |