Mycroft Community Forum

How to detect that music is being played

I want to light an LED when Mycroft is playing music through the AudioService class. How can I detect this? Is there a message on the bus that I can use?

I have a Dev-kit(Mark2) there is an unused J9 that has some GPIO on it. Haven’t gotten very far on a GPIO skill for the MarkII - not sure where an LED would be on any of the other “enclosures”. The Production unit doesn’t sound like it will be easily accessible or available…
Neat I idea - might make it an ‘enhancement’ issue on one of the skills, but not sure what one…

I managed to figure out which bus messages to monitor - see the code I’ve put in this skill:

As well as a pushbutton, this skill controls the LED as I wanted, lighting when audio is being played.