•   
  • 1
  • 140
  • 141
  • 142(current)
  • 143
  • 144
  • 171
  •   
Release Kanzi: Amazon Alexa skill for Kodi
(2017-12-23, 19:12)jingai Wrote: Heroku dashboard->Settings->Config Variables->Reveal config vars.  Click the pencil icon next to KODI_ADDRESS and change it there.
 Fixing it now and then will re run. Thank you
Reply
Quote:2017-12-23T17:23:53.562735+00:00 app[web.1]: INFO:kodi_voice.cacheBig Grinisabled
2017-12-23T17:23:53.563022+00:00 app[web.1]: INFO:kodi_alexa.alexa:Recommending audio
2017-12-23T17:23:53.563294+00:00 app[web.1]: INFO:kodi_voice.kodi:Received request from device None
2017-12-23T17:23:53.563426+00:00 app[web.1]: INFO:kodi_voice.kodi:Sending request to http://maxmize.mynetgear.com:3721/jsonrpc
2017-12-23T17:23:53.656482+00:00 app[web.1]: INFO:kodi_voice.kodi:Received request from device None
2017-12-23T17:23:53.656579+00:00 app[web.1]: INFO:kodi_voice.kodi:Sending request to http://maxmize.mynetgear.com:3721/jsonrpc
2017-12-23T17:23:53.727653+00:00 app[web.1]: INFO:kodi_voice.kodi:Received request from device None
2017-12-23T17:23:53.727745+00:00 app[web.1]: INFO:kodi_voice.kodi:Sending request to http://maxmize.mynetgear.com:3721/jsonrpc
2017-12-23T17:23:53.789700+00:00 app[web.1]: INFO:kodi_voice.kodi:Received request from device None
2017-12-23T17:23:53.789792+00:00 app[web.1]: INFO:kodi_voice.kodi:Sending request to http://maxmize.mynetgear.com:3721/jsonrpc
2017-12-23T17:23:53.869970+00:00 heroku[router]: at=info method=POST path="/" host=kodiskill.herokuapp.com request_id=b157ef8a-f9f9-4166-a540-289f7b7e6f3a fwd="72.21.217.170" dyno=web.1 connect=0ms service=341ms status=500 bytes=456 protocol=https
2017-12-23T17:24:36.303400+00:00 heroku[router]: at=info method=POST path="/" host=kodiskill.herokuapp.com request_id=474d3813-a28a-4859-a182-8ddb22348f72 fwd="72.21.217.129" dyno=web.1 connect=0ms service=71ms status=200 bytes=161 protocol=https
2017-12-23T17:24:36.109021+00:00 heroku[router]: at=info method=POST path="/" host=kodiskill.herokuapp.com request_id=b6d953bf-bbab-4466-b11b-bbe1ab1549aa fwd="72.21.217.129" dyno=web.1 connect=1ms service=182ms status=500 bytes=456 protocol=https
2017-12-23T17:24:36.009565+00:00 app[web.1]: INFO:kodi_voice.cache:Initalizing2017-12-23T17:24:36.014341+00:00 app[web.1]: INFO:kodi_voice.cacheBig Grinisabled2017-12-23T17:24:36.023813+00:00 app[web.1]: INFO:kodi_alexa.alexaTonguelaying recently added songs
2017-12-23T17:24:36.025395+00:00 app[web.1]: INFO:kodi_voice.kodi:Received request from device amzn1.ask.device.AFQ54DYRKERGG4K3M4KQ3KXUTIJK7BIQURNNBQ6P6KWDKJVXIK5UALBSY62XTBPNE6B3WGET3K5ZGFTDWT4VXOHDOG26SQA4LKZVZSYNZNX6FAAO3JKBMDXDH7M7JYVY6QT6QZPLCUHT62F7JEF2H6RA6GNUMWXD4ZFZ46PUW5G2EKHMLOWPK
2017-12-23T17:24:36.025499+00:00 app[web.1]: INFO:kodi_voice.kodi:Sending request to http://maxmize.mynetgear.com:3721/jsonrpc
2017-12-23T17:24:36.107620+00:00 app[web.1]: [2017-12-23 17:24:36,107] ERROR in app: Exception on / [POST]
2017-12-23T17:24:36.107624+00:00 app[web.1]: Traceback (most recent call last):
2017-12-23T17:24:36.107625+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/flask/app.py", line 1982, in wsgi_app
2017-12-23T17:24:36.107626+00:00 app[web.1]: response = self.full_dispatch_request()2
017-12-23T17:24:36.107628+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/flask/app.py", line 1614, in full_dispatch_request2017-12-23T17:24:36.107628+00:00 app[web.1]: rv = self.handle_user_exception(e)
2017-12-23T17:24:36.107629+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/flask/app.py", line 1517, in handle_user_exception2017-12-23T17:24:36.107630+00:00 app[web.1]: reraise(exc_type, exc_value, tb)
2017-12-23T17:24:36.107630+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/flask/app.py", line 1612, in full_dispatch_request2017-12-23T17:24:36.107631+00:00 app[web.1]: rv = self.dispatch_request()
2017-12-23T17:24:36.107632+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/flask/app.py", line 1598, in dispatch_request2017-12-23T17:24:36.107633+00:00 app[web.1]: return self.view_functions[rule.endpoint](**req.view_args)2017-12-23T17:24:36.107634+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/flask_ask/core.py", line 670, in _flask_view_func
2017-12-23T17:24:36.107635+00:00 app[web.1]: result = self._map_intent_to_view_func(self.request.intent)()
2017-12-23T17:24:36.107635+00:00 app[web.1]: File "/app/alexa.py", line 85, in decorated_function
2017-12-23T17:24:36.107636+00:00 app[web.1]: return f(*args, **kwargs)
2017-12-23T17:24:36.107637+00:00 app[web.1]: File "/app/alexa.py", line 927, in alexa_listen_recently_added_songs2017-12-23T17:24:36.107638+00:00 app[web.1]: songs = songs_result['result']['songs']
2017-12-23T17:24:36.107638+00:00 app[web.1]: KeyError: 'songs'
This is new log after i updated IP with dynamic DNS, this shows both text input and voice input testing. also get this error on amazon test 
There was an error calling the remote endpoint, which returned HTTP 500 : INTERNAL SERVER ERROR
Reply
Guessing you don't have any songs in your Kodi library.

What did you say, exactly?
Reply
(2017-12-23, 19:33)jingai Wrote: Guessing you don't have any songs in your Kodi library.

What did you say, exactly?
 In text i asked suggest something to listen to, although i have no songs in library.
Now its working though, tried pausing a video and resuming.

Thank you so much for your help. I have a question abt slots, at this time i have no music on my kodi library so my slots for music are empty. once i add some music, should i edit slots and add stuff or just leave it and it will update?
Reply
You will need to add the items to the slots, but only once. Use the Slot generator again after you add some.
Reply
(2017-12-23, 19:42)jingai Wrote: You will need to add the items to the slots, but only once. Use the Slot generator again after you add some.
 I used slot generator, but it only added 100 or so movies, can I edit and add another set of movies to the list manually? Also, once I add new content to library, should I go back and edit slots and enter things manually?
Reply
The slots don't need to contain all items in your library. They are just a representative sample.

There is no need to add more or regenerate after adding new items unless you're having specific trouble with a new title being recognized.
Reply
Hey, I finally got this working self-hosted! - but only with a dynamic dns - it just refused point blank to accept a self-signed certificate with my public ip. Many thanks to the dev and support community who have made this possible.

But, since I've been up all night and my eyes are fried and my brain in melt down, can anyone tell me the voice command to close Alexa''s visual overlay that pops up on a fire tv with search results?

Also, whenever there's a hickup in retrieving results, the fall-over response seems to be to play recently added music - which is driving me mad because I've now heard the same podcast intro about fifty times. Is there a way to tweak this?

Thanks - oh, and Merry Christmas one and all!
Reply
I'm on Windows 10, and I'm following the "AWS Lambda" section of the setup here.  But I get suck at the following paragraph

"Now, clone my repo: git clone https://github.com/m0ngr31/kodi-alexa.git[/code] and cd kodi-alexa .Once you are inside the project directory, you're going to create a new "Virtual environement" and then activate it: virtualenv venv and source venv/bin/activate (if you are on Windows, that's venv\Scripts\activate.bat or venv\Scripts\activate.ps1 for Powershell). Next you need to create the file kodi.config from the kodi.config.example template and enter the correct information for: address, port, username, and password. I'll go over the other variables in another section below. After you've created your config file, run
pip install -r requirements.txt and pip install packaging zappa lambda-packages."

If the kodi-alexa directory the project directory?  If it is, I can't run "virtualenv venv" from there.  I had to run virtualenv venv from the C:\Python27\Scripts directory, where virtualenv is...

Then I added my login info to the kodi.config which I assumed goes in kodi-alexa.  Now when I type "pip install -r requirements.txt" I get an error that the file doesn't exist.


Where does the kodi.config go and what directory should I be in?
Reply
i followed the guide. I got port forwarding working (i know this is working because getting the slots via the generator worked).
When running
Code:
zappa deploy dev
it mostly goes through but get errors at the end about not having an S3 account. Isnt this part optional for caching. why do it get the error?
and i think because i get the error... i dont get the URL.
Im guessing that URL is used for the skill as I used the IAM signin link for the skill but I get an error in skill tests and echo.
error i get in skill test screen is: There was an error calling the remote endpoint, which returned HTTP 405 : Method Not Allowed

Anyone have any ideas?
Anything else useful I can send to help diagnose?

EDIT.... guess I should point out that I am also located in Canada where the Echos were just released here on December 5
EDIT 2... here is the deploy errors:
Quote:(venv) C:\Echo\kodiAlexa>zappa deploy dev
(six 1.10.0 (c:\echo\kodialexa\venv\lib\site-packages), Requirement.parse('six>=1.11.0'), set([u'zappa']))
Calling deploy for stage dev..
Downloading and installing dependencies..
 - cryptography==2.1.4: Using locally cached manylinux wheel
 - cffi==1.11.2: Using locally cached manylinux wheel
Packaging project as zip.
Oh no! An error occurred! Sad

==============

Traceback (most recent call last):
  File "c:\echo\kodialexa\venv\lib\site-packages\zappa\cli.py", line 2610, in handle
    sys.exit(cli.handle())
  File "c:\echo\kodialexa\venv\lib\site-packages\zappa\cli.py", line 505, in handle
    self.dispatch_command(self.command, stage)
  File "c:\echo\kodialexa\venv\lib\site-packages\zappa\cli.py", line 539, in dispatch_command
    self.deploy(self.vargs['zip'])
  File "c:\echo\kodialexa\venv\lib\site-packages\zappa\cli.py", line 714, in deploy
    self.zip_path, self.s3_bucket_name, disable_progress=self.disable_progress)
  File "c:\echo\kodialexa\venv\lib\site-packages\zappa\core.py", line 891, in upload_to_s3
    Bucket=bucket_name,
  File "c:\echo\kodialexa\venv\lib\site-packages\botocore\client.py", line 317, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "c:\echo\kodialexa\venv\lib\site-packages\botocore\client.py", line 615, in _make_api_call
    raise error_class(parsed_response, operation_name)
ClientError: An error occurred (NotSignedUp) when calling the CreateBucket operation: Your account is not signed up for the S3 service. You must sign up before you can use S3.
Reply
(2017-12-24, 10:06)FrightenedRat Wrote: Hey, I finally got this working self-hosted! - but only with a dynamic dns - it just refused point blank to accept a self-signed certificate with my public ip. Many thanks to the dev and support community who have made this possible.

But, since I've been up all night and my eyes are fried and my brain in melt down, can anyone tell me the voice command to close Alexa''s visual overlay that pops up on a fire tv with search results?

Also, whenever there's a hickup in retrieving results, the fall-over response seems to be to play recently added music - which is driving me mad because I've now heard the same podcast intro about fifty times. Is there a way to tweak this?

Thanks - oh, and Merry Christmas one and all!
 Hi... Can you give some pointers as to how you got it working self-hosted? I"m attempting to do this but all I'm getting is a 404 Not Found when I test from developer.amazon.com. I'm pretty sure I have a working web server (nginx on Ubuntu 16.04) and a working uWSGI environment as I can serve other python applications successfully (A simple Hello World app).

I've cloned the github repository into a virtualenv environment and created the kodi.config which has the internal DNS entry for the kodi box I'm trying to interact with and followed the skill setup guide. I have a letsencrypt SSL cert for the server and this presents as trusted in a browser.

I'm presuming I need to use the alexa.wsgi file to start the server under uWSGI?

Any hints/tips/pointers greatly appreciated.
Reply
(2017-12-26, 23:16)msw1970 Wrote:
(2017-12-24, 10:06)FrightenedRat Wrote: Hey, I finally got this working self-hosted! - but only with a dynamic dns - it just refused point blank to accept a self-signed certificate with my public ip. Many thanks to the dev and support community who have made this possible.

But, since I've been up all night and my eyes are fried and my brain in melt down, can anyone tell me the voice command to close Alexa''s visual overlay that pops up on a fire tv with search results?

Also, whenever there's a hickup in retrieving results, the fall-over response seems to be to play recently added music - which is driving me mad because I've now heard the same podcast intro about fifty times. Is there a way to tweak this?

Thanks - oh, and Merry Christmas one and all!
 Hi... Can you give some pointers as to how you got it working self-hosted? I"m attempting to do this but all I'm getting is a 404 Not Found when I test from developer.amazon.com. I'm pretty sure I have a working web server (nginx on Ubuntu 16.04) and a working uWSGI environment as I can serve other python applications successfully (A simple Hello World app).

I've cloned the github repository into a virtualenv environment and created the kodi.config which has the internal DNS entry for the kodi box I'm trying to interact with and followed the skill setup guide. I have a letsencrypt SSL cert for the server and this presents as trusted in a browser.

I'm presuming I need to use the alexa.wsgi file to start the server under uWSGI?

Any hints/tips/pointers greatly appreciated. 
Hi, I used apache rather than nginx. For me the steps that required care or changes from the original step by step instructions for setting up apache (earlier on this thread) were:
  • run   sudo apt-get install libffi-dev   before installing the extra requirements with sudo pip install -r requirements.txt
  • the port, dns, kodi name and password now go in /var/www/html/kodi-alexa/kodi.config - I haven't made any other changes to the template kodi.config as yet.
  • the certificate signing that ended up working for me had to have a dns rather than a public ip, and the common name had to be the skill name, with the DNS appearing in a separate DNS.1 entry - as per the instructions on Amazon's developer site.
  • The script alias in apache's default-ssl.conf entry was  
    • WSGIScriptAlias /kodi-alexa /var/www/html/kodi-alexa/alexa.wsgi
  • But the address I needed to give to amazon was https://mydns/kodi=alexa/ with a trailing slash - otherwise I encountered a redirect.
    • Note that browsing to the page directly with a GET rather than a POST produces a 405 method not allowed on apache.
    • If you are getting a 404 I would imagine there's something wrong with either your script alias or your port forwarding (though maybe it's different with nginx).
  • In the apache default-ssl.conf file I ended up with   <VirtualHost *:443> and ServerName my.dns.org  - it hadn't seemed to like VirtualHost as my.dns.org:443, so I changed it to the star. (It's been an age since I've set up an apache web server so as you can see I've forgotten how things are usually done, and I was more interested in getting it working quickly than getting it right - I guess I'll need to revisit the apache config when I'm feeling less time pressured.
By the way, during testing, when I couldn't get the SSL handshake to complete using the Amazon test service and my public ip, I tried to POST using curl (and the -k option which keeps going past SSL errors). I was passing it a json file into which I'd pasted the json contents of the left hand box in Amazon's testing setup - the curl NEVER worked for me (500 error), even when Amazon's test service was finally happy. I'm not sure what was going wrong with that - was something extra needed besides the json contents? It would be nice to have an example of how to test with curl (if that's possible).

Good luck getting things working.
Reply
(2017-12-27, 17:35)FrightenedRat Wrote:
(2017-12-26, 23:16)msw1970 Wrote:
(2017-12-24, 10:06)FrightenedRat Wrote: Hey, I finally got this working self-hosted! - but only with a dynamic dns - it just refused point blank to accept a self-signed certificate with my public ip. Many thanks to the dev and support community who have made this possible.

But, since I've been up all night and my eyes are fried and my brain in melt down, can anyone tell me the voice command to close Alexa''s visual overlay that pops up on a fire tv with search results?

Also, whenever there's a hickup in retrieving results, the fall-over response seems to be to play recently added music - which is driving me mad because I've now heard the same podcast intro about fifty times. Is there a way to tweak this?

Thanks - oh, and Merry Christmas one and all!
 Hi... Can you give some pointers as to how you got it working self-hosted? I"m attempting to do this but all I'm getting is a 404 Not Found when I test from developer.amazon.com. I'm pretty sure I have a working web server (nginx on Ubuntu 16.04) and a working uWSGI environment as I can serve other python applications successfully (A simple Hello World app).

I've cloned the github repository into a virtualenv environment and created the kodi.config which has the internal DNS entry for the kodi box I'm trying to interact with and followed the skill setup guide. I have a letsencrypt SSL cert for the server and this presents as trusted in a browser.

I'm presuming I need to use the alexa.wsgi file to start the server under uWSGI?

Any hints/tips/pointers greatly appreciated.   
Hi, I used apache rather than nginx. For me the steps that required care or changes from the original step by step instructions for setting up apache (earlier on this thread) were:
  • run   sudo apt-get install libffi-dev   before installing the extra requirements with sudo pip install -r requirements.txt
  • the port, dns, kodi name and password now go in /var/www/html/kodi-alexa/kodi.config - I haven't made any other changes to the template kodi.config as yet.
  • the certificate signing that ended up working for me had to have a dns rather than a public ip, and the common name had to be the skill name, with the DNS appearing in a separate DNS.1 entry - as per the instructions on Amazon's developer site.
  • The script alias in apache's default-ssl.conf entry was  
    • WSGIScriptAlias /kodi-alexa /var/www/html/kodi-alexa/alexa.wsgi
  • But the address I needed to give to amazon was https://mydns/kodi=alexa/ with a trailing slash - otherwise I encountered a redirect.
    • Note that browsing to the page directly with a GET rather than a POST produces a 405 method not allowed on apache.
    • If you are getting a 404 I would imagine there's something wrong with either your script alias or your port forwarding (though maybe it's different with nginx).
  • In the apache default-ssl.conf file I ended up with   <VirtualHost *:443> and ServerName my.dns.org  - it hadn't seemed to like VirtualHost as my.dns.org:443, so I changed it to the star. (It's been an age since I've set up an apache web server so as you can see I've forgotten how things are usually done, and I was more interested in getting it working quickly than getting it right - I guess I'll need to revisit the apache config when I'm feeling less time pressured.
By the way, during testing, when I couldn't get the SSL handshake to complete using the Amazon test service and my public ip, I tried to POST using curl (and the -k option which keeps going past SSL errors). I was passing it a json file into which I'd pasted the json contents of the left hand box in Amazon's testing setup - the curl NEVER worked for me (500 error), even when Amazon's test service was finally happy. I'm not sure what was going wrong with that - was something extra needed besides the json contents? It would be nice to have an example of how to test with curl (if that's possible).

Good luck getting things working.  
 OK... Thanks for the advice... I've managed to get a bit further.. The test from developer.amazon.com now goes through without a 404 error (That was related to URL paths not being rewritten when passing through my web edge proxy and onto my webapp server).

I'm now seeing the following error in the uWSGI "console"
Quote:INFO:kodi_voice.cache:Initalizing
INFO:kodi_voice.cacheBig Grinisabled
INFO:kodi_alexa.alexaTonguelaying video playlist
[2017-12-27 23:11:31,875] ERROR in app: Exception on / [POST]
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1982, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1614, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1517, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1612, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1598, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/lib/python2.7/dist-packages/flask_ask/core.py", line 670, in _flask_view_func
    result = self._map_intent_to_view_func(self.request.intent)()
  File "./alexa.py", line 85, in decorated_function
    return f(*args, **kwargs)
  File "./alexa.py", line 2432, in alexa_watch_video_playlist
    return _alexa_watch_video_playlist(kodi, VideoPlaylist, False)
  File "./alexa.py", line 2406, in _alexa_watch_video_playlist
    playlist = kodi.FindVideoPlaylist(VideoPlaylist)
  File "/usr/local/lib/python2.7/dist-packages/kodi_voice/kodi.py", line 564, in FindVideoPlaylist
    log.info('Searching for video playlist "%s"', heard_search.encode("utf-8"))
AttributeError: 'NoneType' object has no attribute 'encode'
Any one know what the cause of this could be?
Reply
Just in case it's useful to anyone, I faced a couple of issues during the installation on a windows 10 box which I managed to overcome, as follows:

When using git make sure you open a git console window as I couldn't find the correct path in a regular command window.

When executing:
Code:
pip install packaging zappa lambda-packages

I got a python stack dump with "MemoryError".  I solved it by adding the no-cache directive:
Code:
pip install packaging zappa lambda-packages --no-cache-dir

Also when executing:
Code:
zappa init

I got a python stack dump with "pkg_resources.DistributionNotFound: The 'six>=1.11.0' distribution was not found and is required by zappa".
This was resolved by 
Code:
pip install six --upgrade

Hope that helps someone else...
Great project - thanks to all the contributors!
Reply
Hi, 
I just receive my Alexa, I living in Canada, and want to integrate it with Kodi.
I follow the process, but when it's time to enter "zappa deploy dev" I receive this:
Calling deploy for stage dev.. Warning! AWS Lambda may not be available in this AWS Region! Warning! AWS API Gateway may not be available in this AWS Region! Oh no! An error occurred! Sad
EndpointConnectionError: Could not connect to the endpoint URL: "https://iam.1.amazonaws.com/"

Any idea to what to do to change that ?

Thank You !!
Reply
  •   
  • 1
  • 140
  • 141
  • 142(current)
  • 143
  • 144
  • 171
  •   
 
Thread Rating:
  • 15 Vote(s) - 4.6 Average



Logout Mark Read Team Forum Stats Members Help
Kanzi: Amazon Alexa skill for Kodi4.615