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 - jacobh - 2016-11-10 (2016-11-10, 23:29)jingai Wrote: Two things then: 1) They're commented still. 2) I was trying to do some step-through debugging locally, but that's a good idea. I don't have time right now, but hopefully I'll have some time tonight. RE: Amazon Echo skill for Kodi - jacobh - 2016-11-11 After adding in the print statements, it prints out 'None' for both. If I uncomment those two variables in the .env file everything works: Code: KODI_SCHEME = I tried commenting back out the variables and changing the environment variable lookup to this: Code: SCHEME = os.getenv('KODI_SCHEME','http') For some reason when these variables are commented out in the .env file it still won't use the default value or pass the "if not SCHEME" check. RE: Amazon Echo skill for Kodi - digiltd - 2016-11-11 I have a working https and subpath setup using AWS and thought I would test this also My current working .env file (to show how i enter the variables) is this: Code: # The Kodi webserver only supports HTTP. RESULT Code: Sending request to https://supersecret.evenmoresecret.com:34242/supersecretsubpath/jsonrpc TEST 1 : Comment out KODI_SCHEME and KODI_SUBPATH Code: # The Kodi webserver only supports HTTP. RESULT Code: Sending request to http://None:/supersecret.evenmoresecret.com:34242/None/jsonrpc TEST 2 : Uncommented KODI_SCHEME and KODI_SUBPATH but leave KODI_SUBPATH empty Code: # The Kodi webserver only supports HTTP. RESULT Code: Sending request to http://supersecret.evenmoresecret.com:34242/jsonrpc Which I will assume would have worked fine if I had everything set up to receive. A long post I know, but it's clearer to see the whole thing. Hope it helps RE: Amazon Echo skill for Kodi - Stuckinohio85 - 2016-11-11 I'm gonna start with saying all you guys are doing amazing with everything. I've been following and learning as I go with kodi for a couple years now and this part is very unique and interesting for me. This is my first post with kodi and I'm looking forward to learning more and hopefully helping out soon as well. Awesome Job so far looks great! RE: Amazon Echo skill for Kodi - jingai - 2016-11-11 Ok, so this is a bit weird, and shouldn't be difficult.. lol On my Debian box with Python 2.7.12, I ran the following code: Code: #!/bin/python and got this output: Code: SCHEME is None KODI_SCHEME is not set in my environment. So, it works as it should. The only thing I can think of is that os.getenv('FOO') is returning a string with the value of 'None' under AWS Lambda's execution environment with the environment variable not set. Perhaps it's a side-effect of how they set the environment variables in the container from the list specified by LAMBDA_ENV_VARS. @jonjon, could you test this for me by commenting out KODI_SCHEME in your .env and adding a couple print statements under the os.getenv() call, like so: Code: # These two methods construct the JSON-RPC message and send it to the Kodi player RE: Amazon Echo skill for Kodi - jacobh - 2016-11-11 (2016-11-11, 08:05)jonjon Wrote: A long post I know, but it's clearer to see the whole thing. This is exactly what I'm seeing as well. If the variables are commented out, the environment lookup returns None. The code that checks for that and replaces it with a default value isn't working (and neither was using a default value in the getenv call). So there seems to be something strange about how os.getenv returns when the environment variable doesn't exist at all (vs. it existing and being empty). Maybe this is specific to the python interpreter being used by AWS Lambda? RE: Amazon Echo skill for Kodi - digiltd - 2016-11-11 (2016-11-11, 14:39)jingai Wrote: Ok, so this is a bit weird, and shouldn't be difficult.. lol Done Code: <type 'str'> RE: Amazon Echo skill for Kodi - jacobh - 2016-11-11 Looks like Jingai is right about the value being returned as a string. RE: Amazon Echo skill for Kodi - MaKin - 2016-11-12 Hi, I'd really like to test your Skill but somehow when triggering Lambda the request is not submitted correctly due to a false URL parsing. Here is the log: Code: START RequestId: id Version: $LATEST As you can see: http://None:/http:/myDomainName.org:8888/None/jsonrpc is obviously wrong. My .env-section looks like this: Code: KODI_ADDRESS = http://domain.duckdns.org RE: Amazon Echo skill for Kodi - jingai - 2016-11-12 I will fix this soon if no one else gets to it. But I'm on holiday this weekend. RE: Amazon Echo skill for Kodi - nawo69 - 2016-11-12 RE: Amazon Echo skill for Kodi - stuCONNERS - 2016-11-13 (2016-11-12, 20:27)nawo69 Wrote:(2016-11-12, 16:27)MaKin Wrote: Hi, Worked a treat for me, not bad timing RE: Amazon Echo skill for Kodi - digiltd - 2016-11-13 (2016-11-12, 16:27)MaKin Wrote: Hi, For reference the KODI_ADDRESS should not contain the scheme (http://) Code: KODI_ADDRESS = domain.duckdns.org Though I would stick with your working version at the moment till the None issue can be pinned down and fixed. RE: Amazon Echo skill for Kodi - Dominique - 2016-11-14 I am sorry if someone already asked this... (this thread is kind of overwhelming) When testing I get this error.... Quote:The remote endpoint could not be called, or the response it returned was invalid. Can someone assist me? Thanks. EDIT: Here is what I am looking at. Is this correct? RE: Amazon Echo skill for Kodi - jingai - 2016-11-14 @Dominique, is the endpoint actually accessible? |