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 - MattDale - 2016-10-25 (2016-10-25, 12:36)jonjon Wrote:(2016-10-25, 12:20)MattDale Wrote: I'm also able to log into Kodi via my dynamic DNS URL, so *that* seems to be OK too. (2016-10-25, 14:21)jingai Wrote:(2016-10-25, 12:41)MattDale Wrote: Thanks for the reply... Whilst I don't understand JSONRPC, I've entered my DDNS followed by /jsonrpc into a browser and it's come up with a lot of code, so I'd say yes to that one! Yep - and I used the same username/pass as I have for Kodi to get in. RE: Amazon Echo skill for Kodi - jingai - 2016-10-25 @MattDale, try using curl to manually send a request; e.g., list of movies: Code: curl --data-binary '{"jsonrpc":"2.0", "method":"VideoLibrary.GetMovies", "params":{"filter":{"field":"playcount", "operator":"lessthan", "value":"1"}}, "id":1}' -H 'content-type: application/json;' -u username:password http://ip:port/jsonrpc The beginning of the response should look something like this: Code: {"id":1,"jsonrpc":"2.0","result":{"limits":{"end":210,"start":0,"total":210},"movies": RE: Amazon Echo skill for Kodi - MattDale - 2016-10-25 Hm. Not sure if this helps or hinders, but I've got a new error when I try that: http://pastebin.com/SXQXZ0Sy Are we onto something? RE: Amazon Echo skill for Kodi - jingai - 2016-10-25 Eh, did you copy and paste it, with the exception of the -u switch onward? Seems like your command line input is munged. RE: Amazon Echo skill for Kodi - MattDale - 2016-10-25 I did. I've also tried removing the password and awaiting the prompt for it (which I got, as you'd expect) - same result. Hm! Sorry, I'm new to a lot of this so working somewhat blind. RE: Amazon Echo skill for Kodi - jingai - 2016-10-25 I'm fairly positive you're missing the single quotes around the --data-binary argument ('{"jsonrpc":2.0"...."id":1}'), and possibly the -H argument. I just tried it here without the quotes and get the same output you got. RE: Amazon Echo skill for Kodi - MattDale - 2016-10-25 (2016-10-25, 15:11)jingai Wrote: @MattDale, try using curl to manually send a request; e.g., list of movies: (2016-10-25, 17:30)jingai Wrote: I'm fairly positive you're missing the single quotes around the --data-binary argument ('{"jsonrpc":2.0"...."id":1}'), and possibly the -H argument. Definitely copy-pasting, I promise! I am using a new install of curl (never used it before) but that seemed pretty foolproof, so not sure if I could have done anything wrong there... RE: Amazon Echo skill for Kodi - Jagsta - 2016-10-25 (2016-10-25, 17:47)MattDale Wrote: Definitely copy-pasting, I promise! I am using a new install of curl (never used it before) but that seemed pretty foolproof, so not sure if I could have done anything wrong there... Are you doing this from your local windows machine? That explains why it's not taking that set of arguments I guess! I think the idea was to try that from Heroku, to verify you are getting expected responses from your Kodi server from the place the script is running. RE: Amazon Echo skill for Kodi - MattDale - 2016-10-25 Thanks. I am indeed trying to run this from my local machine. New to Heroku too, and can't see how I can run curl from there - all instructions for running commands seem to be pointing me back to my local CLI. RE: Amazon Echo skill for Kodi - MattDale - 2016-10-25 Woah, hold your horses everyone, I seem to be working now! I just reset the username and password in Heroku (I SWEAR it was right in the first place, just trying anything at this stage) and it's working now! Thanks so much for your help everyone. RE: Amazon Echo skill for Kodi - jingai - 2016-10-25 Now you know why devs never trust what the user says Glad you got it working! RE: Amazon Echo skill for Kodi - Jagsta - 2016-10-25 Actually, I know nothing about Heroku either, I have no idea if they provide a shell or if this is possible using an API, it might not be. RE: Amazon Echo skill for Kodi - digiltd - 2016-10-25 (2016-10-25, 14:45)elikiasdad Wrote: Quick question. When creating a role in AWS it wants me to select a role type. Which one do I select? https://github.com/m0ngr31/kodi-alexa#aws-variables Though that suggests you create the role with AWSLambdaFullAccess. I used to use this but just changed it to a AWSLambdaBasicExecutionRole and it still works ok so far. RE: Amazon Echo skill for Kodi - MattDale - 2016-10-25 (2016-10-25, 18:25)jingai Wrote: Now you know why devs never trust what the user saysDamn right! Quote:Glad you got it working! Now having fun with the parsing. Mostly seems sensible, although some commands are a bit screwy: "Play next episode of [x]" plays the last episode I watched, and "play latest episode of" selects a previously played episode - not figured out the logic, but it's a different one for each series. The random play, movie play, and pause/volume/skip all working great though - so much fun! RE: Amazon Echo skill for Kodi - jingai - 2016-10-25 (2016-10-25, 19:12)MattDale Wrote: "Play next episode of [x]" plays the last episode I watched It should play the next unwatched episode for that series. And it does for me -- I use this one all the time. Are your shows getting marked as watched? (2016-10-25, 19:12)MattDale Wrote: "play latest episode of" selects a previously played episode - not figured out the logic, but it's a different one for each series. This should play the latest (as in, most recently added to library) episode of a series. |