Kodi Community Forum
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)



RE: Amazon Echo skill for Kodi - UsefulG - 2016-12-22

@jingai I removed all slots and started again and found that Bonny "Prince" Billy was an arstist in the list I assumed it was a generic error for double quotes not an actual artist. I blame my wife's choice of music Smile


RE: Amazon Echo skill for Kodi - SmiddyJR - 2016-12-22

@jingai Hi again, just want to say thanks for your help. Re-uploaded the code and utterances/intents from the latest commit, and got all the functions i have tested so far working from the Alexa skills test. Really loving this skill Smile


RE: Amazon Echo skill for Kodi - dorr351 - 2016-12-24

Thank you for this great release of code. I am new to Alexa and I love this. Would it be possible to add a custom slot for "Program Addons"?
Sorry for this post I have tried to delete but it won't let me. This post was generated due to my complete ignorance. I realize now that it all works great! Again I apologize.


RE: Amazon Echo skill for Kodi - orskasm - 2016-12-26

Quote:2016-12-26 16:19:14: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.

I keep getting this error. I've made sure my .env file is set up properly, copied it from .env.lambda.

Really need some help, thanks in advance.


RE: Amazon Echo skill for Kodi - snoopy86 - 2016-12-27

Hi, can this also play tv channels like "alexa play discovery hd on kodi"?


RE: Amazon Echo skill for Kodi - digiltd - 2016-12-27

(2016-12-27, 08:46)snoopy86 Wrote: Hi, can this also play tv channels like "alexa play discovery hd on kodi"?

No.

Well not yet anyway.

If you have the skills and the time, there is a pull request for PVR functionality that has been waiting for someone to test for a couple of months. It's on the repo.


RE: Amazon Echo skill for Kodi - Twit - 2016-12-27

@orskasm

Looking at the log you posted, it's not even trying to use the ".env" file. It usually gives a warning about it not uploading the file as it contains sensitive info (This is normal and expected behaviour).

1 - Are you running the command from inside the "kodi-alexa-master" folder? If not you should be.
2 - Are you 100% sure that ".env" exists? Must be named without any other text. Like notepad in Windows will try to save it as .env.txt and if you don't have windows set up to show file extensions you may not notice.

Regards

Simon


RE: Amazon Echo skill for Kodi - bernardlowe - 2016-12-27

hiya
cheers for the update - awesome stuff.
having problems with the execution of add ons.....
if i say open youtube it opens youtube perfectly.
if i say open bbc iplayer or itv it just gives an error noise.
the values - bbc iplayer and itv are entered into the addons slot type. it works if i type open itv into the test function of the skill in aws........


RE: Amazon Echo skill for Kodi - snoopy86 - 2016-12-28

(2016-12-27, 10:26)digiltd Wrote:
(2016-12-27, 08:46)snoopy86 Wrote: Hi, can this also play tv channels like "alexa play discovery hd on kodi"?

No.

Well not yet anyway.

If you have the skills and the time, there is a pull request for PVR functionality that has been waiting for someone to test for a couple of months. It's on the repo.
I have tested it and it works fine. I just added on git 2 additonal files in upload to lambda script.


RE: Amazon Echo skill for Kodi - danmedhurst - 2016-12-28

So, i've followed the guide on github, and i've run the test on the developer portal and it works, i see results from my Kodi pi and everything seems unky dory..

In the Alexa app on my phone, i can see the skill i've set up.

However, when talking to my Echo Dot, it just reponds "Sorry I didn't understand the question I heard"

I've deleted everything, (user, role, skill and app) twice and i get the same results..

Does anyone have any ideas how i get this bugger to work?

My invocation name is "the bed room".. i've also tried "cody" and "panasonic" with the same results.

Edit : I'm running on Lambda, and i've just changed the invocation name to "the bedroom" as that's what Alexa seems to be picking up. Wont be able to test it until later though.


RE: Amazon Echo skill for Kodi - digiltd - 2016-12-28

Could there be a language (UK/US) conflict somewhere?

I would also avoid using "the" as part of an invocation name. Kodi should work ok.

What command are you trying to use? A good test command is "ask Alexa to play a random movie" as it doesn't conflict with Alexa stuff (play, pause, stop etc) and doesn't need to match a specific show or movie.


RE: Amazon Echo skill for Kodi - danmedhurst - 2016-12-28

(2016-12-28, 13:33)digiltd Wrote: Could there be a language (UK/US) conflict somewhere?

I would also avoid using "the" as part of an invocation name. Kodi should work ok.

What command are you trying to use? A good test command is "ask Alexa to play a random movie" as it doesn't conflict with Alexa stuff (play, pause, stop etc) and doesn't need to match a specific show or movie.

I used "the bedroom" as i saw that on another guide it was suspected that the "k" in ask was running in to the "k" at the start of the word "kodi"...

The command i've been trying is "Do i have a new film" but i've also tried many others..

I will experiment with some more invocation names tonight and see if any of them make any difference... is there a way to test that everything is working as it should with out the echo?


RE: Amazon Echo skill for Kodi - jingai - 2016-12-28

(2016-12-27, 20:45)bernardlowe Wrote: hiya
cheers for the update - awesome stuff.
having problems with the execution of add ons.....
if i say open youtube it opens youtube perfectly.
if i say open bbc iplayer or itv it just gives an error noise.
the values - bbc iplayer and itv are entered into the addons slot type. it works if i type open itv into the test function of the skill in aws........
If you get the error bong, it means Amazon intercepted the command and never passed it to the skill.

There isn't much we can do about this. I've noticed if I hit "no" on the "Did Alexa do what you wanted?" portion of the Cards, eventually it seems to improve. But that could be placebo.. hard to know unless Amazon tells us directly how they handle it all.


RE: Amazon Echo skill for Kodi - danmedhurst - 2016-12-28

(2016-12-28, 13:42)danmedhurst Wrote:
(2016-12-28, 13:33)digiltd Wrote: Could there be a language (UK/US) conflict somewhere?

I would also avoid using "the" as part of an invocation name. Kodi should work ok.

What command are you trying to use? A good test command is "ask Alexa to play a random movie" as it doesn't conflict with Alexa stuff (play, pause, stop etc) and doesn't need to match a specific show or movie.

I used "the bedroom" as i saw that on another guide it was suspected that the "k" in ask was running in to the "k" at the start of the word "kodi"...

The command i've been trying is "Do i have a new film" but i've also tried many others..

I will experiment with some more invocation names tonight and see if any of them make any difference... is there a way to test that everything is working as it should with out the echo?

This still isn't working.. it either says, i couldn't understand or i'm not sure what went wrong Sad


RE: Amazon Echo skill for Kodi - Boomstick - 2016-12-28

Hi,

I've been struggling with setting this up for a couple of days now. Firstly it was down to the whole setting up a region thing and the creation of the .env file. Sorted that finally and after installing and deploying Lambda, I get the following error:
Code:
2016-12-28 16:35:22:INFO:botocore.credentials: Found credentials in environment variables.
2016-12-28 16:35:23:INFO:lambda_deploy: Packaging lambda kodi-alexa-master
2016-12-28 16:35:23:WARNING:lambda_deploy: A .env file exists in your Lambda directory - be careful that it does not contain any secrets you don't want uploaded to AWS!
2016-12-28 16:35:23:WARNING:lambda_deploy: Skipping inclusion of of .env file - use LAMBDA_ENV_VARS instead (see documentation for more information)
Collecting requests (from -r C:\Users\booms\Documents\Alexa\kodi-alexa-master\requirements.txt (line 1))
  Using cached requests-2.12.4-py2.py3-none-any.whl
Collecting gunicorn (from -r C:\Users\booms\Documents\Alexa\kodi-alexa-master\requirements.txt (line 2))
  Using cached gunicorn-19.6.0-py2.py3-none-any.whl
Collecting yaep (from -r C:\Users\booms\Documents\Alexa\kodi-alexa-master\requirements.txt (line 3))
  Using cached yaep-0.0.6-py2-none-any.whl
Collecting pycountry (from -r C:\Users\booms\Documents\Alexa\kodi-alexa-master\requirements.txt (line 4))
  Using cached pycountry-16.11.27.1.tar.gz
Collecting pytz (from -r C:\Users\booms\Documents\Alexa\kodi-alexa-master\requirements.txt (line 5))
  Using cached pytz-2016.10-py2.py3-none-any.whl
Collecting fuzzywuzzy (from -r C:\Users\booms\Documents\Alexa\kodi-alexa-master\requirements.txt (line 6))
  Using cached fuzzywuzzy-0.14.0-py2.py3-none-any.whl
Installing collected packages: requests, gunicorn, yaep, pycountry, pytz, fuzzywuzzy
  Running setup.py install for pycountry ... done
Exception:
Traceback (most recent call last):
  File "c:\python27\lib\site-packages\pip\basecommand.py", line 215, in main
    status = self.run(options, args)
  File "c:\python27\lib\site-packages\pip\commands\install.py", line 342, in run
    prefix=options.prefix_path,
  File "c:\python27\lib\site-packages\pip\req\req_set.py", line 796, in install
    requirement.remove_temporary_source()
  File "c:\python27\lib\site-packages\pip\req\req_install.py", line 977, in remove_temporary_source
    rmtree(self.source_dir)
  File "c:\python27\lib\site-packages\pip\_vendor\retrying.py", line 49, in wrapped_f
    return Retrying(*dargs, **dkw).call(f, *args, **kw)
  File "c:\python27\lib\site-packages\pip\_vendor\retrying.py", line 212, in call
    raise attempt.get()
  File "c:\python27\lib\site-packages\pip\_vendor\retrying.py", line 247, in get
    six.reraise(self.value[0], self.value[1], self.value[2])
  File "c:\python27\lib\site-packages\pip\_vendor\retrying.py", line 200, in call
    attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
  File "c:\python27\lib\site-packages\pip\utils\__init__.py", line 102, in rmtree
    onerror=rmtree_errorhandler)
  File "c:\python27\lib\shutil.py", line 247, in rmtree
    rmtree(fullname, ignore_errors, onerror)
  File "c:\python27\lib\shutil.py", line 247, in rmtree
    rmtree(fullname, ignore_errors, onerror)
  File "c:\python27\lib\shutil.py", line 247, in rmtree
    rmtree(fullname, ignore_errors, onerror)
  File "c:\python27\lib\shutil.py", line 247, in rmtree
    rmtree(fullname, ignore_errors, onerror)
  File "c:\python27\lib\shutil.py", line 256, in rmtree
    onerror(os.rmdir, path, sys.exc_info())
  File "c:\python27\lib\site-packages\pip\utils\__init__.py", line 114, in rmtree_errorhandler
    func(path)
WindowsError: [Error 145] The directory is not empty: 'c:\\users\\booms\\appdata\\local\\temp\\pip-build-idj6sx\\pycountry\\src\\pycountry\\locales\\nb'
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 376, in main
    method()
  File "c:\python27\lib\site-packages\lambda_deploy\lambda_deploy.py", line 172, in deploy
    zfh = self.package()
  File "c:\python27\lib\site-packages\lambda_deploy\lambda_deploy.py", line 156, in package
    self.lambda_name
lambda_deploy.lambda_deploy.DependencyInstallationError: Failed to install dependencies of kodi-alexa-master

I have no idea what any of this means so any help would be appreciated.