• 1
  • 55
  • 56
  • 57(current)
  • 58
  • 59
  • 176
Release Kanzi: Amazon Alexa skill for Kodi
@digiltd

first thanks for your help. I did what you said, the where python and pip commands came back "command not found" but the other two "which" reported back the /usr/local/bin/python.

i ran pip install lambda-deploy and got this

Media-Center:~ Media$ pip install lambda-deploy
Requirement already satisfied: lambda-deploy in /usr/local/lib/python2.7/site-packages
Requirement already satisfied: boto3>=1.3.0 in /usr/local/lib/python2.7/site-packages (from lambda-deploy)
Requirement already satisfied: yaep>=0.0.4 in /usr/local/lib/python2.7/site-packages (from lambda-deploy)
Requirement already satisfied: requests>=2.9.1 in /usr/local/lib/python2.7/site-packages (from lambda-deploy)
Requirement already satisfied: botocore<1.5.0,>=1.4.1 in /usr/local/lib/python2.7/site-packages (from boto3>=1.3.0->lambda-deploy)
Requirement already satisfied: s3transfer<0.2.0,>=0.1.10 in /usr/local/lib/python2.7/site-packages (from boto3>=1.3.0->lambda-deploy)
Requirement already satisfied: jmespath<1.0.0,>=0.7.1 in /usr/local/lib/python2.7/site-packages (from boto3>=1.3.0->lambda-deploy)
Requirement already satisfied: docutils>=0.10 in /usr/local/lib/python2.7/site-packages (from botocore<1.5.0,>=1.4.1->boto3>=1.3.0->lambda-deploy)
Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in /usr/local/lib/python2.7/site-packages (from botocore<1.5.0,>=1.4.1->boto3>=1.3.0->lambda-deploy)
Requirement already satisfied: futures<4.0.0,>=2.2.0; python_version == "2.6" or python_version == "2.7" in /usr/local/lib/python2.7/site-packages (from s3transfer<0.2.0,>=0.1.10->boto3>=1.3.0->lambda-deploy)
Requirement already satisfied: six>=1.5 in /usr/local/lib/python2.7/site-packages (from python-dateutil<3.0.0,>=2.1->botocore<1.5.0,>=1.4.1->boto3>=1.3.0->lambda-deploy)

then i ran python deploy-to-lambda.py

Media-Center:kodi-alexa-master Media$ python deploy-to-lambda.py
2017-01-10 09:53:19:INFO:botocore.vendored.requests.packages.urllib3.connectionpool: Starting new HTTP connection (1): 169.254.169.254
Traceback (most recent call last):
File "/usr/local/bin/lambda-deploy", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python2.7/site-packages/lambda_deploy/lambda_deploy.py", line 360, in main
name=options.name
File "/usr/local/lib/python2.7/site-packages/lambda_deploy/lambda_deploy.py", line 75, in __init__
self.client = boto3.client('lambda')
File "/usr/local/lib/python2.7/site-packages/boto3/__init__.py", line 83, in client
return _get_default_session().client(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/boto3/session.py", line 263, in client
aws_session_token=aws_session_token, config=config)
File "/usr/local/lib/python2.7/site-packages/botocore/session.py", line 828, in create_client
client_config=config, api_version=api_version)
File "/usr/local/lib/python2.7/site-packages/botocore/client.py", line 69, in create_client
verify, credentials, scoped_config, client_config, endpoint_bridge)
File "/usr/local/lib/python2.7/site-packages/botocore/client.py", line 222, in _get_client_args
verify, credentials, scoped_config, client_config, endpoint_bridge)
File "/usr/local/lib/python2.7/site-packages/botocore/args.py", line 44, in get_client_args
endpoint_url, is_secure, scoped_config)
File "/usr/local/lib/python2.7/site-packages/botocore/args.py", line 101, in compute_client_args
service_name, region_name, endpoint_url, is_secure)
File "/usr/local/lib/python2.7/site-packages/botocore/client.py", line 295, in resolve
service_name, region_name)
File "/usr/local/lib/python2.7/site-packages/botocore/regions.py", line 122, in construct_endpoint
partition, service_name, region_name)
File "/usr/local/lib/python2.7/site-packages/botocore/regions.py", line 135, in _endpoint_for_partition
raise NoRegionError()
botocore.exceptions.NoRegionError: You must specify a region.


but when i go back to aws my function isn't there, so something has gone wrong. i saved the .env file with text edit is that ok?
Reply
Hello,

my Name ist Mark and I am from Germany and I just tried to install the skill (thanks to the developer and everyone helping out here).

I went through this Tutorial

http://www.howtogeek.com/249336/how-to-c...azon-echo/

step by step and everything worked until was at the step "developer console" and then "configuration" and "test".

I use AWS to host the skill and as I am from Europe I used "eu-west-1" as Region in the .env file and as well as "EU Ireland" on the AWS Lambda site so I was able to use the trigger "Alexa skills" and getting the "arn:aws:lambda:eu-west-...." code.

Under "configuration" I choose "AWS Lambda ARN (Amazon Resource Name)" (not https, so I don´t have the tab SSL Certificate to the left) and saved the skill which I was able to do without getting any error.

But when I go to "test" and enter an utterance like "reboot" (or anything else) I get the following error message in rhe right box

"The remote endpoint could not be called, or the response it returned was invalid."

The "KODI_ADDRESS I provided in the .env file and the specified port is correct, I can enter the data as URL in my browser and I get the webinterface of my kodi (I use a dyndns service which my ISP offers with my hosting plan and my router also supports this dyndns service of my ISP (I created the port forwarding ) and I created a subdomain for the dyndns like "kodi.mydomain.de:1234").


I read in Post "517" that it might have something to do with the mailing adress configured in the echo?

As I wrote above, I use "eu-west" as Region in the .env aas well as on AWS while my e-mail adress (amazon account) is with a "gmail.com" mailing address. Can this be the problem?

When I look at "console.aws.amazon.com" then "Test" and "Monitoring" I see "Invocation errors" and in the log it says

Code:
2017-01-10

09:40:55
START RequestId: 11111111111111  Version: $LATEST

09:40:55
module initialization error: name 'default' is not defined

09:40:55
END RequestId: 11111111111111

09:40:55
REPORT RequestId: 11111111111111 Duration: 0.32 ms Billed Duration: 100 ms Memory Size: 128 MB Max Memory Used: 19 MB

So, does this help to find the problem? What does this mean?

I only have TV shows in my kodi database currently, however I populated all required 9 custom slots.... and I don´t think I have any banned addons or so in my kodi.

Any help is much appreciated

Thanks
Mark


EDIT: Problem solved as I was using a corrupted kodi.py file. After downloading the original code again it works now...
Reply
@Gibsarno

Text edit should be ok as long as you set the format to Plain Text (in preferences)

You might want to download Sublime Text https://www.sublimetext.com/ or Atom https://atom.io/

Both are free (ish) for your level of use. I would recommend Sublime but that is just cos I have used it for years.. though it is super fast and lightweight compared to Atom. Though Atom is also very popular.

The errors are looking like things are working but it is not finding your .env file. Just to be sure you are saving it as ".env" not "my.env" or "sample.env"?

Adding a dot in front of a filename on a unix base OS (like mac/linux) will make the file hidden to Finder.

But in Terminal you should be able to see it when you run "ls -A" (ls = list and -A = all files)
Reply
Quote:How many movies do you have?

only 2 but it didn't seem to like those, i re scraped them into kodi and everything seems to work ok now,


out of interest if i add more, would that mean updating the slots with new information ?
Reply
(2017-01-09, 23:07)jingai Wrote: How many movies do you have?

only 2, i want to use it mainly for my music collection at the moment


out of interest if i add more items to the library, would that mean having to update the slots ?
Reply
(2017-01-09, 23:06)digiltd Wrote:
(2017-01-09, 22:22)goldari Wrote: Only command that seems to work "Alexa, ask tv to play die hard", any other movie I say ends up as "random movie", even thought the app shows correct movie is said and registered...why is this? The movie is available, and in the custom slot

I think this might be a bug, it also happens to me sometimes.

It's not a bug. This is why I'm working on generic play/search -- currently if you don't specify the media type, it will just do the next closest operation. Sometimes Alexa deems it's PlayMovie, sometimes she thinks it's RandomMovie, etc.

But if you specify the media type, it should get the intent you desired:

"Alexa, ask Kodi to play the movie Blade Runner"

With the generic play/search branch I've got, it'll figure it out without the media type specified, but I'm waiting on the move to Flask-Ask before I submit the PR for it.
Reply
(2017-01-10, 16:43)lurkio321 Wrote:
(2017-01-09, 23:07)jingai Wrote: How many movies do you have?

only 2, i want to use it mainly for my music collection at the moment

Do you happen to have an enormous amount of another media type, like music?

It shouldn't get stuck building forever, but I have seen it happen on occasion at peak times. It's always 'unstuck' itself after some time though.

(2017-01-10, 16:43)lurkio321 Wrote: out of interest if i add more items to the library, would that mean having to update the slots ?

Only if she's having trouble matching the new things you've added.
Reply
When I deploy the code using python deploy-to-lambda.py I get the error
C:\kodi-alexa-master>C:\Python27\Scripts\lambda-deploy.exe deploy
2017-01-10 12:12:33:INFO:botocore.vendored.requests.packages.urllib3.connectionpool: Starting new HTTP connection (1): 169.254.169.254
Traceback (most recent call last):
File "c:\python27\lib\runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "c:\python27\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Python27\Scripts\lambda-deploy.exe\__main__.py", line 9, in <module>
File "c:\python27\lib\site-packages\lambda_deploy\lambda_deploy.py", line 360, in main
name=options.name
File "c:\python27\lib\site-packages\lambda_deploy\lambda_deploy.py", line 75, in __init__
self.client = boto3.client('lambda')
File "c:\python27\lib\site-packages\boto3\__init__.py", line 83, in client
return _get_default_session().client(*args, **kwargs)
File "c:\python27\lib\site-packages\boto3\session.py", line 263, in client
aws_session_token=aws_session_token, config=config)
File "c:\python27\lib\site-packages\botocore\session.py", line 828, in create_client
client_config=config, api_version=api_version)
File "c:\python27\lib\site-packages\botocore\client.py", line 69, in create_client
verify, credentials, scoped_config, client_config, endpoint_bridge)
File "c:\python27\lib\site-packages\botocore\client.py", line 222, in _get_client_args
verify, credentials, scoped_config, client_config, endpoint_bridge)
File "c:\python27\lib\site-packages\botocore\args.py", line 44, in get_client_args
endpoint_url, is_secure, scoped_config)
File "c:\python27\lib\site-packages\botocore\args.py", line 101, in compute_client_args
service_name, region_name, endpoint_url, is_secure)
File "c:\python27\lib\site-packages\botocore\client.py", line 295, in resolve
service_name, region_name)
File "c:\python27\lib\site-packages\botocore\regions.py", line 122, in construct_endpoint
partition, service_name, region_name)
File "c:\python27\lib\site-packages\botocore\regions.py", line 135, in _endpoint_for_partition
raise NoRegionError()
botocore.exceptions.NoRegionError: You must specify a region.

No success message whats going on I followed everything to a T
Reply
You must specify a region error.
I had this the 1st time because I did not have a .env file with correct entries.
Please check.
QNAP TS670 NAS - 4x4TB Raided with NFS Support & Central MySQL DB
Pi 3 [Xbian] - Samsung 46" ES7000 Smart TV & HT-E5550 3D BD Sound System
Pi 3 [Xbian]  + Hyperion Ambilight- Samsung 48" Curved UE48JS9000 4k
PowerEthernet T1502 Powerline adapters
Reply
(2017-01-09, 23:12)jingai Wrote:
(2017-01-09, 22:22)goldari Wrote: I see there is a new release, can I update this on top of my working environment or new setup?

Yes. Update the code locally, then add any new slots (and fill them using the slot generator) to your skill on the Amazon skill developer site. While still on the Amazon skill developer site, update the utterances and intents at the same time. Finally, deploy the new code to Lambda.

You need to do the above every time the you want to deploy a new version of the code.



(2017-01-09, 22:22)goldari Wrote: Only command that seems to work "Alexa, ask tv to play die hard", any other movie I say ends up as "random movie", even thought the app shows correct movie is said and registered...why is this? The movie is available, and in the custom slot

The incantation is, "Alexa, ask tv to play movie die hard". Currently you need to specify the media type.

This will change soon, but we're in the middle of restructuring the code at the moment.

Thanks for the reply. It seems to work ok for me, I was going to update for the sake of updating, unless there is something essential in release notes I don't understand?

Not sure what I did, but it can play the correct movie now. The video starts but alexa finishes with "sorry I didn't...." and app says "skill response as marked as failure...oh now...at least it plays


Keep up the good work, thanks again!
Reply
Slight hijack but will the new version you are working on be available via a docker container? I believe the dev kindly confirmed it would recently but can't find it in this thread.

Would be great if so (I'm holding off even attempting the amazon hosted version with a new version in progress I'd rather wait).
Reply
Short question:

If I want the skill to give answers in German (as I am from Germany), what do I have to change or edit?

Thanks
Reply
German language support is coming soon
Reply
Tried to get this up and running via Amazon tonight and no matter what I trird (us, eu, blank) it simply kept saying unspecified region...... hope a docker version is doable, I seem to have better luck setting up docker containers locally vs anything hosted.
Reply
@Nelbert its because you havent saved your .env file correctly. After saving it the file extension should say ENV file... if not and you jsut saved it as .env and still is a text file it wont work... I had the same issue...
Reply
  • 1
  • 55
  • 56
  • 57(current)
  • 58
  • 59
  • 176

Logout Mark Read Team Forum Stats Members Help
Kanzi: Amazon Alexa skill for Kodi15