anyone who can share some experience with attempting to have some dedicated doorbell-sound.mp3 be played via amplipi?
my home domotica can trigger the required code that talks amplipi-rest-api to get the following effect
capture current config
mute all
play mp3 on all speakers
go back to previous config and happily play along
any advise, suggestions or tips welcome
NOTE: I have the mp3 up on a local http server and configured as an internet radio on the amplipi - would be nice though if I could āhideā it from the other inputs (that or have some hierarchy in the input selection)
Have you tried looking into the announce endpoint? It does all of this in one API call, the zones to play the sounds on can be specified but by default it plays on all zones, the sound file is expected to be given as a url.
Care to explain a little more about your doorbell setup? I wasnāt expecting to see python.
Sure.
Here in Belgium Niko is a well known and appreciated brand for home-electricity wall mount power-plugs, switches, ā¦ since many generations. Their contemporary offering includes a good and affordable āhome-automationā solution called niko home control
It is proprietary, but with some open api support and gateways to other brands and products. Most importantly they allow triggering āvirtual devicesā which generate events that can be trapped through the nhc2-coco python library ā with open code at github
The aim is to develop a simple local running service (I have small server running docker) that just listens to these events to trigger some neat effects involving the amplipi:
for starters this very thing ā have the doorbell push trigger the /announce of some dingdong.mp3
in some zones (the rooms with built-in speakers) Iāve foreseen these 6-function-controlpads that should be driving some useful effects like volume up/down, next/prev source, room-preset, mute/play, ā¦
finally I have an āall shutā switch in the house that not only should close the doors, shut the lights but also mute-all zones
to avoid boredom after the above I am open to wild suggestions: joking, but all should be possible (e.g. bird-song-announcements when the sun rises, family-birthday announcements, personalized text-to-speech-train-commute-delay-messages, and reversely ā have the lights flicker - or romantically dimmed ? when certain spotify-tracks are played ā¦ )
So yeah, you might expect some more questions from me while I get through this little project
Thx already for the fast responses, will do my best to document my progress, share alike, and pass the occasional suggestion, bug-report or PR via githubā¦
I went ahead and tried it again today and it seems like itās working without the need for the source_id. I could have sworn I was doing everything the same but it is working now with both paths: