sdesalve / hassio-addons

MIT License
86 stars 21 forks source link

Crashing on mp3 to wav conversion if local domain #100

Open ovargasp opened 2 months ago

ovargasp commented 2 months ago

A few days ago home assistant stopped calling on automation trigger, so today I took some time to try and figure out what was happening with my setup.

I haven't checked in a long time the url of my homeassistant, so I can't tell when they changed the Home Assistant URL validation, and now aparently you can't have https with your IP address, it causes an error: Invalid local network URL You have configured an HTTPS certificate in Home Assistant. This means that your internal URL needs to be set to a domain covered by the certficate. so I changed it to a local domain "ha.lan" so now it works, it creates the link to the tts file but, when the container tries to resolve this address it crashes.

this is what the log shows: [Info] Listening for messages via stdin service call... [Info] Received messages {"call_sip_uri":"sip:101@192.X.X.XXX","message_tts":"Test..."} Converting audio file 'https://ha.lan:8123/api/tts_proxy/92da2009659e09eaa34ae1fd630a8855fcfe1a58_es_-_google_translate.mp3'... [cont-finish.d] executing container finish scripts... [cont-finish.d] 99-message.sh: executing... [cont-finish.d] 99-message.sh: exited 0. [cont-finish.d] done. [s6-finish] waiting for services. [s6-finish] sending all processes the TERM signal.

sdesalve commented 2 months ago

post here your logs...

ovargasp commented 2 months ago

post here your logs...

Sorry my bad, I wasn't finished... and posted by mistake...

so I when through the code, and noticed that that last log entry is before you call the convert to wav command, the thing is that the container can't resolve ha.lan (it's local), and it crashes... what I did to make it work was to edit the container hosts file to add an entry for ha.lan and now it works, I know it's not pretty, nor permanent, but I just wanted to let you know in case you can think on something to make it work.