Kodi Community Forum
Release Amazon Echo Alexa Video 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 Amazon Echo Alexa Video Skill for Kodi (/showthread.php?tid=327562)



RE: Amazon Echo Alexa Video Skill for Kodi - Snow73 - 2018-09-09

(2018-09-04, 14:18)tkislan Wrote:
(2018-09-02, 13:39)Snow73 Wrote: Hello tkislan, thanks for adding me to the beta.
I have followed the steps but get failed to connect in kodi. In the Amazone app i am linked.
I have filled in my email with and without capital en filled in the secret but still it can not connect?
Here you can find my log https://paste.ubuntu.com/p/BHGBZKhFhG/
13:15:30.959 T:5104 ERROR: 2018-09-02 13:15:30,959 tornado.general WARNING SSL Error on 3568 ('46.101.194.37', 443): [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)
There seems to be an issue with the device you're running Kodi on. There was another user reporting this issue as well.
Unfortunately I don't know what might be causing this issue. But it is something system related (not Kodi, or my addon)

Thanks for the reply.
I did a fresh install of my HTPC and now its working.
Is there a fraise that i can use to go back to the homepage of Kodi?
For example when i watch a episode and i tell Alexa to stop/pause and then i want to go the the homepage of Kodi.


RE: Amazon Echo Alexa Video Skill for Kodi - hslansky - 2018-09-09

(2018-09-05, 11:19)tkislan Wrote:
(2018-09-04, 14:48)hslansky Wrote:
(2018-09-04, 14:27)tkislan Wrote: @hslansky 

1) Hmm, this is indeed really weird. I have some smaller fixes ready for filtering, but I will try it out, to see what might be the problem.
2) I guess this is something that Amazon has in works.
     - this message actually comes from Alexa, so the request doesn't even reach my skill

As for additional info. A time and timezone of request would be enough, so that I can check in logs, how the request from Alexa looked like, to simulate it locally. 


Time zone would be Eastern and the requests were around 19:00.   
I've found the request, but for what you've requested, this is what genres Alexa has sent ..
["Fantasy", "fantasy", "Sci-Fi & Fantasy", "Série de fantasy", "Film de fantasy"] 
Interesting.  I would think that based on those criteria it would at least show the movies in the Fantasy genre.  If I Ask Alexa to show fantasy movies it works.  Is there any way to fix this or is this an Amazon thing?


RE: Amazon Echo Alexa Video Skill for Kodi - pbarr - 2018-09-10

(2018-09-09, 08:18)tkislan Wrote:
(2018-09-08, 12:06)pbarr Wrote:
(2018-09-07, 02:17)pbarr Wrote: Tomas,

Hopefully I did this right and you should find the log file here. I switched on DEBUG also.

https://paste.ubuntu.com/p/mtBZkyV2T4/

I registered with [email protected]

As for the description of what's happening.

I start up Kodi and the Kodi Connect pop up appears and says "connected"

Then I just ask Kodi to play a movie:

Alexa, play Interstellar - just as in the cheat sheet.

Alexa says: "getting Interstellar from Kodi Video".

This experience is the same for TV Shows and Movies.

Then nothing happens so I'm guessing there's an unhandled exception occurring somewhere there, either in Kodi or in your server.  Looking at those logs I think it's Kodi.

If I am in a movie or a music video I can still "pause" and "play". Lag is about 2 seconds on both commands and Alexa doesn't respond verbally to those, but they do work. I can also fast forward, etc.

Incidentally I don't know how to use a voice command to "stop" play a video and return to the menu. I still need to use a remote control for that.

Thanks for your efforts. 

I did a bit of research on this. There is a line of code in your json rpc call that manages the Unicode. You are set to utf-8. In most cases where only Latin characters are used in file names this should mostly be ok, but I have a bunch of Chinese, Japanese, and Korean titles, it to mention the affectation that some artists have with higher end ASCII characters in their names. I changed this line to ISO-8859-1 and reinstalled the modified plugin. It all works now.  
Oh, disregard my previous reply.
But what approach you suggest here? is there a way to know the encoding upfront? or should I just add failover to try with other encodings? 
Unfortunately its almost impossible to identify the specific piece of data that is problematic. When I looked this error up there have been two schools of thought regarding its correction. 

1. Just change the utf-8 encoding to ISO-8859-1 (but I think that's not always going to work).  I did do this on line 7 of File kodi_rpc.py which now looks like this "return json.loads(xbmc.executeJSONRPC(json.dumps(obj)).decode('ISO-8859-1'))"
2. or do as you suggest - try it first with utf-8 and then failover to ISO-8859-1.

You shouldn't need any other encodings as utf-8 should handle all encoding that is multibyte and ISO-8859-1 is Latin 1 which should handle all single byte ASCII encoding.  It's actually probably the single byte characters that have ASCII above bit 128 specifically all the special diacritics - umlaut, acute, grave, circumflex, etc. Occasionally some movie titles have these but if they are created in Latin-1 instead of utf-8, then Python's utf-8 encoder/decoder can't seem to recognize them. Fair to say though that this is not an encoding problem as the unicode codes for 0-255 bits are the same as Latin-1 codes - this is probably actually a Python problem that has apparently been around for a long time.

Apparently this is a fairly common issue when translating a voice command to a text command.

I did option 1 and it has worked successfully for me all weekend, but option 2 is probably better practice.


RE: Amazon Echo Alexa Video Skill for Kodi - tkislan - 2018-09-10

(2018-09-09, 22:32)hslansky Wrote:
(2018-09-05, 11:19)tkislan Wrote:
(2018-09-04, 14:48)hslansky Wrote: Time zone would be Eastern and the requests were around 19:00.   
I've found the request, but for what you've requested, this is what genres Alexa has sent ..
["Fantasy", "fantasy", "Sci-Fi & Fantasy", "Série de fantasy", "Film de fantasy"] 
Interesting.  I would think that based on those criteria it would at least show the movies in the Fantasy genre.  If I Ask Alexa to show fantasy movies it works.  Is there any way to fix this or is this an Amazon thing? 
I have a new version of addon ready, where I've addressed some issues with genre filtering. I'll post the link today or tomorrow.


RE: Amazon Echo Alexa Video Skill for Kodi - tkislan - 2018-09-10

(2018-09-10, 04:34)pbarr Wrote:
(2018-09-09, 08:18)tkislan Wrote:
(2018-09-08, 12:06)pbarr Wrote: I did a bit of research on this. There is a line of code in your json rpc call that manages the Unicode. You are set to utf-8. In most cases where only Latin characters are used in file names this should mostly be ok, but I have a bunch of Chinese, Japanese, and Korean titles, it to mention the affectation that some artists have with higher end ASCII characters in their names. I changed this line to ISO-8859-1 and reinstalled the modified plugin. It all works now.  
Oh, disregard my previous reply.
But what approach you suggest here? is there a way to know the encoding upfront? or should I just add failover to try with other encodings?  
Unfortunately its almost impossible to identify the specific piece of data that is problematic. When I looked this error up there have been two schools of thought regarding its correction. 

1. Just change the utf-8 encoding to ISO-8859-1 (but I think that's not always going to work).  I did do this on line 7 of File kodi_rpc.py which now looks like this "return json.loads(xbmc.executeJSONRPC(json.dumps(obj)).decode('ISO-8859-1'))"
2. or do as you suggest - try it first with utf-8 and then failover to ISO-8859-1.

You shouldn't need any other encodings as utf-8 should handle all encoding that is multibyte and ISO-8859-1 is Latin 1 which should handle all single byte ASCII encoding.  It's actually probably the single byte characters that have ASCII above bit 128 specifically all the special diacritics - umlaut, acute, grave, circumflex, etc. Occasionally some movie titles have these but if they are created in Latin-1 instead of utf-8, then Python's utf-8 encoder/decoder can't seem to recognize them. Fair to say though that this is not an encoding problem as the unicode codes for 0-255 bits are the same as Latin-1 codes - this is probably actually a Python problem that has apparently been around for a long time.

Apparently this is a fairly common issue when translating a voice command to a text command.

I did option 1 and it has worked successfully for me all weekend, but option 2 is probably better practice. 
But this is not related to voice commands.
Addon is proactively retrieving data from Kodi library, indexes it, and keeps it in the memory. Even before you make any requests. This is to speed up searching through huge libraries.
And this is the place where it fails, when it retrieves data from the Kodi.

I've checked other addons, and what they actually do with invalid characters is, that they just either ignore them, or replace then with something similar. Or some are even trying utf-8, then latin(iso-8859-1), and then utf-8 with ignored invalid characters.

I'll prepare a fix for this today, and post a link for new version.


RE: Amazon Echo Alexa Video Skill for Kodi - tkislan - 2018-09-10

(2018-09-09, 13:38)Snow73 Wrote:
(2018-09-04, 14:18)tkislan Wrote:
(2018-09-02, 13:39)Snow73 Wrote: Hello tkislan, thanks for adding me to the beta.
I have followed the steps but get failed to connect in kodi. In the Amazone app i am linked.
I have filled in my email with and without capital en filled in the secret but still it can not connect?
Here you can find my log https://paste.ubuntu.com/p/BHGBZKhFhG/
13:15:30.959 T:5104 ERROR: 2018-09-02 13:15:30,959 tornado.general WARNING SSL Error on 3568 ('46.101.194.37', 443): [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)
There seems to be an issue with the device you're running Kodi on. There was another user reporting this issue as well.
Unfortunately I don't know what might be causing this issue. But it is something system related (not Kodi, or my addon) 

Thanks for the reply.
I did a fresh install of my HTPC and now its working.
Is there a fraise that i can use to go back to the homepage of Kodi?
For example when i watch a episode and i tell Alexa to stop/pause and then i want to go the the homepage of Kodi. 
Unfortunately no. Alexa interface is really strict about this. Maybe I can look into some scene smart house API, as something similar as light scenes can be probably "abused" here for that use case


RE: Amazon Echo Alexa Video Skill for Kodi - russco - 2018-09-10

@tkislan Thanks for the add, this works perfectly!

This makes life so much easier, and it's really fast too!

I just have one small request.  With Yatse, you can ask "Play the next episode of Game of Thrones" and it will play the next unwatched episode for you.  Is there any way you could implement that?

Thanks again for all your hard work, this is amazing.


RE: Amazon Echo Alexa Video Skill for Kodi - tkislan - 2018-09-10

(2018-09-10, 15:46)russco Wrote: @tkislan Thanks for the add, this works perfectly!

This makes life so much easier, and it's really fast too!

I just have one small request.  With Yatse, you can ask "Play the next episode of Game of Thrones" and it will play the next unwatched episode for you.  Is there any way you could implement that?

Thanks again for all your hard work, this is amazing.
It actually does play next unwatched episode if your ask to play some tv show without specifying any season or episode.


RE: Amazon Echo Alexa Video Skill for Kodi - lostwizard - 2018-09-10

@tkislan: could you add me as well to the beta?

I tried to PM, but I get a “not allowed” page...not sure why that is...

Kind regards,

Marko


RE: Amazon Echo Alexa Video Skill for Kodi - russco - 2018-09-10

Wow it actually does.  Amazing, thank you!


RE: Amazon Echo Alexa Video Skill for Kodi - mederosbg - 2018-09-10

Is this addon still in beta and still able to be joined?


RE: Amazon Echo Alexa Video Skill for Kodi - law94air - 2018-09-10

Well I cant seem to get the Kodi addon to stay connected!  it keeps on looping from connected to disconnected.  Im using the email that Tomas has invited me on which I used to register on the server and I am using the secrets for a device - and still no luck!!!!!!  Any help pleaseHuh


RE: Amazon Echo Alexa Video Skill for Kodi - ebonzl - 2018-09-11

Could you possibly add me please.. have tried PM'ing you but cannot access

Have emailed you

Kind regards,

Ian


RE: Amazon Echo Alexa Video Skill for Kodi - tkislan - 2018-09-12

I've uploaded a new version of addon, which fixes encoding issue when retrieving library data from Kodi (cc @pbarr )
Also, I've improved genre matching a little, so you should be getting better results when requesting movies by genre (cc @hslansky )

DL link:
https://www.dropbox.com/s/63zxg8ier2citya/plugin.video.kodiconnect-0.1.19.zip?dl=1


RE: Amazon Echo Alexa Video Skill for Kodi - hslansky - 2018-09-12

(2018-09-12, 11:16)tkislan Wrote: I've uploaded a new version of addon, which fixes encoding issue when retrieving library data from Kodi (cc @pbarr )
Also, I've improved genre matching a little, so you should be getting better results when requesting movies by genre (cc @hslansky )

DL link:
https://www.dropbox.com/s/63zxg8ier2citya/plugin.video.kodiconnect-0.1.19.zip?dl=1
 Just upgraded to version 0.1.19 and I am still having the same issue with genres.  The request was done at approximately 7:39AM ET.  A request for Fantasy movies works fine, Sci-Fi and Science Fiction return a message from Kodi Connect saying "Nothing Found".


This forum uses Lukasz Tkacz MyBB addons.