Have mycroft play a sound when started

It would be nice if a picroft version would play a sound when it finishes loading.
If I am having a problem sometimes a reboot will fix the problem and it would be nice to know when the system is ready. I think that on a Mark-1 the time display updates. I run picroft as a headless unit.

Hi @Wally_Fort,

I also use picroft and have wanted this for a while as well so I’ve put together this small skill: zzz-finished-booting-skill. It’s named such that it should be the last skill that loads. When it initiates it announces that Mycroft has finished loading.

Hope you find this useful.

there is a bus message for when skills finish loading, you can just listen to it by doing in initialize

self.add_event("mycroft.skills.loaded", self.handle_boot_finished)

bus message may be different, writing down from memory…

much cleaner and better than naming your skill hoping its the last one to load :smiley:

@Jarbas_Ai Thanks for the tip. I check the docs and it’s mycroft.skills.initialized that is sent after all skills have been loaded. I listed my skill in priority_skills and this method worked a treat thanks. I’ve renamed the skill accordingly: skill-finished-booting.

2 Likes

Hi there @zelmon64 and @Wally_Fort - I see that Fort Wally you’ve already submitted a Skill to the Skills repo for this

If @zelmon64 you’ve also done a similar Skill, can I ask - is there a lot of difference between the two Skills? Should they both be in the mycroft-skills repo? Should we take the best of both Skills and have one “best” Skill available for this?

I also think this is something that is a candidate for a DEFAULT Skill for Picroft. A DEFAULT Skill is a Skill that is loaded by DEFAULT; the user does not have to explicitly load it. We have a process within the Skills Management Team for handling DEFAULT requests, but I also wanted to check with you both first.

I need to reimage my Picroft before testing the Skill you’ve submitted @Wally_Fort, give me a day or two

@KathyReid Oh what a laugh :tired_face::confounded::crazy_face::rofl::dizzy_face:!

Fort Wally’s ready-to-work-skill looks to be the same as what I had before applying Jarbas_Ai’s suggestion to use the message bus above. This means the ready message is given when the skill initializes instead of when all skills have been initialized.

The only other difference I can see is that Fort Wally hasn’t added a licence yet.

There’s obviously no need to have both skills so it’s just the question of whether to upgrade Fort Wally’s skill or use mine and merge our dialog files. I’m probably biased to using mine but what would you rather we do?

I’ll make a PR so that you can compare the two once you have your Picroft up and running.

1 Like

I agree that we don’t need two skills for this. @zelmon64 skill is even better using the message bus to wait until all skills have been initialize.

Thanks @Wally_Fort, are you comfortable if I close off this PR;

Yes. I installed the skill-finished-booting.zelmon64 skill and it works just as intended.

No worries at all, thanks so much for confirming @Wally_Fort