Home Assistant Audio Responses

blargin ... Home Assistant -

Home Assistant Audio Responses

I wanted to have my Home Assistant setup to be able to "talk" to me about what was going on. So if the front door opened it would say "Front door opened".

I am running Home Assistant in a linux VM on a NAS. So I did not have a direct speaker connection. You could get some USB to audio dongle, and directly plug in the audio device of your choice. I had an old bluetooth dongle laying around so I decided to try that route.

The goal is to have the ability to program Home Assistant to give you audio feedback of anything you would like. This setup is that start of what would allow you to have alerts such as

  • Back door opened
  • Front door closed
  • Motion detected in the dungeon
  • Super secret drawer has been opened
  • Rover has left the yard
  • Water in the basement

Steps to get audio notifications are:

  1. get TTS ( text to speech ) "say" ability setup on Linux using
    apt-get install gnustep-gui-runtime
  2. Add an automation alias for the event, something like:
              alias: Test Sensor Closed Auto
              initial_state: True
              hide_entity: False
              trigger:
                platform: state
                entity_id: binary_sensor.sensor_name
                state: 'off'
              action:
                service: shell_command.play_test_sensor_sound
            
  3. Create the Shell Comment entry in your config file:
            shell_command:
              play_test_sensor_sound: /usr/bin/say "Sensor is off"
            

Thats all there is to it. Not too shabby.

Tags

  • Home automation
  • Home Assistant
  • hardware

Add Comment