• 1
  • 108
  • 109
  • 110(current)
  • 111
  • 112
  • 176
Release Kanzi: Amazon Alexa skill for Kodi
So I've been playing around with this a little more and I'm noticing that it's REALLY bad at recognizing movies from my library of 1200 movies. I put 100 examples in the skill but that doesn't seem to have helped. Most of the time it doesn't even recognize my command, the echo will just reply with "I couldn't find a device called Kodi" or sometimes "I can't find that skill". And if I ask it to play a random movie it only cycles through about 5 different movies so I don't even think it can see most of my movie library. Any suggestions on how to improve its ability to recognize things in my library?
Reply
Tell us exactly what you're saying to Alexa and send the skill logs for each request.
Reply
(2017-07-14, 02:10)jingai Wrote: Tell us exactly what you're saying to Alexa and send the skill logs for each request.
Sorry for the noob question, but how do I access skill logs? I tried searching this thread and googling it but can't find instructions.
Reply
'zappa tail dev' and the logs on Cloudwatch.

Start by just telling us exactly what you're saying to Alexa.

When you said you added items to the Slot and it didn't help, are you implying that you tried to omit the Slot items to begin with? If so, do note that nothing in the README is optional.
Reply
I put 100 movie title examples into the MOVIES custom slot on the Interaction Model tab on the Alexa Skill Developer Console (see screenshot). They've been there since I did initial setup. They were the titles generated by running "python generate_custom_slots.py" that I then copy and pasted into the Alexa Skill Custom Slot.
Image

I've been trying all sorts of different commands:
Alexa tell Kodi play The Revenant
Alexa ask Kodi play the movie Why Him
Alexa tell Kodi play the film Ghost in the Shell
Alexa ask Kodi play Jurassic World

I've tried all sorts of combinations of those different commands with dozens of movies in my library and it always comes back with "I couldn't find a device called Kodi." But then there are a few movies it does work on I can usually get it to work every time. For instance all of these work:
Alexa tell Kodi play Hairspray
Alexa tell Kodi play the movie Hairspray
Alexa ask Kodi play the film Hairspray
Alexa tell Kodi play Star Trek

I ran "zappa tail dev" and it ran a log but I can't find where to find it on Cloudwatch.
Reply
"I couldn't find a device called Kodi" is a message from Alexa itself as opposed to the skill. It's not having trouble finding the movie -- it's having trouble finding the skill.

In the Cards for the ones you got to work, try rewarding her for getting them right by clicking Yes where it says, "Did Alexa do what you wanted?"

Additionally, you can try just "open Kodi" and then "play the movie (some movie)" to see if that makes a difference. You shouldn't have to do it this way, but it's worth checking.
Reply
After trying the install for the 5th time I think it was, I finally got it working. I moved the folder I was installing it in to a different location.
Reply
Hi,

Great interface - thanks for the effort on developing this...

I have followed the official documentation through and all seems to be completed however i'm now at the testing stage and "talking to alexa" however, when the invocation name was: "Kodi Player" Alexa responded with "i can't find that skill", so i changed the Invocation name to: "media player" (logic being kodi might not be understood), and alexa now simply "does nothing". She doesn't respond with any phrase at all. The blue light just goes out.

Any ideas what i've done wrong?

I can see the skill is enabled in my Alexa app and the invocation name has updated OK.

Thanks in advance,

Dave.


UPDATE: after changing the invocation name a few times further - alexa seems to struggle with finding kodi as a "device", so no matter what i call the invocation name - she responds with things like "i can't find "whatever i called it"", or "im not sure how to help you" etc.
Reply
I suspect the recent changes allowing smarthome skills to work without directly invoking them is having some negative impact on our skill.

Unfortunately, I am on vacation right now though and I can't really look at things much from here.

When I get back home I will try to figure out what's going on.
Reply
Hi All

I have completed all the steps but seem to be having a problem. When I run a command in the Service Simulator such as navigate left it works fine and Kodi navigates left however when I say "Alexa, tell Kodi to navigate left" the blue light flashes no feedback such as OK etc and then she just goes back to listening mode and kodi does not navigate left.

Any help would be greatly appreciated, great piece of work btw!

Thanks
Reply
Scratch that I worked it out, I added a new language in the skill setup and selected English (U.K) seems to be working now but have only tested simple navigation functions.
Reply
(2017-07-14, 10:57)jingai Wrote: "I couldn't find a device called Kodi" is a message from Alexa itself as opposed to the skill. It's not having trouble finding the movie -- it's having trouble finding the skill.

In the Cards for the ones you got to work, try rewarding her for getting them right by clicking Yes where it says, "Did Alexa do what you wanted?"

Additionally, you can try just "open Kodi" and then "play the movie (some movie)" to see if that makes a difference. You shouldn't have to do it this way, but it's worth checking.

Thank you for these suggestions! I spent the weekend playing around with the skill a bit more and discovered some really interesting things:

1. Using the "open Kodi" command first made almost everything work smoothly. That's what led me to believe that the invocation name "cody" was the issue. So I changed the invocation name to "media center" and it's working MUCH better now. Not perfect, but still way better than using "cody."
2. I'm not sure how much providing feedback on the cards in the app will help but I've been doing them anyway so thank you for pointing out that feature.
3. Has anyone figured out how to play movies with roman numerals in the title? (e.g. Star Wars, Star Trek, The Godfather, Back to the Future, etc.) I have tried every way of pronouncing those movie titles I can think of and Alexa never seems to understand.
4. Speaking of Back to the Future, no matter what command I give Alexa it always interprets that movie as the command "go back."

Other than those little issues, this skill is working really well now so thank you for all the time and effort!
Reply
I can't get this to work at all.

The skill runs on my echo and says "Welcome to the Kodi skill" but everything after that just gives me an error and exits the skill.

I've followed the readme and used the heroku setup option.

Code:
2017-07-17T17:31:53.161274+00:00 app[web.1]: Willkommen zum Kodi Skill
2017-07-17T17:31:53.161371+00:00 heroku[router]: at=info method=POST path="/" host=MYHEROKUAPP.herokuapp.com request_id=3bf9d3a1-8a7e-430d-8e4b-9f604a439f3d fwd="54.240.197.12" dyno=web.1 connect=0ms service=432ms status=200 bytes=436 protocol=https
2017-07-17T17:32:07.099178+00:00 app[web.1]: Suche
2017-07-17T17:32:07.099528+00:00 app[web.1]: Sending request to http://MYKODIATHOME:8087/jsonrpc from device amzn1.ask.device.AGWVMSHZZQCFFNVV33VTU6OLCWW65ASHZFX7HCQ5MPTYRHYDPCW5QKQIAROJYA5XVBFWS2O7F4G5GVRLXPNVDUMUYQAIYAMFBXUADTNCDYMQQREHLDU5NJBUIV6PJDRDDU3YMECRJ6EJAKRSKFNKSNTDBFTQ
2017-07-17T17:32:07.304694+00:00 app[web.1]: Sending request to http://MYKODIATHOME:8087/jsonrpc from device amzn1.ask.device.AGWVMSHZZQCFFNVV33VTU6OLCWW65ASHZFX7HCQ5MPTYRHYDPCW5QKQIAROJYA5XVBFWS2O7F4G5GVRLXPNVDUMUYQAIYAMFBXUADTNCDYMQQREHLDU5NJBUIV6PJDRDDU3YMECRJ6EJAKRSKFNKSNTDBFTQ
2017-07-17T17:32:07.426144+00:00 app[web.1]: Error: json decoding failed <Response [401]>
2017-07-17T17:32:07.427448+00:00 app[web.1]: [2017-07-17 17:32:07,426] ERROR in app: Exception on / [POST]
2017-07-17T17:32:07.427449+00:00 app[web.1]: Traceback (most recent call last):
2017-07-17T17:32:07.427450+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/flask/app.py", line 1982, in wsgi_app
2017-07-17T17:32:07.427451+00:00 app[web.1]:     response = self.full_dispatch_request()
2017-07-17T17:32:07.427452+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/flask/app.py", line 1614, in full_dispatch_request
2017-07-17T17:32:07.427453+00:00 app[web.1]:     rv = self.handle_user_exception(e)
2017-07-17T17:32:07.427453+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/flask/app.py", line 1517, in handle_user_exception
2017-07-17T17:32:07.427454+00:00 app[web.1]:     reraise(exc_type, exc_value, tb)
2017-07-17T17:32:07.427454+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/flask/app.py", line 1612, in full_dispatch_request
2017-07-17T17:32:07.427455+00:00 app[web.1]:     rv = self.dispatch_request()
2017-07-17T17:32:07.427456+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/flask/app.py", line 1598, in dispatch_request
2017-07-17T17:32:07.427457+00:00 app[web.1]:     return self.view_functions[rule.endpoint](**req.view_args)
2017-07-17T17:32:07.427457+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/flask_ask/core.py", line 629, in _flask_view_func
2017-07-17T17:32:07.427458+00:00 app[web.1]:     result = self._map_intent_to_view_func(self.request.intent)()
2017-07-17T17:32:07.427459+00:00 app[web.1]:   File "/app/alexa.py", line 1682, in alexa_addon_globalsearch
2017-07-17T17:32:07.427459+00:00 app[web.1]:     kodi.AddonGlobalSearch(heard_search)
2017-07-17T17:32:07.427460+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/kodi_voice/kodi.py", line 1001, in AddonGlobalSearch
2017-07-17T17:32:07.427461+00:00 app[web.1]:     return self.AddonExecute("script.globalsearch", {"searchstring":needle.encode("utf-8")})
2017-07-17T17:32:07.427461+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/kodi_voice/kodi.py", line 997, in AddonExecute
2017-07-17T17:32:07.427462+00:00 app[web.1]:     return self.SendCommand(RPCString("Addons.ExecuteAddon", {"addonid":addon_id, "params":params}))
2017-07-17T17:32:07.427463+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/kodi_voice/kodi.py", line 323, in SendCommand
2017-07-17T17:32:07.427464+00:00 app[web.1]:     return r.json()
2017-07-17T17:32:07.427465+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/requests/models.py", line 894, in json
2017-07-17T17:32:07.427465+00:00 app[web.1]:     return complexjson.loads(self.text, **kwargs)
2017-07-17T17:32:07.427466+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/json/__init__.py", line 339, in loads
2017-07-17T17:32:07.427466+00:00 app[web.1]:     return _default_decoder.decode(s)
2017-07-17T17:32:07.427467+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/json/decoder.py", line 364, in decode
2017-07-17T17:32:07.427467+00:00 app[web.1]:     obj, end = self.raw_decode(s, idx=_w(s, 0).end())
2017-07-17T17:32:07.427468+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/json/decoder.py", line 382, in raw_decode
2017-07-17T17:32:07.427469+00:00 app[web.1]:     raise ValueError("No JSON object could be decoded")
2017-07-17T17:32:07.427470+00:00 app[web.1]: ValueError: No JSON object could be decoded
2017-07-17T17:32:07.432104+00:00 heroku[router]: at=info method=POST path="/" host=MYHEROKUAPP.herokuapp.com request_id=1f161265-dad6-4836-bc78-68170cc3d257 fwd="54.240.197.12" dyno=web.1 connect=1ms service=698ms status=500 bytes=456 protocol=https
2017-07-17T17:32:07.865474+00:00 heroku[router]: at=info method=POST path="/" host=MYHEROKUAPP.herokuapp.com request_id=22230df4-d04f-412a-9f62-4f98a0370064 fwd="54.240.197.12" dyno=web.1 connect=0ms service=321ms status=200 bytes=161 protocol=https

This is the output when speaking to my echo, not from the skill tester on the dev account from amazon. :/

I've already tried downgrading flask-ask from 0.9.6 which was installed by the script to 0.9.3 as mentioned earlier in this thread but that didn't do anything either Sad
Reply
(2017-07-17, 16:01)Yousty Wrote: 1. Using the "open Kodi" command first made almost everything work smoothly. That's what led me to believe that the invocation name "cody" was the issue. So I changed the invocation name to "media center" and it's working MUCH better now. Not perfect, but still way better than using "cody."

Using cody for the invocation name was an early suggestion that doesn't work well any more. I am guessing people are still using it because other guides still suggest it.

However, I personally use kodi and it works perfectly fine for me; at least, it did before I left for vacation.

(2017-07-17, 16:01)Yousty Wrote: 2. I'm not sure how much providing feedback on the cards in the app will help but I've been doing them anyway so thank you for pointing out that feature.

I know it seems like it wouldn't actually do anything, but it really does.

(2017-07-17, 16:01)Yousty Wrote: 3. Has anyone figured out how to play movies with roman numerals in the title? (e.g. Star Wars, Star Trek, The Godfather, Back to the Future, etc.) I have tried every way of pronouncing those movie titles I can think of and Alexa never seems to understand.

Roman numerals should work fine; however, if the movie in your library contains a subtitle, you will need to speak at least some of the title for it to fuzzy match.
For example, if you have in your library a movie titled, "Star Wars IV: A New Hope", and you request, "Star Wars IV," it's not likely to match. If you say "Star Wars A New Hope" or "Star Wars IV New Hope" etc, that should work.

(2017-07-17, 16:01)Yousty Wrote: 4. Speaking of Back to the Future, no matter what command I give Alexa it always interprets that movie as the command "go back."

Try: "watch the movie Back to the Future"

And, again, reward her when she gets it right, at least for a little bit.
Reply
(2017-07-17, 20:27)jingai Wrote: Using cody for the invocation name was an early suggestion that doesn't work well any more. I am guessing people are still using it because other guides still suggest it.

However, I personally use kodi and it works perfectly fine for me; at least, it did before I left for vacation.
The official guide on the Github repo is actually why I used "cody." It's from this screenshot on the guide: https://camo.githubusercontent.com/44fb2...6f2e706e67

I'll give "Kodi" a try.

(2017-07-17, 16:01)Yousty Wrote: 4. Speaking of Back to the Future, no matter what command I give Alexa it always interprets that movie as the command "go back."
(2017-07-17, 20:27)jingai Wrote: Try: "watch the movie Back to the Future"

And, again, reward her when she gets it right, at least for a little bit.

I tried all combinations: "watch Back to the Future","watch movie Back to the Future","watch the movie Back to the Future","watch film Back to the Future" but she never got it right and usually interpreted it as "go back." I guess I'll keep trying and reward her if she finally gets it right.
Reply
  • 1
  • 108
  • 109
  • 110(current)
  • 111
  • 112
  • 176

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