Mycroft-naptime unmute - default volume?

Hi!

I really hope this is the correct category for this post - if not, I hope you’ll bear with me, as this is also my first post on here :slight_smile:

I’m pretty new to Mycroft (about a week by now), and so far I’m really loving the entire concept and the endless possibilities for one with the ideas and the will. I have already come a long way towards customizing it to serve my needs.

However, I’m having some trouble with Naptime that’s bothering me, since I use it all the time (TV noise and all that). The Skill itself is working great, it’s both muting and unmuting, but everytime it unmutes, it sets the volume in Alsamixer to 55% instead of what it was before going to sleep.

  • Tried various levels (ranging from 70-100%).
  • Set volume via Alsamixer.
  • Set volume via the Volume Skill.
  • Searched through various code (both Mycroft core and the Skill itself) to find the source of this volume level, but with no luck.

So, now I turn to here for aid! It’s really annoying because Mycroft is super hard to hear at 55%. If you need any other information from me, let me know! There aren’t really any logs, because I don’t suppose there’s an actual error going on.

Many thanks in advance!

1 Like

Great question, and good description of your problem.

Looking into the skill code, it tells me it send message to mycroft by the messagebus to mute and unmute

   self.bus.emit(Message('mycroft.volume.mute',
                                      data={"speak_message": False}))

So it isnt the skill that deside to use 55% after unmute. Acording to the docs about the mesagebus the skilll mycroft-volume-skill is responsible for take action on volume messages on the bus.
So looking into that skill code, it is clear that it sets the colume to default after unmute.

self.mixer.setvolume(self.__level_to_volume(self.default_level)

and default_level comes from the getting it from config

    self.default_level = self.config.get('default_level')

So what I can fugure out is that if you add settings for VolumeSkil in mycroft.conf, that settings will be used when unmuting

this is the relevant ssettings

"VolumeSkill": {
    "default_level": 6,
    "min_volume": 0,
    "max_volume": 83
  }

Maybe someone should add a save current level before mute, and use that instead. That could be added in the volume-skill

3 Likes

Ugh, the only place I didn’t look, was the volume-skill!

Anyway, thank you for a really nice and descriptive answer, it definitely helps me solve the issue! I might have a go at adding the code to save current volume level myself, if I can figure out how to operate GitHub properly and so on…

By the way, nice to see a fellow Dane around here, and with such a great first name too! :smiley:

2 Likes

Ohhh yes - Andreas is a good name :slight_smile:
And nice to have one more Dane in the community. I am actualy working on getting mycroft core translated to Danish. And last night he did get most of it right. But there is lot to work on regarding to translate……

And do look into how to change the volume-skill, and try to make a PR. It is Åke responsible for that skill, and Åke although he is swedish, is a nice guy :wink:

I would think a minimum of just saving the volumelevel in the settings.json when muting and use that when unmuting would be right. So please try, and please ask here or in the mattermost channels and I am sure you can get it done. And then learn how to do the GitHub stuff :slight_smile:

1 Like