- platform: vlc
name: HA Speaker
arguments: '--alsa-audio-device=hw:0,0'
… must be the right config.
But still no audio on Home Assistant… I don’t remember after doing “what” the audio stop working, but I’m sure that before of a “certain point” my audio was playing.
I’ve had no issues with my tts setup since I sorted it out all those months ago. Can only think something else might be affecting it that was changed in the config, especially as it works directly on the pi.
Okay I’ve just saw, googling, that the SSL break the TTS service due to NAT loopback restriction.
But in my case (I’ve a FRITZ!Box 7490) my router support NAT loopback.
I’m able to call Home Assistant with external name (https://www.******.online) from within my internal network but the TTS still not work.
If I disable the SSL all works good.
that is why I ask you to put base_url without https://www
You still can use with ssl by change the base_url to ddns:8123 without https://www <== let your router do this part for port forward 443 to 8123
Or you can just put the local ip:8123 in base_url. You still can acess via https because it has to pass through your router setting.
That’s a bit frustrating. I know I was so happy to get it working. But you had it working, right? it’s just messed up and stopped since something has happened.
Best to go back through everything you’ve done, regardless of how much it would seem to have nothing to do with the audio and remove those new things one by one and test.
Hi guys,
For me, my mistake was didn’t restart my RPi after install vlc and add group permissions to homeassistant user. After restart my RPi everything works.
I hope that this can be helpful to anybody that can find themselves in the same situation.
Good point, you have to have permissions for the homeassistant user but seeing as Fulvi_Igor seemed to have it working previously that shouldn’t be the issue one would think
Im having a hard to getting the data template to work with TTS… here is my automation… I can get audio if I do the same but with only one argument… {“message”: “Test”}. Can you see anything wrong here @lambtho@dingleydell
- id: welcome_message
alias: Welcome Message
initial_state: 'on'
trigger:
- platform: state
entity_id: sensor.keys
from: 'not_home'
to: 'Bedroom'
action:
service: tts.amazon_polly_say
data_template:
entity_id: media_player.boss
data_template:
message: >-
{{ [
"Good night. " ,
"Good evening. " ,
"Sweet dreams. " ,
"See you tomorrow. " ,
"Have a wonderful night. " ,
"See you soon. "
] |random }}'
I just don’t get it why Google TTS sound different in home assistant and not like in my phone. Anyone knows?
It uses too much intonation, it’s annoying
Probably because of space and indent. Copy and paste this will do. And one more thing trigger is it normal from not_home to bedroom instead of not_home to home, or home to bedroom. Sorry to ask about this.
- id: welcome_message
alias: Welcome Message
initial_state: 'on'
trigger:
- platform: state
entity_id: sensor.keys
from: 'not_home'
to: 'Bedroom'
action:
service: tts.amazon_polly_say
data_template:
entity_id: media_player.boss
data_template:
message: >-
{{ [
"Good night. " ,
"Good evening. " ,
"Sweet dreams. " ,
"See you tomorrow. " ,
"Have a wonderful night. " ,
"See you soon. "
] |random }}
I believe the state name ‘Bedroom’ comes from my happy bubbles device settings… so if you have multiple rooms it should feed in the device location name instead of just ‘home’
So, total noob here, in order to run these two steps:
First you have to install a media player. I use VLC: sudo apt-get install vlc-nox
Then add Hass to audio group: sudo usermod -a -G audio homeassistant
do I have to have hassbian on my pi as well or can I do it with an SD card flashed with only hassio? Basically, I’m trying to setup a TTS to my local HDMI speaker and so want to use VLC player to play the media for me.