Which Kodi skill should I install?

@forslund,
Not sure how i didn’t see this before but the only issue was the order of the last 3 lenes of the code sample I provided. I need to set the context before I speak and expect_response.
Thanks for you help

3 Likes

Ah, right. Will make a note to remember this in the future. Thanks for the update!

1 Like

All,
Just in time to watch your favourite Friday the 13th movie I am looking for some testers for my new kodi-skill.
@j1nx and @Luke I am hoping you can give it a try. I have been doing some testing on my system. My configuration is a RPi 3b Picroft, connected via my wifi network. My Kodi station is an RPi 2+.
There is at least one known issue in that It is occasionally generating a socket error when playing a movie that I select from an iterated list. However the movie will play and the skill continues to function normally. This socket error appears to be generated by some other system that I have not been able to pinpoint. I am curious if others encounter the same error. Install the skill using msm from my github repo, once it is installed you should have access to the settings in your mycrot.ai home page. You must set the ip address and port of your system, The username and password are optional depending on your configuration.
Testers and feedback is welcome. Happy movie watching.

1 Like

Great work! Saw your progress on the github the last few days. Amazing.

To late for the 13th movies, but hate those anyway.

Will try to have a go this weekend, but first need to do some tasks from the mrs-list as well.

Few ideas for the conversational section;

  • play previous
  • play first, second, etc
  • play option 1, 2, etc

(makes it a bit more “real” if can use those as well)

Anyhow, will report back as soon as possible.

So It looks like I broke the skill trying to add to the conversation context. I think it is time I learn about branching in Github.:blush:

  • all good now

@forslund, is there a way to set the timeout on the expect_response=True. Also is there a way to generate an event if the expect_response is not responded to? Lastly are the @adds_context automatically removed if the expect_response times out?
I am also randomly getting a socket timeout error in my kodi-skill that I am not sure is connected to my play request or some other sub system as it is not erroring out every time.

12:39:21.111 - SKILLS - DEBUG - {“type”: “recognizer_loop:wakeword”, “data”: {“utterance”: “kelsey”, “session”: “7d28eaa9-03fc-4fde-8938-48fa9bb996ce”}, “context”: null}
12:39:22.642 - SKILLS - DEBUG - {“type”: “recognizer_loop:utterance”, “data”: {“lang”: “en-US”, “utterances”: [“play the movie ant-man”], “session”: “7d28eaa9-03fc-4fde-8938-48fa9bb996ce”}, “context”: {“ident”: “1531658361.09328841242626118”, “client_name”: “mycroft_listener”}}
12:39:22.673 - mycroft.skills.intent_service:send_metrics:247 - DEBUG - Sending metric if opt_in is enabled
12:39:22.704 - SKILLS - DEBUG - {“data”: {“target”: null, “kodi_skillPlayKeyword”: “play”, “intent_type”: “kodi-skill:PlayFilmIntent”, “confidence”: 1.0, “utterance”: “play the movie ant-man”, “tags”: [{“from_context”: false, “entities”: [{“confidence”: 1.0, “data”: [[“play”, “skill_audio_recordAudioRecordSkillPlayVerb”], [“play”, “skill_npr_newsPlay”], [“play”, “kodi_skillPlayKeyword”]], “key”: “play”, “match”: “play”}], “match”: “play”, “key”: “play”, “end_token”: 0, “start_token”: 0}, {“from_context”: false, “entities”: [{“confidence”: 1.0, “data”: [[“movie”, “kodi_skillFilmKeyword”]], “key”: “movie”, “match”: “movie”}], “match”: “movie”, “key”: “movie”, “end_token”: 1, “start_token”: 1}], “kodi_skillFilmKeyword”: “movie”}, “context”: {“target”: null, “ident”: “1531658361.09328841242626118”, “client_name”: “mycroft_listener”}, “type”: “kodi-skill:PlayFilmIntent”}
12:39:22.721 - SKILLS - DEBUG - {“data”: {“name”: “KodiSkill.handle_play_film_intent”}, “context”: {“target”: null, “ident”: “1531658361.09328841242626118”, “client_name”: “mycroft_listener”}, “type”: “mycroft.skill.handler.start”}
12:39:29.981 - mycroft.skills.core:wrapper:601 - ERROR - An error occurred while processing a request in Kodi Skill
Traceback (most recent call last):
File “/opt/venvs/mycroft-core/lib/python3.4/site-packages/mycroft/skills/core.py”, line 592, in wrapper
handler(message)
File “/opt/mycroft/skills/kodi-skill/init.py”, line 124, in handle_play_film_intent
self.play_film_by_search(self.kodi_instance, movie_name)
File “/opt/venvs/mycroft-core/lib/python3.4/site-packages/mycroft/skills/context.py”, line 29, in func_wrapper
ret = func(*args, **kwargs)
File “/opt/mycroft/skills/kodi-skill/init.py”, line 198, in play_film_by_search
self.play_film(kodi_id, results[0][‘movieid’])
File “/opt/venvs/mycroft-core/lib/python3.4/site-packages/mycroft/skills/context.py”, line 43, in func_wrapper
ret = func(*args, **kwargs)
File “/opt/venvs/mycroft-core/lib/python3.4/site-packages/mycroft/skills/context.py”, line 43, in func_wrapper
ret = func(*args, **kwargs)
File “/opt/mycroft/skills/kodi-skill/init.py”, line 190, in play_film
kodi_id.Player.Open(item={‘playlistid’: 1})
File “/opt/venvs/mycroft-core/lib/python3.4/site-packages/beekeeper/api.py”, line 195, in execute
_timeout=self.timeout
File “/opt/venvs/mycroft-core/lib/python3.4/site-packages/beekeeper/comms.py”, line 97, in send
resp = Response(self.action.format(), request(timeout=timeout, **self.output), traversal)
File “/opt/venvs/mycroft-core/lib/python3.4/site-packages/beekeeper/comms.py”, line 64, in request
return REQUEST_OPENER.open(req, timeout=timeout)
File “/usr/lib/python3.4/urllib/request.py”, line 455, in open
response = self._open(req, data)
File “/usr/lib/python3.4/urllib/request.py”, line 473, in _open
‘_open’, req)
File “/usr/lib/python3.4/urllib/request.py”, line 433, in _call_chain
result = func(*args)
File “/usr/lib/python3.4/urllib/request.py”, line 1202, in http_open
return self.do_open(http.client.HTTPConnection, req)
File “/usr/lib/python3.4/urllib/request.py”, line 1177, in do_open
r = h.getresponse()
File “/usr/lib/python3.4/http/client.py”, line 1172, in getresponse
response.begin()
File “/usr/lib/python3.4/http/client.py”, line 351, in begin
version, status, reason = self._read_status()
File “/usr/lib/python3.4/http/client.py”, line 313, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), “iso-8859-1”)
File “/usr/lib/python3.4/socket.py”, line 371, in readinto
return self._sock.recv_into(b)
socket.timeout: timed out
12:39:29.991 - SKILLS - DEBUG - {“data”: {“utterance”: “An error occurred while processing a request in Kodi Skill”, “expect_response”: false}, “context”: {“target”: null, “ident”: “1531658361.09328841242626118”, “client_name”: “mycroft_listener”}, “type”: “speak”}
12:39:30.125 - SKILLS - DEBUG - {“data”: {}, “context”: null, “type”: “skill-date-time:TimeSkillupdate_display”}
12:39:30.131 - SKILLS - DEBUG - {“data”: {“exception”: “timeout(‘timed out’,)”, “name”: “KodiSkill.handle_play_film_intent”}, “context”: {“target”: null, “ident”: “1531658361.09328841242626118”, “client_name”: “mycroft_listener”}, “type”: “mycroft.skill.handler.complete”}
12:39:30.543 - SKILLS - DEBUG - {“type”: “recognizer_loop:record_begin”, “data”: {}, “context”: null}
12:39:31.967 - SKILLS - DEBUG - {“context”: null, “data”: {}, “type”: “recognizer_loop:audio_output_start”}
12:39:33.530 - SKILLS - DEBUG - {“type”: “recognizer_loop:record_end”, “data”: {}, “context”: null}
12:39:33.541 - SKILLS - DEBUG - {“type”: “recognizer_loop:wakeword”, “data”: {“utterance”: “kelsey”, “session”: “7d28eaa9-03fc-4fde-8938-48fa9bb996ce”}, “context”: null}
12:39:34.727 - SKILLS - DEBUG - {“type”: “recognizer_loop:utterance”, “data”: {“lang”: “en-US”, “utterances”: [“stop the movie”], “session”: “7d28eaa9-03fc-4fde-8938-48fa9bb996ce”}, “context”: {“ident”: “1531658373.5081057932496”, “client_name”: “mycroft_listener”}}
12:39:34.771 - SKILLS - DEBUG - {“data”: {“utterances”: [“stop the movie”], “skill_id”: “kodi-skill”, “lang”: “en-US”}, “context”: null, “type”: “skill.converse.request”}

@pcwii Apologies, didn’t even get anywhere close to a keyboard this weekend.

Ahhhhhh great, tried it on saturday, but got no time to debug.

i will try it again soon.

1 Like

Hi @pcwii, sorry for the delay in answering.

Currently there’s no way to modify the timeouts for waiting. It’s a really good idea to have such a feature.

adds_context will remain until it’s timed out which I think is 2 minutes.

I’m not sure why the request times out. This would indicate that the Kodi server doesn’t answer within the expected time. (I’m guessing)

Are you using an existing module for interacting with kodi or are you writing everything from scratch? Can you somehow increase the timeout in the Player object?

@forslund, I am using existing modules. in particular kodipydent which itself uses
beekeeper==0.9.2. I think it is the beekeeper module that is timing out but I don’t know much about this module.