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 - newoski - 2016-11-01 (2016-11-01, 17:41)jingai Wrote: The JSON call, VideoLibrary.GetMovies, is taking somewhere between 10 and 11 *seconds*. I couldn't tell you why, but that is how long it took Kodi to process and return the data. Comcast. 10MB uplink. Working on a log file RE: Amazon Echo skill for Kodi - newoski - 2016-11-01 (2016-11-01, 17:41)jingai Wrote: The JSON call, VideoLibrary.GetMovies, is taking somewhere between 10 and 11 *seconds*. I couldn't tell you why, but that is how long it took Kodi to process and return the data. Here's my log, from GetMovies through Alexa launching playback http://pastebin.com/xuq2Lxyx From the line below, it looks like the query is only taking 24 ms? 11:45:09 T:140153851582208 DEBUG: RunQuery took 24 ms for 1836 items query: select * from movie_view Any insights would be greatly appreciated! RE: Amazon Echo skill for Kodi - jingai - 2016-11-01 @newoski, I'm not totally sure, honestly. There's a ton of other requests to Kodi's webserver there.. I don't know if that's normal or not with Emby. I'm thinking the origin of the request (HTTP vs your remote/keyboard) might be triggering a different path. I really don't think this has anything to do with the skill per se, since it seems the skill is otherwise executing within 1 second, disregarding the time it takes to get the movie list from Kodi. If you have access to curl somewhere on one of your local machines, try this: Code: curl --data-binary '{"jsonrpc":"2.0", "method":"Player.Open", "params":{"item":{"movieid":391}}, "id":1}' -H 'content-type: application/json;' -u username:password http://host:port/jsonrpc Leave debugging enabled in Kodi so you can see what's going on there too. Tell me how long that takes. RE: Amazon Echo skill for Kodi - newoski - 2016-11-01 (2016-11-01, 18:52)jingai Wrote: @newoski, I'm not totally sure, honestly. There's a ton of other requests to Kodi's webserver there.. I don't know if that's normal or not with Emby. Sadly, I can't do this. Comcast doesn't allow you to access DDNS from within your own network. I could testit from outside my network, but not from within... RE: Amazon Echo skill for Kodi - jingai - 2016-11-01 Huh? Just use the local IP address of the machine on which Kodi is running. RE: Amazon Echo skill for Kodi - newoski - 2016-11-01 (2016-11-01, 19:16)jingai Wrote: Huh? Just use the local IP address of the machine on which Kodi is running.Figured that out. Standby.... Sent from my HTC6535LVW RE: Amazon Echo skill for Kodi - newoski - 2016-11-01 If I try that immediately after my Chromebox running LibreELEC boots, that command doesn't seem to do anything. If I give it a few minutes and then run it... it launches the movie nearly instantly. RE: Amazon Echo skill for Kodi - jingai - 2016-11-01 Ok, now do: Code: time curl --data-binary '{"jsonrpc":"2.0", "method":"VideoLibrary.GetMovies", "id":1}' -H 'content-type: application/json;' -u username:password http://host:port/jsonrpc See how long that takes. If it doesn't work with the time command in front, just remove that and roughly gauge the time it takes to finish returning the response. RE: Amazon Echo skill for Kodi - newoski - 2016-11-01 (2016-11-01, 19:37)jingai Wrote: Ok, now do: This one seems to just hang/time out RE: Amazon Echo skill for Kodi - newoski - 2016-11-01 (2016-11-01, 19:37)jingai Wrote: Ok, now do: Sorry, didn't catch the second part. Without the time parameter, it's nearly instant. RE: Amazon Echo skill for Kodi - jingai - 2016-11-01 Well, I'm thoroughly confused then.. the only thing left it can be is that it's just, for whatever reason, taking 10 seconds to return the list of movies to the skill. Are you perhaps currently saturating your uplink? RE: Amazon Echo skill for Kodi - newoski - 2016-11-01 (2016-11-01, 19:43)jingai Wrote: Well, I'm thoroughly confused then.. the only thing left it can be is that it's just, for whatever reason, taking 10 seconds to return the list of movies to the skill.Not at all Sent from my HTC6535LVW RE: Amazon Echo skill for Kodi - jingai - 2016-11-01 Is it at all possible for you to repeat the last command remotely? Code: curl --data-binary '{"jsonrpc":"2.0", "method":"VideoLibrary.GetMovies", "id":1}' -H 'content-type: application/json;' -u username:password http://host:port/jsonrpc RE: Amazon Echo skill for Kodi - newoski - 2016-11-01 (2016-11-01, 19:47)jingai Wrote: Is it at all possible for you to repeat the last command remotely? Currently, I'm on all Windows 7 PCs. I've been using Putty to log into my local Unraid server and then send the curls via Putty/Unraid. I could put the Windows 7 machine behind a VPN, and then repeat the process, which would emulate remote access. Would that be helpful? Otherwise, I'm unclear how to go about sending the commands remotely... RE: Amazon Echo skill for Kodi - jingai - 2016-11-01 Well, I think if you really want to diagnose the problem, executing the command remotely is the next step. The two commands I gave you to try via curl are the exact commands the PlayMovie Intent sends in this case. The only other thing I can think is even a little feasible is that maybe Comcast is throttling bandwidth on certain ports. If you're using port 80 or 8080, they may be throttling it to prevent you from running a web server at home. It's a long shot, but maybe try changing the port to something else. If you're not afraid of going into the code a little, in alexa_play_movie() in wsgi.ini (around line 973 if your copy is current) you can add some additional print statements around things to see how long they're taking to execute. Particularly, I'd check around kodi.GetMovies(), kodi.matchHeard(), and kodi.PlayMovie(). I think kodi.matchHeard() is the only thing left here that could be the problem, but it'd be odd for this to take 10 seconds. |