Notification if something is streamed

Hey

I‘m a switcher from picore player.
My main goal is connecting my mobiles and the Tv to my older, active soundsystem.
Currently I have to switch the subwoofer manually on and off. It would be cool if I get a notification to my smart home (e.g. http request) to switch on the socket where sub is plugged in.

Hope somebody can help and support.

Regards
Martin

Hi and welcome to the forums!

I’m not sure if I understood exactly the issue here, so apologies in advance if something isn’t correct for your use case, but if your smart home system has an API available you could use it to switch the subwoofer’s socket on whenever it’s appropriate (e.g. when you receive some data from the audio stream, from a power-on event on a local-network web interface, a bluetooth service, …).
So the general process of your application, regardless of the language you choose, would be:

  • CTA to power on the socket
  • signal your smart-home to power on the subwoofer’s socket
  • start streaming audio to the device (it seems like you already have a way to do this though, so you don’t have to reinvent the wheel in this case)

If you need anything else, please add any more information and issues so we can try to figure it out.

First, thank you for the welcome and fast response. :+1:
Well, my issue is, that balena should send a request to my smart home base, that some music is streamed.
Switching on the socket via the smart home App is a way, but not straight forward for us.
Automations is the key, like ifttt. If music is running on balena device then send a request to the base. …

Hope this made it a little bit clearer.

BTW, that’s not really an api, it can send and receive http/tcp/udp requests.

Aha, thanks for the explanation Martin. So, it does sound like those functions are technically possible, but is not something that balenaSound has natively built in. If you know precisely what you are building, you could always fork the balenaSound repository, and start making your changes. :slight_smile:

Is there a tutorial how to customize the docker-compose and bring the modified OS to the pi?

Hello Martin, find here a blog post with some examples about how to modify the docker-compose https://www.balena.io/blog/two-projects-one-device-turn-your-raspberry-pi-into-a-multitool/

Once you have the modified docker-compose, you can do balena push <your-app>.

If you need more help, feel free to contact here