m0ngr31 / kanzi

Alexa skill for controlling Kodi
https://lexigr.am
MIT License
427 stars 149 forks source link

The requested skill took to long to respond #234

Closed zokiz closed 6 years ago

zokiz commented 6 years ago

Hey m0ngr31, I followed your instructions and set everything up but whatever I ask Alexa I am getting the answer "The requested skill took to long to respond". zappa tailgives the following stack trace:

[1511644245247] [2017-11-25 21:10:45,246] ERROR in app: Exception on / [POST]
[1511644245247] Traceback (most recent call last):
[1511644245247] File "/private/var/folders/1k/0lsv2txj4vqb3hpcsygl6lvc0000gp/T/pip-build-bVRIEE/Flask/flask/app.py", line 1982, in wsgi_app
[1511644245247] File "/private/var/folders/1k/0lsv2txj4vqb3hpcsygl6lvc0000gp/T/pip-build-bVRIEE/Flask/flask/app.py", line 1614, in full_dispatch_request
[1511644245247] File "/private/var/folders/1k/0lsv2txj4vqb3hpcsygl6lvc0000gp/T/pip-build-bVRIEE/Flask/flask/app.py", line 1517, in handle_user_exception
[1511644245247] File "/private/var/folders/1k/0lsv2txj4vqb3hpcsygl6lvc0000gp/T/pip-build-bVRIEE/Flask/flask/app.py", line 1612, in full_dispatch_request
[1511644245247] File "/private/var/folders/1k/0lsv2txj4vqb3hpcsygl6lvc0000gp/T/pip-build-bVRIEE/Flask/flask/app.py", line 1598, in dispatch_request
[1511644245247] File "/private/var/folders/1k/0lsv2txj4vqb3hpcsygl6lvc0000gp/T/pip-build-bVRIEE/flask-ask/flask_ask/core.py", line 670, in _flask_view_func
[1511644245247] File "/var/task/alexa.py", line 2053, in alexa_watch_random_show
[1511644245247] shows_array = kodi.GetUnwatchedShows()
[1511644245247] File "/private/var/folders/1k/0lsv2txj4vqb3hpcsygl6lvc0000gp/T/pip-build-bVRIEE/kodi-voice/kodi_voice/kodi.py", line 1481, in GetUnwatchedShows
[1511644245247] File "/private/var/folders/1k/0lsv2txj4vqb3hpcsygl6lvc0000gp/T/pip-build-bVRIEE/kodi-voice/kodi_voice/kodi.py", line 446, in SendCommand
[1511644245247] File "/private/var/folders/1k/0lsv2txj4vqb3hpcsygl6lvc0000gp/T/pip-build-bVRIEE/kodi-voice/kodi_voice/cache.py", line 126, in add
[1511644245247] File "/private/var/folders/1k/0lsv2txj4vqb3hpcsygl6lvc0000gp/T/pip-build-bVRIEE/requests/requests/api.py", line 112, in post
[1511644245247] File "/private/var/folders/1k/0lsv2txj4vqb3hpcsygl6lvc0000gp/T/pip-build-bVRIEE/requests/requests/api.py", line 58, in request
[1511644245247] File "/private/var/folders/1k/0lsv2txj4vqb3hpcsygl6lvc0000gp/T/pip-build-bVRIEE/requests/requests/sessions.py", line 508, in request
[1511644245247] File "/private/var/folders/1k/0lsv2txj4vqb3hpcsygl6lvc0000gp/T/pip-build-bVRIEE/requests/requests/sessions.py", line 618, in send
[1511644245247] File "/private/var/folders/1k/0lsv2txj4vqb3hpcsygl6lvc0000gp/T/pip-build-bVRIEE/requests/requests/adapters.py", line 496, in send
[1511644245247] ConnectTimeout: HTTPConnectionPool(host='192.168.1.112', port=2201): Max retries exceeded with url: /jsonrpc (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7fddef941a10>, 'Connection to 192.168.1.112 timed out. (connect timeout=10)'))
[1511644245247] [INFO] 2017-11-25T21:10:45.247Z 13ecfae8-d225-11e7-9e99-3d03eeef037c 72.21.217.154 - - [25/Nov/2017:21:10:45 +0000] "POST / HTTP/1.1" 500 291 "" "Apache-HttpClient/4.5.x (Java/1.8.0_131)" 0/10404.827

but kodi is available and returns me the slots when I call it from https://slot-generator.herokuapp.com. The host in the log above (192.168.1.112) is the local IP address of the TV (Kodi) and the port forwarding is done on the router. Also I am using Dynu for DDNS and when trying to get the slots from https://slot-generator.herokuapp.com I am using the DDNS.

Kodi is installed on a Sony Android TV.

Any thoughts what might be the issue?

jingai commented 6 years ago

192.168.1.112 is a local IP address. That will only work if you host the skill locally.

You need to provide your WAN IP (or, preferably, a FQDN if your WAN IP is dynamic).

zokiz commented 6 years ago

You are right, I did configured kodi.configwith local IP instead using the FQDN. Thanks a lot!

serbancobzac commented 6 years ago

Hi! I'm using my WAN IP and I'm still getting exactly the same error, line by line. I also searched the forum thread with no success. Can you help me?

jingai commented 6 years ago

Post on the forum with a bit more info for us to go on and someone will help you.