I am trying to get a wave file or TTS to play though the speaker. I can play the wave via aplay
aplay -D hw:0,0 chime.wav
Playing WAVE 'chime.wav' : Unsigned 8 bit, Rate 22000 Hz, Mono
My configuration file looks like this:
media_player:
- platform: vlc
name: speaker
arguments: '--alsa-audio-device=hw:0,0'
My scripts.yaml shows up on the overview page with a play button:
test_wave:
sequence:
- service: media_player.play_media
data:
entity_id: media_player.speaker
media_content_id: /home/homeassistant/chime.wav
media_content_type: 'music'
I think everything look right in the log file says:
2018-03-10 22:07:37 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1576840016: Received {'service': 'turn_on', 'id': 18, 'type': 'call_service', 'service_data': {'entity_id': 'script.test_wave'}, 'domain': 'script'}
2018-03-10 22:07:37 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service=turn_on, service_call_id=1972144752-26, service_data=entity_id=script.test_wave, domain=script>
2018-03-10 22:07:37 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service=test_wave, service_call_id=1972144752-27, service_data=None, domain=script>
2018-03-10 22:07:37 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_executed[L]: service_call_id=1972144752-26>
2018-03-10 22:07:37 INFO (MainThread) [homeassistant.helpers.script] Script test_wave: Running script
2018-03-10 22:07:37 INFO (MainThread) [homeassistant.helpers.script] Script test_wave: Executing step call service
2018-03-10 22:07:37 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service=play_media, service_call_id=1972144752-28, service_data=media_content_id=/home/homeassistant/chime.wav, entity_id=media_player.speaker, media_content_type=music, domain=media_player>
2018-03-10 22:07:37 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_executed[L]: service_call_id=1972144752-28>
2018-03-10 22:07:37 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1576840016: Sending {'id': 18, 'success': True, 'type': 'result', 'result': None}
2018-03-10 22:07:37 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_executed[L]: service_call_id=1972144752-27>
2018-03-10 22:07:37 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=script.test_wave, old_state=<state script.test_wave=off; last_triggered=2018-03-10T17:07:25.503100-05:00, friendly_name=test_wave @
2018-03-10T17:03:36.476021-05:00>, new_state=<state script.test_wave=off; last_triggered=2018-03-10T17:07:37.246492-05:00, friendly_name=test_wave @ 2018-03-10T17:03:36.476021-05:00>>
2018-03-10 22:07:37 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1576840016: Sending {'id': 2, 'type': 'event', 'event': {'origin': 'LOCAL', 'time_fired': datetime.datetime(2018, 3, 10, 22, 7, 37, 278040, tzinfo=<UTC>), 'event_type': 'state_changed', 'data': {'entity_id': 'script.test_wave', 'old_state': <state script.test_wave=off; last_triggered=2018-03-10T17:07:25.503100-05:00, friendly_name=test_wave @ 2018-03-10T17:03:36.476021-05:00>, 'new_state': <state script.test_wave=off; last_triggered=2018-03-10T17:07:37.246492-05:00, friendly_name=test_wave @
2018-03-10T17:03:36.476021-05:00>}}}
I have fought this for a few days, what did I miss?