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 - area2051 - 2018-05-04 Hello, first things first - I really appreciate your work in this project! Great work so far! May I ask for your help: I don’t want to use the aws lamda service so I googled and found an Docker Image for self hosting on my media station (libreelec): https://hub.docker.com/r/mboeru/kodi-alexa/ • On my raspPi I installed lexigram-cli • configured kodi.config to use local IP Address of Libreelec • pi: lexigram init-skill kanzi (without any error) • pi: lexigram deploy kanzi
Error: Code: ::: 2018-05-04 08:25:14 ::: Q: I don’t want to use Lamda but it seems that the scripts wants to publish something with lamda function, is my configuration wrong? Second and most important:: How can I solve this issue? A view posts ago, I read about substitution URI with sourceDir in kanzi/skill.json but when I restart deploy process I guess the skill.json will be generated again and my changes will be overwritten, right? Thanks in advanced! RE: Amazon Echo skill for Kodi - m0ngr31 - 2018-05-04 Quote:Q: I don’t want to use Lamda but it seems that the scripts wants to publish something with lamda function, is my configuration wrong? Amazon's error messages for this are pretty lame. They don't always seem to point to the correct thing. My best guess is that it doesn't like adding a port to the URL. Try dropping the `:8000` and deploying again. I know it won't make the skill work, but it'll be interesting to see if that resolves the error. If that doesn't work, we can try some other things. RE: Amazon Echo skill for Kodi - Paranoid247 - 2018-05-04 I'm attempting to self-host in a container on opensuse Leap 42.3. I've deployed the Kanzi skill, changed the endpoint to use a self-signed certificate and uploaded the certificate but Alexa responds: "There was a problem with the requested skill response" (it was a 500 server error). The relevant logs are: [client 54.240.197.98:9476] [2018-05-04 18:16:37,796] ERROR in app: Exception on / [POST] [client 54.240.197.98:9476] Traceback (most recent call last): [client 54.240.197.98:9476] File "/usr/lib/python2.7/site-packages/flask/app.py", line 1982, in wsgi_app [client 54.240.197.98:9476] response = self.full_dispatch_request() [client 54.240.197.98:9476] File "/usr/lib/python2.7/site-packages/flask/app.py", line 1614, in full_dispatch_request [client 54.240.197.98:9476] rv = self.handle_user_exception(e) [client 54.240.197.98:9476] File "/usr/lib/python2.7/site-packages/flask/app.py", line 1517, in handle_user_exception [client 54.240.197.98:9476] reraise(exc_type, exc_value, tb) [client 54.240.197.98:9476] File "/usr/lib/python2.7/site-packages/flask/app.py", line 1612, in full_dispatch_request [client 54.240.197.98:9476] rv = self.dispatch_request() [client 54.240.197.98:9476] File "/usr/lib/python2.7/site-packages/flask/app.py", line 1598, in dispatch_request [client 54.240.197.98:9476] return self.view_functions[rule.endpoint](**req.view_args) [client 54.240.197.98:9476] File "/usr/lib/python2.7/site-packages/flask_ask/core.py", line 728, in _flask_view_func [client 54.240.197.98:9476] ask_payload = self._alexa_request(verify=self.ask_verify_requests) [client 54.240.197.98:9476] File "/usr/lib/python2.7/site-packages/flask_ask/core.py", line 662, in _alexa_request [client 54.240.197.98:9476] cert = verifier.load_certificate(cert_url) [client 54.240.197.98:9476] File "/usr/lib/python2.7/site-packages/flask_ask/verifier.py", line 21, in load_certificate [client 54.240.197.98:9476] if not _valid_certificate(cert): [client 54.240.197.98:9476] File "/usr/lib/python2.7/site-packages/flask_ask/verifier.py", line 63, in _valid_certificate [client 54.240.197.98:9476] value = str(extension) [client 54.240.197.98:9476] File "/usr/lib/python2.7/site-packages/OpenSSL/crypto.py", line 779, in __str__ [client 54.240.197.98:9476] return self._subjectAltNameString() [client 54.240.197.98:9476] File "/usr/lib/python2.7/site-packages/OpenSSL/crypto.py", line 740, in _subjectAltNameString [client 54.240.197.98:9476] method = _lib.X509V3_EXT_get(self._extension) [client 54.240.197.98:9476] AttributeError: 'module' object has no attribute 'X509V3_EXT_get' I've also done an strace on the apache processes and that reveals that it fails when it can not find /var/lib/ca-certificates/openssl/8ad296c9.0 which should be a Certificate Authority file but doesn't exist. This isn't associated with my self generated cert or the one deployed at certifi/cacert.pem since they have different issuer/subject hashes. Any ideas? NOTE for area2051 you can not specify a custom port for the endpoint, it has to use the default https port (443) pip list aniso8601 (1.2.0) asn1crypto (0.24.0) boto3 (1.7.12) botocore (1.10.12) bottle (0.12.8) click (6.7) configparser (3.5.0) cryptography (2.2.2) cupshelpers (1.0) docutils (0.14) Flask (0.12.1) Flask-Ask (0.9.8) fuzzywuzzy (0.16.0) gunicorn (19.8.1) idna (2.6) itsdangerous (0.24) Jinja2 (2.10) jmespath (0.9.3) Kodi-Voice (1.1.2) MarkupSafe (1.0) num2words (0.5.6) pip (7.1.2) py (1.4.31) pyasn1 (0.1.9) pycups (1.9.72) pycurl (7.19.5.1) pygobject (3.20.1) pyocclient (0.4) pyOpenSSL (17.0.0) pysmbc (1.0.15.4) python-dateutil (2.7.2) pytz (2018.4) PyYAML (3.12) requests (2.7.0) roman (2.0.0) s3transfer (0.1.13) setuptools (39.1.0) simplejson (3.8.2) six (1.11.0) Werkzeug (0.14.1) RE: Amazon Echo skill for Kodi - m0ngr31 - 2018-05-04 I've seen that error before from cryptography being at a incompatible version. Should be: cryptography==2.1.4 if you are on the latest master branch. Amazon Echo skill for Kodi - tkislan - 2018-05-04 I’m just gonna drop this here for anyone that wants a solution that just works. Amazon Echo Alexa Video Skill for Kodi https://github.com/kodi-connect/kodi-alexa-video/blob/master/readme.md RE: Amazon Echo skill for Kodi - Paranoid247 - 2018-05-05 Cheers that sorted it. When I installed kodi-voice that automatically installed the latest version of cryptography and I didn't spot that the requirement was for a specific version. Next problem. I'm talking to kodi and requests such as "Ask Kanzi to open music" or "Play all Music" work, but when I ask it to play something specific I get the "there was a problem with the requested skill response" (500 server error). Here are the relevant logs: [2018-05-04 23:22:30,891] ERROR in app: Exception on / [POST] Traceback (most recent call last): File "/srv/www/htdocs/Kanzi/flask/app.py", line 1982, in wsgi_app response = self.full_dispatch_request() File "/srv/www/htdocs/Kanzi/flask/app.py", line 1614, in full_dispatch_request rv = self.handle_user_exception(e) File "/srv/www/htdocs/Kanzi/flask/app.py", line 1517, in handle_user_exception reraise(exc_type, exc_value, tb) File "/srv/www/htdocs/Kanzi/flask/app.py", line 1612, in full_dispatch_request rv = self.dispatch_request() File "/srv/www/htdocs/Kanzi/flask/app.py", line 1598, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/srv/www/htdocs/Kanzi/flask_ask/core.py", line 767, in _flask_view_func result = self._map_intent_to_view_func(self.request.intent)() File "/srv/www/htdocs/Kanzi/alexa.py", line 74, in decorated_function kodi = Kodi(config, context) File "/srv/www/htdocs/Kanzi/kodi_voice/kodi.py", line 387, in __init__ if not self.scheme or not self.address or not self.port or not self.username or not self.password: AttributeError: Kodi instance has no attribute 'password' Any ideas? RE: Amazon Echo skill for Kodi - m0ngr31 - 2018-05-05 (2018-05-04, 23:39)tkislan Wrote: I’m just gonna drop this here for anyone that wants a solution that just works.Just an FYI on your solution: Amazon will never let you publish the skill. Having a perpetual beta is pretty awful since you can only do it for 90 days at a time and only have 500 users per beta. Have fun keeping the beta going constantly. I wish you the best of luck. RE: Amazon Echo skill for Kodi - m0ngr31 - 2018-05-05 (2018-05-05, 00:41)Paranoid247 Wrote: Cheers that sorted it.Yeah, there isn't a great solution on the crypto package. Versions are all over the place. I included the correct version in the requirements.txt file, but if you install kodi-voice after that (shouldn't need to though), it could mess it up. Can you tell me what specific intent it failed on? I'll look into why that was breaking. RE: Amazon Echo skill for Kodi - Paranoid247 - 2018-05-05 Here's some logs from Alexa. Alexa heard: "ask kodi to play all music" - Party Mode - Starting party play Alexa heard: "ask kodi to skip" - Playing next item Alexa heard: "ask kodi to start over" - Starting current item over Alexa heard: "ask kodi to pause" - Play/Pause Alexa heard: "ask kodi to go back" - Skill response was marked as failure - The skill responded with 500 HTTP status code Alexa heard: "ask kodi to stop" - Stopping playback - Playback stopped Alexa heard: "ask kodi to" - Skill response was marked as failure - The skill responded with 500 HTTP status code Alexa heard: "ask kodi what's playing" - Skill response was marked as failure - The skill responded with 500 HTTP status code The "go back" command caused kodi to go back in the menu's rather than the playlist. Is it configured for a specific skin? Tomorrow I'll snoop the communications between kodi and the host and see if can spot anything obvious. (Kodi version 17.6., OSMC 2018-04-1, Skin Confluence 3.1.43) RE: Amazon Echo skill for Kodi - drizzt09 - 2018-05-05 where does init-config get downloaded when running: C:\WINDOWS\system32>lexigram init-config RE: Amazon Echo skill for Kodi - m0ngr31 - 2018-05-05 (2018-05-05, 02:24)drizzt09 Wrote: where does init-config get downloaded when running:The current directory. It looks like you're running as an administrator which you don't need to do. I'd change directories to something more local to your user. (2018-05-05, 01:38)Paranoid247 Wrote: Here's some logs from Alexa.I'll take a look at this over the weekend and see if I can replicate it. RE: Amazon Echo skill for Kodi - drizzt09 - 2018-05-05 Should I start over and change directory and run non-admin. Or just do it for the config? And continue. RE: Amazon Echo skill for Kodi - m0ngr31 - 2018-05-05 I'd just change your directory since you already did admin. It might mess up permissions if you don't. RE: Amazon Echo skill for Kodi - area2051 - 2018-05-05 (2018-05-04, 18:32)m0ngr31 Wrote:Thanks for your feedback!Quote:Q: I don’t want to use Lamda but it seems that the scripts wants to publish something with lamda function, is my configuration wrong? dropping :8000 was not the answer - still the same issue. maybe it's something with my raspPi? Anyhow I tried with Ubuntu and this works! Anyhow - we should document that amazon only supports 443 ports! I guess this will remove some pain for user users Thanks!! RE: Amazon Echo skill for Kodi - Paranoid247 - 2018-05-05 (2018-05-05, 07:43)area2051 Wrote: Thanks for your feedback!Amazon have a guide for setting up your endpoint. It includes the fact that you can not use any port other than 443. I wasted a couple of hours on this myself. The guide is here and it is essential reading if you are self hosting. |