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 - geman220 - 2016-02-10 (2016-02-10, 20:28)m0ngr31 Wrote: No, they should work still. I haven't removed any of the code. I'll play around with it a little and see what happens. Yea from looking around in the code I didn't see any reason the old utterances wouldn't work. I'm not nearly as competent as you are with the programming, but everything appears to be correct. I compared your kodi.py and wsgi.py with the original files and I could only find a few differences, that to me don't appear to be the problem. I appreciate any help you can give, my gf being able to ask "Alexa ask kodi if there are any new shows" or something similar will help me out a lot =) RE: Amazon Echo skill for Kodi - geman220 - 2016-02-12 I've tried solving this but I have a very limited skill base on this. I am fairly certain the code causing issues is here: Code: def GetUnwatchedEpisodes(max=90): I noticed the following error: TypeError: Not enough arguments for format string . But I don't see a TypeError here, I'm assuming it's referencing banner = "http://%s:%s/image/%s" % (urllib.quote(showinfo['art']['banner'])) but that seems like the correct syntax. I'm probably way off base here though. Whenever you get time and figure it out if you wouldn't mind explaining how you solved it I would appreciate it a lot. I'm trying to get better at python and this seems like a good learning opportunity. RE: Amazon Echo skill for Kodi - geman220 - 2016-02-12 Well progress? Changing if 'banner' in showinfo['art']: banner = "http://%s:%s/image/%s" % (urllib.quote(showinfo['art']['banner'])) to if 'banner' in showinfo['art']: banner = "http://%s:%s/image/%s", (urllib.quote(showinfo['art']['banner'])) No longer reports errors. I still get "The remote endpoint could not be called, or the response it returned was invalid." but I don't see python errors in the log. RE: Amazon Echo skill for Kodi - m0ngr31 - 2016-02-12 I'll take a look at it this weekend. I have another update to push out as well. RE: Amazon Echo skill for Kodi - geman220 - 2016-02-12 Sounds good, just trying to learn a bit for the future. RE: Amazon Echo skill for Kodi - geman220 - 2016-02-12 Well I can at least get something working. Code: def GetUnwatchedEpisodes(max=90): The code breaks when I add Code: "filter":{"field":"playcount", "operator":"lessthan", "value":"1"}, Code: VideoLibrary.GetEpisodes Code: VideoLibrary.GetRecentlyAddedEpisodes I think I'm going to give up and just wait until you have time to resolve it. RE: Amazon Echo skill for Kodi - m0ngr31 - 2016-02-16 I updated the repo. I just ended up pulling out the banner stuff since art doesn't really do anything when it's all voice driven. RE: Amazon Echo skill for Kodi - geman220 - 2016-02-16 (2016-02-16, 01:00)m0ngr31 Wrote: I updated the repo. I just ended up pulling out the banner stuff since art doesn't really do anything when it's all voice driven. Unfortunately it's not working for me with the modified code. If I ask Alexa if there are any new shows I get Code: The remote endpoint could not be called, or the response it returned was invalid. Code: 2016-02-15T23:14:10.670727+00:00 heroku[router]: at=info method=POST path="/" host=kodihatt.herokuapp.com request_id=5810fcfb-6af2-445e-a8e7-06fe0d4073ea fwd="72.21.217.175" dyno=web.1 connect=1ms service=18293ms status=200 bytes=333 I was getting this before, the code is passing through the script fine but it's not getting a response from Kodi. This JSON works if I just put it in a browser: { "jsonrpc": "2.0", "method": "VideoLibrary.GetEpisodes", "filter":{"field":"playcount", "operator":"lessthan", "value":"1"}, "sort":{"method":"dateadded", "order":"descending"}, "params":{"properties": ["title", "playcount", "showtitle", "tvshowid", "dateadded"] }, "id": 1 } http://KODIPUBLICADDRESS/jsonrpc?request={%20%22jsonrpc%22:%20%222.0%22,%20%22method%22:%20%22VideoLibrary.GetEpisodes%22,%20%22filter%22:{%22field%22:%22playcount%22,%20%22operator%22:%22lessthan%22,%20%22value%22:%221%22},%20%22sort%22:{%22method%22:%22dateadded%22,%20%22order%22:%22descending%22},%20%22params%22:{%22properties%22:%20[%22title%22,%20%22playcount%22,%20%22showtitle%22,%20%22tvshowid%22,%20%22dateadded%22]%20},%20%22id%22:%201%20} It just doesn't seem to work when the python script runs. RE: Amazon Echo skill for Kodi - Timmons - 2016-02-18 This setup is a no go for me too. I've tried two different platforms in windows with git/ruby and synology ds using openshift. Both of them returned a http instead of https that dev kit in amazon is asking for. Getting the same error "The remote endpoint could not be called, or the response it returned was invalid." Is there a step by step to try the other Heroku site.. or a step by step using an internal server? I have python installed on both my windows pc and synology. It's a shame because this looks really neat. RE: Amazon Echo skill for Kodi - geman220 - 2016-02-18 Well I have an update. Originally I couldn't get this working at all on OpenShift so I used Heroku and everything worked (except the new shows). I decided to give OpenShift another shot and now it works on OpenShift. Also new shows works. I have the exact same code on Heroku and OpenShift but on Heroku I get "The remote endpoint could not be called, or the response it returned was invalid.", while on OpenShift I get the correct response. My only thought is Heroku seems to have quite a bit of latency compared to OpenShift. I think Heroku is timing out with more complex commands where it needs to query the Kodi database and get a response. RE: Amazon Echo skill for Kodi - Timmons - 2016-02-18 (2016-02-18, 18:22)geman220 Wrote: Well I have an update. Originally I couldn't get this working at all on OpenShift so I used Heroku and everything worked (except the new shows). I decided to give OpenShift another shot and now it works on OpenShift. Also new shows works. I have the exact same code on Heroku and OpenShift but on Heroku I get "The remote endpoint could not be called, or the response it returned was invalid.", while on OpenShift I get the correct response. My only thought is Heroku seems to have quite a bit of latency compared to OpenShift. I think Heroku is timing out with more complex commands where it needs to query the Kodi database and get a response. Nice. I'm still getting that message. After redoing everything again with openshift. The kodi directory.. when it says to move the files is that on the SSH on openshift or locally? Can't think of anything else. RE: Amazon Echo skill for Kodi - Timmons - 2016-02-19 So i'm using the rhc tail -o "-n 20" -a kodi command and have both prompts open to synology ds & windows pc. they are both responding to it with 172.21.217.99 - - [19/Feb/2016:08:31:35 -0500] "POST / HTTP/1.1" 200 39607 "-" "Apache-HttpClient/UNAVAILABLE (Java/1.8.0_66)" When i try to test a command via amazon dev kit. Complete posting below RSA 1024 bit CA certificates are loaded due to old openssl compatibility 172.16.10.92 - - [19/Feb/2016:02:10:23 -0500] "HEAD / HTTP/1.1" 200 - "-" "Ruby" 172.16.10.92 - - [19/Feb/2016:03:10:25 -0500] "HEAD / HTTP/1.1" 200 - "-" "Ruby" 172.16.10.92 - - [19/Feb/2016:03:10:26 -0500] "HEAD / HTTP/1.1" 200 - "-" "Ruby" 172.16.10.92 - - [19/Feb/2016:04:10:17 -0500] "HEAD / HTTP/1.1" 200 - "-" "Ruby" 172.16.10.92 - - [19/Feb/2016:04:10:17 -0500] "HEAD / HTTP/1.1" 200 - "-" "Ruby" 172.16.10.92 - - [19/Feb/2016:05:10:33 -0500] "HEAD / HTTP/1.1" 200 - "-" "Ruby" 172.16.10.92 - - [19/Feb/2016:05:10:33 -0500] "HEAD / HTTP/1.1" 200 - "-" "Ruby" 172.16.10.92 - - [19/Feb/2016:06:10:24 -0500] "HEAD / HTTP/1.1" 200 - "-" "Ruby" 172.16.10.92 - - [19/Feb/2016:06:10:24 -0500] "HEAD / HTTP/1.1" 200 - "-" "Ruby" 172.16.10.92 - - [19/Feb/2016:07:10:23 -0500] "HEAD / HTTP/1.1" 200 - "-" "Ruby" 172.16.10.92 - - [19/Feb/2016:07:10:23 -0500] "HEAD / HTTP/1.1" 200 - "-" "Ruby" 172.16.10.92 - - [19/Feb/2016:08:10:22 -0500] "HEAD / HTTP/1.1" 200 - "-" "Ruby" 172.16.10.92 - - [19/Feb/2016:08:10:22 -0500] "HEAD / HTTP/1.1" 200 - "-" "Ruby" 72.21.217.156 - - [19/Feb/2016:08:25:55 -0500] "POST / HTTP/1.1" 200 39607 "-" " Apache-HttpClient/UNAVAILABLE (Java/1.8.0_66)" 72.21.217.117 - - [19/Feb/2016:08:30:32 -0500] "POST / HTTP/1.1" 200 39607 "-" " Apache-HttpClient/UNAVAILABLE (Java/1.8.0_66)" 72.21.217.168 - - [19/Feb/2016:08:30:39 -0500] "POST / HTTP/1.1" 200 39607 "-" " Apache-HttpClient/UNAVAILABLE (Java/1.8.0_66)" 72.21.217.99 - - [19/Feb/2016:08:31:35 -0500] "POST / HTTP/1.1" 200 39607 "-" "A pache-HttpClient/UNAVAILABLE (Java/1.8.0_66)" 72.21.217.67 - - [19/Feb/2016:08:39:42 -0500] "POST / HTTP/1.1" 200 39607 "-" "A pache-HttpClient/UNAVAILABLE (Java/1.8.0_66)" 72.21.217.117 - - [19/Feb/2016:08:41:42 -0500] "POST / HTTP/1.1" 200 39607 "-" " Apache-HttpClient/UNAVAILABLE (Java/1.8.0_66)" 72.21.217.168 - - [19/Feb/2016:08:47:40 -0500] "POST / HTTP/1.1" 200 39607 "-" " Apache-HttpClient/UNAVAILABLE (Java/1.8.0_66)" RE: Amazon Echo skill for Kodi - m0ngr31 - 2016-03-05 Is it still having issues for you Timmons? RE: Amazon Echo skill for Kodi - Timmons - 2016-03-07 Hello, Yes I still am. Getting the following running rhc tail -o "-n 20" -a kodi 172.16.4.201 - - [05/Mar/2016:19:10:19 -0500] "HEAD / HTTP/1.1" 200 - "-" "Ruby" 172.16.4.201 - - [05/Mar/2016:20:10:44 -0500] "HEAD / HTTP/1.1" 200 - "-" "Ruby" 172.16.4.201 - - [05/Mar/2016:20:10:44 -0500] "HEAD / HTTP/1.1" 200 - "-" "Ruby" - - - [05/Mar/2016:20:50:41 -0500] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.15 (Red Hat) (internal dummy connection)" [Sat Mar 05 20:50:41 2016] [notice] caught SIGWINCH, shutting down gracefully [Mon Mar 07 08:06:29 2016] [notice] SELinux policy enabled; httpd running as context unconfined_uystem_r:openshift_t0:c3,c344 [Mon Mar 07 08:06:29 2016] [notice] Digest: generating secret for digest authentication ... [Mon Mar 07 08:06:29 2016] [notice] Digest: done [Mon Mar 07 08:06:29 2016] [notice] Apache/2.2.15 (Unix) mod_wsgi/3.4 Python/2.7.8 configured -- resuming normal operations 100.33.77.145 - - [07/Mar/2016:08:06:44 -0500] "GET / HTTP/1.1" 200 39607 "-" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36" 100.33.77.145 - - [07/Mar/2016:08:06:44 -0500] "GET /favicon.ico HTTP/1.1" 200 39607 "http://kodi-timmons.rhcloud.com/" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36" 72.21.217.155 - - [07/Mar/2016:08:08:20 -0500] "POST / HTTP/1.1" 200 39607 "-" "Apache-HttpClient/UNAVAILABLE (Java/1.8.0_72)" 172.16.4.201 - - [07/Mar/2016:08:10:23 -0500] "HEAD / HTTP/1.1" 200 - "-" "Ruby" 172.16.4.201 - - [07/Mar/2016:08:10:23 -0500] "HEAD / HTTP/1.1" 200 - "-" "Ruby" Doing rhc setup. You can add more servers later using 'rhc server'. Using an existing token for [email protected] to login to openshift.redhat.com RSA 1024 bit CA certificates are loaded due to old openssl compatibility Saving configuration to /root/.openshift/express.conf ... done Checking for git ... found git version 2.5.0 Checking common problems .. done Checking for a domain ... timmons Checking for applications ... found 1 kodi http://kodi-timmons.rhcloud.com/ <not https in the skill i changed this to https as it wouldn't accept this. You are using 1 of 3 total gears The following gear sizes are available to you: small Your client tools are now configured. RE: Amazon Echo skill for Kodi - m0ngr31 - 2016-03-08 Send me a PM and I'll see what I can do to help you out. |