Release Audio Profiles (for Kodi 18 and later)
(2022-10-19, 16:53)Alex_1977 Wrote: Hi everyone !

I use a Raspberry Pi4 with a justboom DAC Hat and Leia, works great.
I have a tube amp that I switch on and off with a relay and a GPIO of the Pi.
I have two ways to do that : the first with an extral unlatched swtich connected to a GPIO and the second with my phone. Both exectutes some python scripts, no problem.
Now a want the use the audioprofiles addon to do it automatically. I can switch off with the idle event, that's ok.
But to turn it on, I want to execute the task only when audio files are played back, not with movies for example.
What's the best way to do that ?

Regards.
There isn't anyway to do this in Audio Profiles.  If you want to modify the code, take a look at resources/audioprofiles.py.  Specifically look at the _auto_switch_content function.  In there is most of the logic for figuring out what to do with the various kinds of things that can be playing.  You would probably need to either add some code there for your specific thing or at least use that as the start for tracing the logic to figure out where to insert you code to turn on the amp.
Reply


Messages In This Thread
RE: Audio Profiles (for Kodi 18 and later) - by pkscout - 2022-10-19, 23:56
Logout Mark Read Team Forum Stats Members Help
Audio Profiles (for Kodi 18 and later)0