newbie to all of this, sorry if my post is not detailed enough.
I have installed
tried via the home.mycroft page, it was installed however, mycroft does not understand when i say “play movie xxxxxx”.
msm does not seem to list the skill at all, so i cannot remove it. Then i manuall removed it from the skills directory ( rm ) and rebooted. Installed again, but this time with git clone and followed the instructions, Stll mycroft does not understand.
What am i doing wrong?
A side question, once the skill works, i see there is an auto discovery but what if i would like to specify my kodi boxes, where would i put the ip addresses?
@lbinna, Doesn’t look like that Kodi skill has been updated in a while based on the GitHub. My recommendation would be to dig into the skill log (/var/log/mycroft-skills.log). The log file should give you some indication on if the skill has loaded properly and/or recognizing your intent.
Good Luck!
10:43:28.246 - mycroft.skills.core:load_skill:143 - ERROR - Failed to load skill: kodi_controller
Traceback (most recent call last):
File “/usr/local/lib/python2.7/site-packages/mycroft_core-18.2.5-py2.7.egg/mycroft/skills/core.py”, line 111, in load_skill
skill_descriptor[“name”] + MainModule, *skill_descriptor[“info”])
File “/opt/mycroft/skills/kodi_controller/init.py”, line 8, in
from mycroft.skills.kodi_controller.helpers import *
ImportError: No module named kodi_controller.helpers
10:43:28.256 - SKILLS - DEBUG - {“data”: {“folder”: “kodi_controller”, “id”: 713121794}, “type”: “mycroft.skills.loading_failure”, “context”: null}
10:43:30.474 - SKILLS - DEBUG - {“data”: {}, “type”: “1017122086:TimeSkillupdate_display”, “context”: null}
by linking /opt/mycroft/skills/kodi_controller in /usr/local/lib/python2.7/site-packages/mycroft_core-18.2.5-py2.7.egg/mycroft/skills/ ( i know its an awful workaround ).
Problem now is the following
Response received, but there was an issue. Status: 404
16:02:52.742 - mycroft.skills.core:wrapper:609 - ERROR - An error occurred while processing a request in Kodi Skill
Traceback (most recent call last):
File “/usr/local/lib/python2.7/site-packages/mycroft_core-18.2.5-py2.7.egg/mycroft/skills/core.py”, line 600, in wrapper
handler(message)
File “/opt/mycroft/skills/kodi_controller/init.py”, line 84, in handle_pick_movie_intent
res = GetMoviesBySearch(conn, ‘name’, search)
File “/usr/local/lib/python2.7/site-packages/mycroft_core-18.2.5-py2.7.egg/mycroft/skills/kodi_controller/kodicontrols.py”, line 108, in GetMoviesBySearch
if (res.has_key(‘result’) and
AttributeError: ‘int’ object has no attribute ‘has_key’
looks like i need to dig into GetMoviesBySearch to try to understand what goes wrong there.
Is there a working kodi skill for mycroft?
I attempted to get that skill working once as well with no success. This is something that I would like working as well. There is another one here
That is maintained by forum member @who.is.matt although I think it is more of a remote control skill. I have not used it but he may be able to provide more information.
Cheers!
I took some time to do a bit of digging and it looks like the
res = helpers.make_request(conn, method, json_params)
is expecting something other than an integer back but the helpers.make_request is returning a -1 due to an error. I noticed that the kodi-config.json file location is hard coded in the helpers.py file.
configFile = ‘mycroft/configuration/kodi-config.json’
if hasattr(res, 'status'):
status = res['status']
else:
return -1
if status == '200':
if 'c' in locals():
result = jsonhelpers.json_loads_byteified(c)
if result.has_key('error'):
# TODO: better handle errors returned from kodi
return -1
elif 'result' in locals():
return result
return -1
# TODO: better handle errors caught from request attempt
except socket.error, err:
return -1
except httplib2.ServerNotFoundError:
return -1
The problem seems to be that auto_discover ignores the existing config file and always searches for all hosts with port 8080 in the network and then picks the wrong host, in my case an old havp proxy, hence the 404 and/or 403 status. I simply limited the host range in helpers.py to
addresses = [i[‘addr’] for i in ifaddresses(ifaceName).setdefault(AF_INET, [{‘addr’: ‘No IP addr’}])]
if ifaceName != “lo”:
for xxx in range(12, 13):
try:
now at leat i get an answer from kodi, unfortunately it is not finding the movies. need to check the tcpdump payload
pi@picroft:~/skills/kodi_controller/vocab/en-us $ cat StopKeyword.voc
end
halt the movie
stop the movie
end the movie
close the movie
stop the video
end the video
close the video
pi@picroft:~/skills/kodi_controller/vocab/en-us $ cat PlayPauseKeyword.voc
play the video
play the movie
pause
suspend
suspend the movie
pause the video
pause the movie
and now saying “suspend” pauses and unpauses the movie, and “end” stops the movie.
To recap,
ensure the permissions are sufficient
ensure there is no other services in the network using port 8080 ( or limited the range in discover() )
change keywords for pause and stop so that it does not conflict with skill-playback-control