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 - simon_rb - 2017-08-31

(2017-08-31, 14:19)jingai Wrote: Read my response to @sanjonny -- the skill can map one echo device to one Kodi installation. If you need one-to-many, you need to have separate copies of the skill (with different invocation names) or use another Amazon account in a Household.

I must of sent mine same time you sent yours I think.

Ok so best way to have the same echo dot control two different kodi's is to have another account or two skills..

I don't mind two skills because one could be called living room tv and living room projector for the two different installs

So what are the extra bits at the bottom of the config? I thought you could have a default and then override that to control another kodi install? Or have I understood that wrong lol


RE: Amazon Echo skill for Kodi - jingai - 2017-08-31

@sparky0820, see this post.


RE: Amazon Echo skill for Kodi - jingai - 2017-08-31

(2017-08-31, 14:24)simon_rb Wrote: So what are the extra bits at the bottom of the config? I thought you could have a default and then override that to control another kodi install? Or have I understood that wrong lol

You've misunderstood how it works Wink

The DEFAULT section contains default configuration values that will carry through to the other sections below. The sections below are overrides; that is, you only need to specify here the variables that differ from the DEFAULT section.

Each section is identified by the incoming Device ID. One Echo with one account and one copy of the skill can only provide one Device ID, thus we have nothing to switch on if you want to control more than one instance of Kodi with the same Echo.

The way around this is as I described: a separate Amazon account in a household or a separate copy of the skill with a different invocation name.


RE: Amazon Echo skill for Kodi - simon_rb - 2017-08-31

jingai, I get ya. Which way would you recommend? the separate skill?

So for that I would have to do the whole things again? Which I don't mind Big Grin

Is it the whole readme again? Do I add a new user to the AWS side of it? Sorry for the questions. I'm just trying to understand how it all works then I can muddle through without pestering you Wink

Thinking about it, I'm guessing I just make the skill part..


RE: Amazon Echo skill for Kodi - sparky0820 - 2017-08-31

The skill logs are stating unable to import module 'handler': No module named builtins


RE: Amazon Echo skill for Kodi - jingai - 2017-08-31

@simon_rb, I'd recommend whatever works best for you. It's probably a tad easier to set up a household and share the same copy of the skill code, but it's ultimately a matter of deciding which would work best for you:

Code:
Alexa, switch accounts
Alexa, ask Kodi to ...
Alexa, switch accounts
Alexa, ask Kodi to ...

or

Code:
Alexa, ask Kodi TV to ...
Alexa, ask Kodi Projector to ...

You shouldn't need a separate AWS account and I don't think you need a separate user -- just use a different role name, as far as I know. I believe zappa determines the role name by the root directory name, so for your second copy, clone it into kodi-alexa-projector or something.

edit: If it doesn't work as I described there (based on the directory name), you probably need to create another user with its own access/secret key. Like I said, I'm not sure, so just try it and do whatever works Smile


RE: Amazon Echo skill for Kodi - jingai - 2017-08-31

(2017-08-31, 14:45)sparky0820 Wrote: The skill logs are stating unable to import module 'handler': No module named builtins

What region are you in?


RE: Amazon Echo skill for Kodi - sparky0820 - 2017-08-31

(2017-08-31, 15:15)jingai Wrote:
(2017-08-31, 14:45)sparky0820 Wrote: The skill logs are stating unable to import module 'handler': No module named builtins

What region are you in?

us-east-1


RE: Amazon Echo skill for Kodi - jingai - 2017-08-31

@sparky0820, well, I just went through it all here again as described in the README and I'm not seeing a problem. The order of operations is as described in the README, but it boils down to:

Code:
pip install awscli
aws configure
pip install virtualenv
git clone https://github.com/m0ngr31/kodi-alexa.git
cd kodi-alexa
virtualenv venv
source venv/bin/activate (or venv\Scripts\activate.bat on Windows)
pip install -r requirements.txt
pip install packaging
pip install zappa

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.

Then:

Code:
zappa init
zappa deploy dev

Replace zappa deploy dev with zappa update dev if you've already deployed before.

All of the above is a condensed version of what's laid out in the README. I'm just honestly not sure where you're going wrong.

The only other thing I can think of is.. you did tick the middle option (My development endpoint is a subdomain of a domain that has a wildcard certificate from a certificate authority) in the SSL Certificate section on the skill builder, right?


RE: Amazon Echo skill for Kodi - simon_rb - 2017-08-31

jingai

Creating the skill and a new folder named kodi-alexa-pj worked just fine.

Seems to be working. I have my own remote/keyboard profile setup in kodi. I assume that I can add those options to the Sample Utterances?

Thanks for your help!!!!


RE: Amazon Echo skill for Kodi - jingai - 2017-08-31

@simon_rb, I'm not sure what you mean exactly. If you give me an example of what you're looking for I can answer more thoroughly, but in general no, you cannot just add your own utterances and expect them to do something.

You can add alternative phrasing for existing utterances, but it's all a delicate balance to avoid conflicts with others, so you'd be better off suggesting what you'd like to see either here or on Github as an Issue.


RE: Amazon Echo skill for Kodi - sparky0820 - 2017-08-31

(2017-08-31, 15:45)jingai Wrote: @sparky0820, well, I just went through it all here again as described in the README and I'm not seeing a problem. The order of operations is as described in the README, but it boils down to:

Code:
pip install awscli
aws configure
pip install virtualenv
git clone https://github.com/m0ngr31/kodi-alexa.git
cd kodi-alexa
virtualenv venv
source venv/bin/activate (or venv\Scripts\activate.bat on Windows)
pip install -r requirements.txt
pip install packaging
pip install zappa

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.

Then:

Code:
zappa init
zappa deploy dev

Replace zappa deploy dev with zappa update dev if you've already deployed before.

All of the above is a condensed version of what's laid out in the README. I'm just honestly not sure where you're going wrong.

The only other thing I can think of is.. you did tick the middle option (My development endpoint is a subdomain of a domain that has a wildcard certificate from a certificate authority) in the SSL Certificate section on the skill builder, right?

Do I just redo all of this on the machine, or do I need to uninstall python and start over? Also, the git clone step is where I might have gone wrong. Isn't that a linux command? I'm on a Windows machine.

And yes, I checked the middle option on the skill builder.

Thanks for your help.


RE: Amazon Echo skill for Kodi - simon_rb - 2017-08-31

(2017-08-31, 15:56)jingai Wrote: @simon_rb, I'm not sure what you mean exactly. If you give me an example of what you're looking for I can answer more thoroughly, but in general no, you cannot just add your own utterances and expect them to do something.

You can add alternative phrasing for existing utterances, but it's all a delicate balance to avoid conflicts with others, so you'd be better off suggesting what you'd like to see either here or on Github as an Issue.

I have a customer keyboard.xml. Two of those commands, first is to set 3D mode in kodi and the other is audiotoggledigital which changes the audio toggle from pass through to not pass through.

I assume I can add audiotoggledigital to the Sample Utterances? Or is that not how it works?

Code:
audiotoggledigital change passthrough
audiotoggledigital change audio settings
audiotoggledigital disable passthrough
audiotoggledigital enable passthrough
audiotoggledigital toggle passthrough
audiotoggledigital toggle audio



RE: Amazon Echo skill for Kodi - ziggy73701 - 2017-08-31

Hello!!! Am getting

File "generate_custom_slots.py", line 81
print 'Writing: %s' % (filename)
^
SyntaxError: invalid syntax

When running python generate_custom_slots.py should I be adding something else?


RE: Amazon Echo skill for Kodi - jingai - 2017-08-31

(2017-08-31, 15:57)sparky0820 Wrote: Do I just redo all of this on the machine, or do I need to uninstall python and start over?

All of those commands are intended for developers, and any of them can fail. Unfortunately, I cannot tell you where you went wrong without seeing the output from all of them. If you're really stuck, it might be best to start over and copy/paste the terminal output here (redacting your secrets/personally-identifying information, of course) so we can see what you're doing wrong.



(2017-08-31, 15:57)sparky0820 Wrote: Also, the git clone step is where I might have gone wrong. Isn't that a linux command? I'm on a Windows machine.

Git is available for many platforms, including Windows.

It's just one way of acquiring the source code. You could also download the ZIP archive and skip the git clone, but using git will make updates easier in the future (it's a matter of git pull origin master as opposed to downloading the ZIP archive and preserving your venv directory and zappa_settings.json file by hand).