Reloading skills / skills watch

Hi,
I am running the latest version of PiCroft on my Raspberry PI 3.
I placed my new skill under /home/pi/skills folder.
When I change my python scripts, the skill doesn’t reload, and I receive the same result as the code I wrote there before the change.
What helps to reload them is a restart to the machine (which is very time consuming).

  1. I saw on your documentation that you have a feature which watches file system for changes and make sure to reload the skill again. does that work against the py scripts or only the voc/dialog files? Do you know about any issue with this feature? maybe I should place my skill in another directory?

  2. What command can I use in order to restart mycroft service?
    I saw that you have mycroft.sh scripts but I don’t see them on the device.

  3. I tried to delete a skill from the directory, but it came back. why (and how?)?
    is there any msm command to remove a skill?

Thanks,
Netanel Wachshtein.

1 Like

Hello!

1.) We do have auto reload but i think that may be currently broken on your picroft version if it is not auto reloading.
2.) You can restart services by doing sudo service mycroft-* restart. mycroft-* will restart all services. to only restart the skill, use mycroft-skills in place of mycrot-*.
3.) For this one I am not sure and will have to come back to you on this one.

hope this helps

  1. if you remove a 3rd party skill, it goes away. If you delete a “default” skill it will be reloaded when the machine reboots or updates. At this time, you can’t get rid of a default skill.

I’ve created a skill for this task. Since the auto-reload doesn’t work at the moment (last I checked anyway), my skill allows for restarting the mycroft-skills service or rebooting the system. I use it to tell mycroft to reload the skills after I modify and re-upload skills that I’m working on.

If you use it, make sure to add an /etc/sudoers entry for user “mycroft” to allow either all sudo commands, or just /bin/systemctl and /sbin/reboot.

Example voice commands are:
“reload skills”
“reboot system”

1 Like