• 1
  • 79
  • 80
  • 81(current)
  • 82
  • 83
  • 176
Release Kanzi: Amazon Alexa skill for Kodi
Hi All,

I'm following the guide here https://www.howtogeek.com/249336/how-to-...azon-echo/ but have hit a roadblock. I'm up to the bit where I have to publish the code to AWS but, after running lambda-deploy.exe deploy (from within the kodi-alexa-master folder in an elevated command prompt) I get the following error:

C:\Python27\Scripts\lambda-deploy.exe deploy
2017-03-20 11:18:15: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 836, in create_client
client_config=config, api_version=api_version)
File "c:\python27\lib\site-packages\botocore\client.py", line 70, in create_client
verify, credentials, scoped_config, client_config, endpoint_bridge)
File "c:\python27\lib\site-packages\botocore\client.py", line 224, in _get_client_args
verify, credentials, scoped_config, client_config, endpoint_bridge)
File "c:\python27\lib\site-packages\botocore\args.py", line 45, in get_client_args
endpoint_url, is_secure, scoped_config)
File "c:\python27\lib\site-packages\botocore\args.py", line 103, in compute_client_args
service_name, region_name, endpoint_url, is_secure)
File "c:\python27\lib\site-packages\botocore\client.py", line 297, 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.


What am I missing here?

I can confirm my AWS default location is us-east-1 (North Virginia). I've set up all my environment variables/users/roles etc.

One thing I cannot find clarity on (because the instructions are not clear/detailed enough) is the use of the env.lambda file. Do I leave it with this naming convention, or rename it to lambda.env? I cannot rename it to just .env because windows won't let me; but nowhere does it tell you which is which and how to do it properly.

If anyone could please clarify what I have to do next it would be very much appreciated.

Regards

Mal.
Reply
(2017-03-20, 10:39)sanjonny Wrote:
(2017-03-20, 01:14)kadeschs Wrote:
(2017-03-20, 00:41)jingai Wrote: "Alexa, ask Kodi to watch/play movie Ghostbusters"

"Alexa, ask Kodi to watch/play Season 1 Episode 5 of Firefly"

"Alexa, ask Kodi to watch/play the next episode of Quantum Leap"

"Alexa, ask Kodi to watch/play a random episode of How It's Made"

Okay, using the verb, ask, instead of, tell, seems to work much better. Thanks!

On a separate note, the slot generator at https://slot-generator.herokuapp.com/ can grab pieces of HTML code (such as bold, color) from KODI along with the addon titles which will cause the Amazon webpage to not save the slots properly. It's definitely a good idea to back through the titles and make sure they are all clean
Watch works way better for me than play. Play often tries to play music files or errors. Watch is much more consistent.

Also when Amazon errors due to the slot script, it won't work, you have to start over, it will have errors saving, go back a few pages and I describe it better.

Makes sense. I'll try to use "watch" more. Haven't had too much trouble with "play", but I also don't have any music in KODI.
Reply
(2017-03-20, 01:14)kadeschs Wrote:
(2017-03-20, 00:41)jingai Wrote: "Alexa, ask Kodi to watch/play movie Ghostbusters"

"Alexa, ask Kodi to watch/play Season 1 Episode 5 of Firefly"

"Alexa, ask Kodi to watch/play the next episode of Quantum Leap"

"Alexa, ask Kodi to watch/play a random episode of How It's Made"

Okay, using the verb, ask, instead of, tell, seems to work much better. Thanks!

While that may be true for you, do note that that is not what I was referencing. At the moment, you need to specify the media type before the media.

That is, this might not work:

"Alexa, ask Kodi to play Ghostbusters"

But this should:

"Alexa, ask Kodi to play movie Ghostbusters"

(2017-03-20, 01:14)kadeschs Wrote: On a separate note, the slot generator at https://slot-generator.herokuapp.com/ can grab pieces of HTML code (such as bold, color) from KODI along with the addon titles which will cause the Amazon webpage to not save the slots properly. It's definitely a good idea to go back through the titles and make sure they are all clean and free from extra characters.

I have not seen this, but it would be a bug if it's doing this for you.

Please post this as an Issue on github.
Reply
(2017-03-20, 13:29)Malachor Wrote: I'm following the guide here https://www.howtogeek.com/249336/how-to-...azon-echo/ but have hit a roadblock.

Do not follow this guide.


(2017-03-20, 13:29)Malachor Wrote: botocore.exceptions.NoRegionError: You must specify a region.[/i]

What am I missing here?

You're following an out-of-date third-party guide. The official documentation for the skill is here. Please read it in its entirety.


(2017-03-20, 13:29)Malachor Wrote: One thing I cannot find clarity on (because the instructions are not clear/detailed enough) is the use of the env.lambda file. Do I leave it with this naming convention, or rename it to lambda.env? I cannot rename it to just .env because windows won't let me; but nowhere does it tell you which is which and how to do it properly.

Search this thread for the dozens of other times this has been answered.
Reply
Apologies, I wasn't intending to cause any grief. I did read the first 15 pages of the guide in the first instance; but was in work so had limited time.

I have since started again (with the new guide you kindly linked) and have managed to get as far as the command prompt telling me "Successfully deployed kodi-alexa version 1", One point of contention here however; the command in the guide (python deploy-to-lambda.py) did not work for me. When trying to run that I got the following:

C:\Users\avata\Desktop\kodi-alexa-master\kodi-alexa>C:\Python27\python deploy-to-lambda.py
'lambda-deploy' is not recognized as an internal or external command,
operable program or batch file.


What did work for me was:

C:\Users\avata\Desktop\kodi-alexa-master\kodi-alexa>C:\Python27\scripts\lambda-deploy.exe deploy deploy-to-lambda.py

I've logged into AWS-->Lambda-->Get Started and it forwards me to "blueprints" not "functions". I cannot see my "kodi-alexa" app-name anywhere. All I'm asked to do is choose a template

I've read and re-read the guide, trawled through various posts here but don't know what to do next. Is it alright to ask for help on this?

Many thanks

Mal.
Reply
(2017-03-20, 20:03)Malachor Wrote: C:\Users\avata\Desktop\kodi-alexa-master\kodi-alexa>C:\Python27\scripts\lambda-deploy.exe deploy deploy-to-lambda.py

This is not right. If something doesn't work somewhere along the way, you should stop there and search this thread for help. Post if you can't find anything. But, guessing will just get you into trouble.

I don't mean to sound upset or anything -- it's just that people come in here a lot asking for help fixing something they broke by trying to guess their way around an issue they encountered. It's often nearly impossible to answer with anything but, "well, go RTFM again." Or.. an awful lot of time-consuming back-and-forth.

The correct incantation would be:

Code:
C:\Users\avata\Desktop\kodi-alexa-master\kodi-alexa>C:\Python27\scripts\lambda-deploy.exe deploy

The first command you tried from the README should have worked too, but it couldn't find lambda-deploy.exe in your path. I'm not a Windows guy though, so I don't really know what to say about that. Running lambda-deploy.exe directly will also work, it will just upload more than it needs to (not a huge deal).
Reply
Scrap that - sorted it! Sorry for any headaches!
Reply
Hi guys

Followed the guide and now onto the slot generator but it cant find my kodi device. Is there anything i can check to enable it to discover the device. im using an nvidia shield. Thanks
Reply
(2017-03-22, 00:47)motherboard Wrote: Hi guys

Followed the guide and now onto the slot generator but it cant find my kodi device. Is there anything i can check to enable it to discover the device. im using an nvidia shield. Thanks

Confirm KODI's webserver port matches modem's port forwarding and .env file.
Confirm port forwarding is set to proper internal IP address and port.
Confirm external IP address and port in .env file.
Reply
Hi Managed to get everything set up now but im getting playing videos is not supported on this device from alexa on my echo. Any help would be appreciated.
Reply
@motherboard, do you really think you have provided enough information for us to help you?
Reply
Hi Guys,

I can only dream about getting far enough through this to start asking proper questions about it actually working with Alexa and Kodi, I cant get past setting up the Deploy to AWS, everything fine until I try to deploy, first part is fine, installs the script to AWS fine, then when I try deploying ( C:\Python27\Scripts\lambda-deploy.exe deploy) it gets almost to the end but stops with "An error occurred (Subscription Required Exception)when calling the list functions operation the AWS Access Key ID needs a subscription for this service" I have tried many times from scratch, re- done the Zip coding part, checked it is only .env file updated, back to AWS, created a second AWS User and Role with all new settings but exactly the same error...
Is this subscription error just something stupid I'm missing, the AWS account all looks OK.

Thanks in advance...
Reply
(2017-02-23, 19:43)digiltd Wrote:
(2017-02-23, 07:31)shaunnadan Wrote:
(2017-02-22, 22:17)digiltd Wrote: @shaunnadan in AWS check that you are working in the correct region (top right between "your name" and "support")

i am using the correct region on the AWS console.

looking through the terminal results i seem to have a "time" problem.

i have run sudo apt-get install ntp which installs successfully. is there any way to activate it after installation ? i still get the same error after i indtalled ntp

can i manually set the time zone using - sudo timedatectl set-timezone America/New_York Huh what would i replace America/New_York with to be in US-EAST-1



Have you tried manually changing the time? I don't think the time zone change will fix the 5min gap. It is taking 5+ min each time you try to deploy?

Does this help:

sudo ntpdate ntp.ubuntu.com

@digiltd

I am back again with (slightly) more skill. I have progressed through all my issues and now, have landed upon this "time" issue like many other people on this thread. If it is true that my PC time is out of sync with the destination clock, then changing my PC time to equal the destination clock should fix the problem.

My PC clock is currently in Central Time and the destination clock is US-West-2. I changed my PC clock to be Pacific Time and re-ran the command to upload .env to AWS. It took the same 10 minutes and had the exact same error. Am I using the right time zone for US-West-2? Any other thoughts?

Here is my specific error read out:


botocore.exceptions.ClientError: An error occurred (InvalidSignatureException) when calling the CreateFunction operation: Signature expired: 20170325T155703Z is now earlier than 20170325T160002Z (20170325T160502Z - 5 min.)

Thank you in advance!
Reply
@deboyd, sounds like your computer clock is out...check time is set accurately
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
@nsviper

This has been suggested to me before but I am almost positive my PC time is correct.. It is set to auto time zone and auto time update from the Internet servers so not sure how I can make it more accurate. Is this the only possible explanation for such a time error?

Thanks!
Reply
  • 1
  • 79
  • 80
  • 81(current)
  • 82
  • 83
  • 176

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