Notification sounds

Is it possible to add own .wav sounds to HA? if yes in what directory?

you might be able to do it with a python script, if there is a sound driver of some type exposed.

okay, I thought there was a directory somewehere on the Pi where all the built in .wav sounds were located.

this might help

To play single sound files I use shell_command.

Can you give an example?

in my configuration.yaml I have:

shell_command: !include shell.yaml

then:

alarm_sound_doorchime: 'play --volume .15 /home/homeassistant/.homeassistant/media/sounds_alarm/door_open.wav'

call in an automation like:

- service: shell_command.alarm_sound_doorchime`

thanks :slight_smile:
Is the second part also placed in the configuration.yaml?
Is “alarm_sound_doorchime” the media_player used for playback in the second part? If yes what kind of player is it?

You need to add it under the shell_command platform like this

I have mine split into a separate file but you can just put the whole thing in your configuration.yaml

yes but what is “alarm_sound_doorchime”?.. a media player?

it is the name I have given the shell_command

So it gets called by using service shell_command.alarm_sound_doorchime

It runs this command

play --volume .15 /home/homeassistant/.homeassistant/media/sounds_alarm/door_open.wav

okay but what media is used for playback? Where is the player for this defined?

You can install vlc on your pi and just plug in some speakers

okay thanks… i will try :slight_smile:

Here is the steps to install vlc (for text-to-speech initially, but the first part is the same)
On the plus side, if you proceed like that, you can use tts as well with notifications :smiley:

If you have bluetooth speaker, you can link the with HA also as media player and you can play your notifications direcly on them, without having to install vlc and speakers with your pi

thanks again

Hey guys, does it still work please? because i try so many time and never work for me :frowning: