Testing and Feedback for Kodi Skill

Hi pcwii,

sorry for the wait. Didn’t see your reply earlier. Thank you for working on this.

My log shows:
2020-05-31 11:23:25.552 | INFO | 790 | kodi-skill_pcwii:parse_music_utterance:349 | Parse Music Received: ask cody to play the album appeal to reason
2020-05-31 11:23:25.556 | INFO | 790 | kodi-skill_pcwii:parse_music_utterance:357 | Primary Regex Key Found
2020-05-31 11:23:25.561 | INFO | 790 | kodi-skill_pcwii:parse_music_utterance:367 | found album
2020-05-31 11:23:25.567 | INFO | 790 | kodi-skill_pcwii:continue_play_music_intent:844 | Parse Routine Returned: (‘appeal to reason’, ‘album’)
2020-05-31 11:23:25.570 | INFO | 790 | kodi-skill_pcwii:search_music_library:318 | searching the music library for: appeal to reason, album
2020-05-31 11:23:25.575 | INFO | 790 | kodi-skill_pcwii:list_all_music:232 | Refreshing Music List!..
2020-05-31 11:24:57.721 | INFO | 790 | kodi-skill_pcwii:search_music_item:307 | found duplicate
2020-05-31 11:24:57.725 | INFO | 790 | kodi-skill_pcwii:search_music_item:307 | found duplicate
2020-05-31 11:24:57.729 | INFO | 790 | kodi-skill_pcwii:search_music_item:307 | found duplicate
2020-05-31 11:24:57.734 | INFO | 790 | kodi-skill_pcwii:search_music_item:307 | found duplicate
2020-05-31 11:24:57.738 | INFO | 790 | kodi-skill_pcwii:search_music_item:307 | found duplicate
2020-05-31 11:24:57.743 | INFO | 790 | kodi-skill_pcwii:search_music_item:307 | found duplicate
2020-05-31 11:24:57.748 | INFO | 790 | kodi-skill_pcwii:search_music_item:307 | found duplicate
2020-05-31 11:24:57.751 | INFO | 790 | kodi-skill_pcwii:search_music_item:307 | found duplicate
2020-05-31 11:24:57.756 | INFO | 790 | kodi-skill_pcwii:search_music_item:307 | found duplicate
2020-05-31 11:24:57.762 | INFO | 790 | kodi-skill_pcwii:search_music_item:313 | Searching and preparing the requested music list took: 0:00:01.463969, seconds
2020-05-31 11:24:57.800 | INFO | 790 | kodi-skill_pcwii:clear_playlist:419 | {“id”:1,“jsonrpc”:“2.0”,“result”:“OK”}
2020-05-31 11:24:57.845 | INFO | 790 | kodi-skill_pcwii:queue_and_play_music:341 | Adding to Kodi Playlist: Whereabouts Unknown, ID: 1001
2020-05-31 11:24:57.869 | INFO | 790 | kodi-skill_pcwii:queue_and_play_music:341 | Adding to Kodi Playlist: Hero Of War, ID: 1002
2020-05-31 11:24:57.894 | INFO | 790 | kodi-skill_pcwii:queue_and_play_music:341 | Adding to Kodi Playlist: Entertainment, ID: 1003
2020-05-31 11:24:57.918 | INFO | 790 | kodi-skill_pcwii:queue_and_play_music:341 | Adding to Kodi Playlist: The Dirt Whispered, ID: 1004
2020-05-31 11:24:57.941 | INFO | 790 | kodi-skill_pcwii:queue_and_play_music:341 | Adding to Kodi Playlist: From Heads Unworthy, ID: 1005
2020-05-31 11:24:57.965 | INFO | 790 | kodi-skill_pcwii:queue_and_play_music:341 | Adding to Kodi Playlist: The Strength To Go On, ID: 1006
2020-05-31 11:24:57.992 | INFO | 790 | kodi-skill_pcwii:queue_and_play_music:341 | Adding to Kodi Playlist: Long Forgotton Sons, ID: 1007
2020-05-31 11:24:58.023 | INFO | 790 | kodi-skill_pcwii:queue_and_play_music:341 | Adding to Kodi Playlist: Savior, ID: 1008
2020-05-31 11:24:58.061 | INFO | 790 | kodi-skill_pcwii:queue_and_play_music:341 | Adding to Kodi Playlist: Re-Education (Through Labor), ID: 1009
2020-05-31 11:24:58.087 | INFO | 790 | kodi-skill_pcwii:queue_and_play_music:341 | Adding to Kodi Playlist: Hairline Fracture, ID: 1010
2020-05-31 11:24:58.115 | INFO | 790 | kodi-skill_pcwii:queue_and_play_music:341 | Adding to Kodi Playlist: Collapse (Post-Amerika), ID: 1011
2020-05-31 11:24:58.142 | INFO | 790 | kodi-skill_pcwii:queue_and_play_music:341 | Adding to Kodi Playlist: Audience Of One, ID: 1012
2020-05-31 11:24:58.178 | INFO | 790 | kodi-skill_pcwii:queue_and_play_music:341 | Adding to Kodi Playlist: Kotov Syndrome, ID: 1013
2020-05-31 11:24:58.200 | INFO | 790 | kodi-skill_pcwii:queue_and_play_music:341 | Adding to Kodi Playlist: Historia Calamitatum, ID: 22215
2020-05-31 11:24:58.228 | INFO | 790 | kodi-skill_pcwii:queue_and_play_music:341 | Adding to Kodi Playlist: Minor Threat (Minor Threat cover), ID: 22223
2020-05-31 11:24:58.251 | INFO | 790 | kodi-skill_pcwii:queue_and_play_music:341 | Adding to Kodi Playlist: Audience of One, ID: 29565
2020-05-31 11:24:58.278 | INFO | 790 | kodi-skill_pcwii:queue_and_play_music:341 | Adding to Kodi Playlist: Elective Amnesia, ID: 29568
2020-05-31 11:24:58.301 | INFO | 790 | kodi-skill_pcwii:queue_and_play_music:341 | Adding to Kodi Playlist: Hero of War, ID: 29572
2020-05-31 11:24:58.324 | INFO | 790 | kodi-skill_pcwii:queue_and_play_music:341 | Adding to Kodi Playlist: Long Forgotten Sons, ID: 29574
2020-05-31 11:24:58.346 | INFO | 790 | kodi-skill_pcwii:queue_and_play_music:341 | Adding to Kodi Playlist: The Strength to Go On, ID: 29577
2020-05-31 11:24:58.388 | INFO | 790 | kodi-skill_pcwii:play_normal:460 | {“id”:1,“jsonrpc”:“2.0”,“result”:“OK”}

Refreshing music list takes a while as you see, my library is rather large (25.000 songs). When i use the emby skill to play music on Mycroft himself (same library) it is really quick, so it must be possible.

Let me know what I can do to help!

Cheers

I see a few things that may be causing the issues. I think I am going to halt development at this point and focus on getting my upgraded cpkodi-skill working. This should play nice with the Mycroft.ai common play framework. I am hoping to streamline the code a bit in this new version as well as add some cool features like “sending library items to a chromecast device” I will also look into adding the episode search / play with this new skill as well. Thank you for testing and I will update the community once I have completed the cpkodi-skill to a point where it is ready for testing.

1 Like

A few months ago, since alexa inclusion, my Firestick v1 is starting to acting weird: it loses wifi connection now and then at least once per day, but usually three or more times, and even sometimes it completely hangs and reboots itself.

I think it’s some kind of planned obsolescence, to force users buy the newer version of Firestick with alexa included. I love firestick, it really rocks and make your tv smarter than a “smartTV”, but I refuse to have a 24h microphone device sending my private conversations to Amazon and USA, so it’s time for privacy concerned users to find an alternative.

I got a Wechip G20 remote controller, to use with Rpi4 and Plasma big screen, but development seems stalled, or very very slow, they didn’t release a single version in almost three months, and the alpha is plagued of bugs, so that’s not an option at the moment.

So, after several years of not using it, I went back to XMBC, or Kodi, and I found I can install addons for the services I use most: plex, netflix, amazon video and Disney+. So yet the interface is not so cool as the firestick, it works better in most cases (Amazon VOD addon seems to fail, but the other addons works).

I was wondering if I could use mycroft inside LibreElec somehow, so I could use the integrated microphone on the remote control to start addons or play a movie. I don’t have at the moment any mycroft on the living room.

@pcwii, my guess is I need to install mycroft itself on LibreElec and then your skill, isn’t it? Or perhaps you plan to create a mycroft addon for kodi which connects to a remote mycroft instance? (I think that’s the way kodi expect their addons to work)

What is your suggestion about this?

@malevolent,
I personally have not installed kodi and Mycroft on the same hardware. I think @j1nx maybe has that working in his Mycroft OS based on what I saw on mattermost. As far as Mycroft and kodi, i am currently doing a rewrite of the kodi skill to support the common Play structure. Development is progressing well and should ne ready for testing in a few days, this new version will support movies, music, tv Shows and the YouTube add-on. In theory I could include support for other add-ons such as Netflix, Disney etc. This will take some investigating. As far as an addon. I was considering this to enhance the capability of my skill interfacing with kodi. I am not sure what has been done as far as a remote client with Mycroft, i will check the forum to see if there is anyone who has made progress in this area. I am curious about the Wechip G20, have you tried this with Mycroft as a microphone?
I will update the community when my cpkodi-skill is ready for community testing.

Unfortunately, LibreElec had capped apt-get, so I cannot install mycroft dependencies (it has python but not pip, and so on). So I need to make some test with picroft images and install kodi on it or try Mycroft OS… I’ll do some tests this night.

An addon for kodi would be great because it would use the microphone on the remote control, instead having a mycroft device around the coach, which is not my case, and I bet many users won’t have it (perhaps Mark II will be beautiful enough to have it on the living and with proper microphones to understand audio when the TV is on), but I really think, a microphone on the remote control is the best approach, as it will always understand you. So, count with my upvote for kodi integration with an addon!

Regarding the Wechip G20, I succesfully tested with plasma big-screen this one. And it works just perfect

But I bought that to control an old Pine64 with kodi for my mother, and this one for me:

As I need to reinstall LibreElec and try picroft or Mycroft OS, first I’ll try big-screen again, to see if that works also with mycroft, is the same chipset, so it should.

You can find the first one on aliexpress a bit cheaper, I bought them of amazon if I had to return it back, but they are quite cheap anyway

@pcwii Just tried later Docooler Wechip W2 remote control with Bigscreen. Micro also works.
Air mouse function in both remotes is a bit… meh. You will find yourself making waves in the air with your arm to move the cursor where you want, I guess is because I have the rpi located a bit far from the TV and it should be near it. But that is useful anyway

I may purchase one of these units for testing. I hope to release my new kodi skill by the end of the week. And may look into an addon as my next project.

1 Like

Cool, that would be really awesome!

Hey, I installed your cpkodi skill, but anything I try to play says "Sorry, I don’t know how to play “movie title”. My kodi is using emby plug in as a media source, so I guess that would be the issue? This skill can only play files added using kodi internal scraper?

I am honestly not familiar with the emby plugin in so Not 100% certain. The cpKodi skill uses the kodi api to request anything that is in the kodi library, my thoughts are if your library shows up under the Movies heading of kodi then it should find it. If you are required to use the emby plugin to access your library then this could be an issue. I will look into emby and see if there is anything that can help. I assume you successfully configured the cpkodi skill in the mycroft.ai device page?

I use Emby too and it works with this skill. If you have it set up correctly you can start testing by starting a movie the old fashioned way (like a caveman) by using your keyboard or remote. And saying: Hey Mycroft, ask kodi to pause the movie. If that works you have everything set up correctly, so you can continue testing. I advise to look at the cli client when testing this if possible to see if mycroft understands. Good luck!

1 Like

Well content does show up under respective categories. I have put in all the information in the config page. Play / pause commands work.

In your skill settings for cpkodi make sure to enable the “Enable Extra Logging” check box
image
watch the cli client and there should be lots of logging for this skill for us to figure out what is going on. I am still actively developing this skill so if we find something amiss I am happy to sort it out.

here is the result:
08:17:16.397 | INFO | 728 | main:handle_wakeword:67 | Wakeword Detected: hey mycroft
Playing WAVE ‘/home/pi/mycroft-core/mycroft/res/snd/start_listening.wav’ : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
08:17:16.857 | INFO | 728 | main:handle_record_begin:37 | Begin Recording…
08:17:19.491 | INFO | 728 | main:handle_record_end:45 | End Recording…
08:17:20.868 | INFO | 728 | main:handle_utterance:72 | Utterance: [‘play 10 things i hate about you’]
08:17:21.178 | INFO | 722 | Playback Control Skill | Resolving Player for: 10 things i hate about you
Removing event mycroft-playback-control.mycroftai:PlayQueryTimeout
Removing event mycroft-playback-control.mycroftai:PlayQueryTimeout
Removing event mycroft-playback-control.mycroftai:PlayQueryTimeout
Removing event mycroft-playback-control.mycroftai:PlayQueryTimeout
08:17:23.656 | INFO | 722 | Playback Control Skill | No matches

Another strange thing is I have 2 Kodi instances running. I have the IP address set up for one, but it pauses video on another… I had it set up previously, but changed to the other. I guess the settings didn’t get updated somewhere…
Will it work if I change the port from 8080 to something else?

Also tested youtube. It does seem to find a video, but still fails to play:
08:19:18.276 | INFO | 728 | main:handle_wakeword:67 | Wakeword Detected: hey mycroft
Playing WAVE ‘/home/pi/mycroft-core/mycroft/res/snd/start_listening.wav’ : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
08:19:18.732 | INFO | 728 | main:handle_record_begin:37 | Begin Recording…
08:19:21.046 | INFO | 728 | main:handle_record_end:45 | End Recording…
08:19:22.377 | INFO | 728 | main:handle_utterance:72 | Utterance: [‘play some queen on youtube’]
08:19:22.707 | INFO | 722 | Playback Control Skill | Resolving Player for: some queen on youtube
Removing event mycroft-playback-control.mycroftai:PlayQueryTimeout
Removing event mycroft-playback-control.mycroftai:PlayQueryTimeout
Removing event mycroft-playback-control.mycroftai:PlayQueryTimeout
08:19:30.434 | INFO | 722 | Playback Control Skill | Playing with: cpkodi-skill.pcwii
08:19:30.933 | INFO | 722 | Playback Control Skill | Audio service status: {}
08:19:31.039 | INFO | 722 | cpkodi-skill_pcwii.kodi_tools.PlayYT:play_yt:8 | play youtube ID: fJ9rUzIMcZQ

And if you start with: Hey Mycroft, ask kodi to… Play 10 things I hate about you

Same result, just Mycroft understands kodi as cody. Maybe I am saying it wrong. Not a native english speaker.

I tried typing it in with the word kodi - same result…

I suspect there are a few things going on here. I will try to clear up the confusion.
@Sjefke it sounds like you may still be running the original kodi-skill. The new cpkodi-skill does not require you to “ask kodi” this was done as the original kodi-skill did not play nice with the common play structure. This was the inspiration for the cpkodi-skill.
@enstain from your logs I can see that a playlist was found for the youtube request cpkodi-skill_pcwii.kodi_tools.PlayYT:play_yt:8 | play youtube ID: fJ9rUzIMcZQ
This will not play unless you have the youtube addon installed as per the instructions on my github. Now for the movie playback. I suspect 2 things causing this issue.

  1. Try saying “play the movie 10 things i hate about you” or “play the film 10 things i hate about you” if you just say “play 10 things i hate about you” the mycroft does not know if “10 things i hate about you” is a movie, song, spotify playlist, etc. using the “film or movie” keyword will help the cpkodi-skill parse the utterance and know that this is a movie being requested.
  2. The second thing is I am not 100% certain how the number “10” will be handled (I will test this). The issue is if your library has the number 10 this may not be found since mycroft may return this as “ten” not “10”. I have a method for checking the library for both words and numbers but I have not tested this thoroughly.
    If you use the cli-client and type “play the film 10 things i hate about you” does it play?
    or if you use the cli-client and type “play the film ten things i hate about you” does it play?
    Thank you for working through this with me, I appreciate the feedback.

No problem. I am just happy I am not left alone to figure these high magic things myself :smiley: I am not a programmer nor fluent in Linux (just started using Ubuntu as a main OS a month ago. Steep learning curve after 20 years of windows :D). I will test this when I get back home. I will try some other movie as well (this one was just the 1st one on the list). I have a youtube plugin installed. It works when I “cast” youtube videos from phone via Yatse (a remote for kodi), so it should work here too? I will double check the settings with your github guide just to be sure. I’ll get back to you in 3 hours :slight_smile:

1 Like

I too was a long time windows user who made the jump to linux about 15 years ago now, and I have never regretted the choice. Being open sourced every problem I encountered was typically solved with a google search. Over that 15 years since I jumped I have learned javascript / python and now work for a company that builds linux based hardware. Amazing how one decision can change so much. Good luck!

1 Like