There are some changes in 2022.5 that I was very excited to see! Unfortunately, when I updated to that version, I found that the tts integration was no longer working. I’ve looked through the changelog and docs (and there are related breaking changes), and have not been able to figure out how I need to adjust my configuration so that our tts notifications will work on version 2022.5. tts does work with our setup on version 2022.4.7.
I am running HomeAssistant Container.
Dockerfile:
FROM ghcr.io/home-assistant/raspberrypi3-homeassistant:2022.4.7
COPY . /.
RUN apk update && apk add --no-cache vlc
EXPOSE 8123 1883
With configuration.yaml options internal_url and external_url set (and working as expected in version 2022.4.7 and earlier), and the following set (and working as expected in version 2022.4.7 and earlier)
tts:
- platform: picotts
language: en-US
cache: false
notify:
- name: tts
platform: rest
resource: "${EXTERNAL_URL}/api/services/tts/picotts_say"
method: POST_JSON
headers:
Authorization: HASS_TOKEN_REST
content-type: application/json
data_template:
message: "{{message}}"
entity_id: media_player.vlc
language: en-US
This works beautifully in versions 2022.4.3 and earlier. But with version 2022.5, I am encountering an error:
12.05.22 14:53:31 (-0400) homeassistant [efe46080] main input error: Your input can't be opened
12.05.22 14:53:31 (-0400) homeassistant [efe46080] main input error: VLC is unable to open the MRL 'media-source://tts/picotts?message=Door+open&language=en-US'. Check the log for details.
Here are the full details:
12.05.22 14:53:30 (-0400) homeassistant 2022-05-12 18:53:30 DEBUG (MainThread) [homeassistant.components.http.auth] Authenticated 172.17.0.8 for /api/services/notify/tts using bearer token
12.05.22 14:53:30 (-0400) homeassistant 2022-05-12 18:53:30 DEBUG (MainThread) [homeassistant.components.http.view] Serving /api/services/notify/tts to 172.17.0.8 (auth: True)
12.05.22 14:53:30 (-0400) homeassistant 2022-05-12 18:53:30 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=notify, service=tts, service_data=message=Door open>
12.05.22 14:53:30 (-0400) homeassistant 2022-05-12 18:53:30 DEBUG (Recorder) [homeassistant.components.recorder] Processing task: EventTask(event=<Event call_service[L]: domain=notify, service=tts, service_data=message=Door open>)
12.05.22 14:53:30 (-0400) homeassistant 2022-05-12 18:53:30 DEBUG (SyncWorker_4) [paho.mqtt.client] Sending PUBLISH (d0, q0, r0, m157), 'b'simplyhome.hass.event.dbb45b5111d98d67bd2a153844b3c336'', ... (126 bytes)
12.05.22 14:53:30 (-0400) homeassistant 2022-05-12 18:53:30 DEBUG (MainThread) [homeassistant.components.mqtt] Transmitting message on simplyhome.hass.event.dbb45b5111d98d67bd2a153844b3c336: '{"event_type": "call_service", "event_data": {"domain": "notify", "service": "tts", "service_data": {"message": "Door open"}}}', mid: 157
12.05.22 14:53:31 (-0400) homeassistant 2022-05-12 18:53:31 DEBUG (MainThread) [homeassistant.components.http.auth] Authenticated 172.17.0.8 for /api/services/tts/picotts_say using bearer token
12.05.22 14:53:31 (-0400) homeassistant [efe46080] main input error: Your input can't be opened
12.05.22 14:53:31 (-0400) homeassistant [efe46080] main input error: VLC is unable to open the MRL 'media-source://tts/picotts?message=Door+open&language=en-US'. Check the log for details.
12.05.22 14:53:31 (-0400) homeassistant 2022-05-12 18:53:31 DEBUG (MainThread) [homeassistant.components.http.view] Serving /api/services/tts/picotts_say to 172.17.0.8 (auth: True)
12.05.22 14:53:31 (-0400) homeassistant 2022-05-12 18:53:31 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=tts, service=picotts_say, service_data=message=Door open, entity_id=media_player.vlc, language=en-US>
12.05.22 14:53:31 (-0400) homeassistant 2022-05-12 18:53:31 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=media_player, service=play_media, service_data=entity_id=['media_player.vlc'], media_content_id=media-source://tts/picotts?message=Door+open&language=en-US, media_content_type=music>
12.05.22 14:53:31 (-0400) homeassistant 2022-05-12 18:53:31 DEBUG (SyncWorker_0) [paho.mqtt.client] Sending PUBLISH (d0, q0, r0, m158), 'b'simplyhome.hass.event.dbb45b5111d98d67bd2a153844b3c336'', ... (185 bytes)
12.05.22 14:53:31 (-0400) homeassistant 2022-05-12 18:53:31 DEBUG (Recorder) [homeassistant.components.recorder] Processing task: EventTask(event=<Event call_service[L]: domain=tts, service=picotts_say, service_data=message=Door open, entity_id=media_player.vlc, language=en-US>)
12.05.22 14:53:31 (-0400) homeassistant 2022-05-12 18:53:31 DEBUG (Recorder) [homeassistant.components.recorder] Processing task: EventTask(event=<Event call_service[L]: domain=media_player, service=play_media, service_data=entity_id=['media_player.vlc'], media_content_id=media-source://tts/picotts?message=Door+open&language=en-US, media_content_type=music>)
12.05.22 14:53:31 (-0400) homeassistant 2022-05-12 18:53:31 DEBUG (MainThread) [homeassistant.components.mqtt] Transmitting message on simplyhome.hass.event.dbb45b5111d98d67bd2a153844b3c336: '{"event_type": "call_service", "event_data": {"domain": "tts", "service": "picotts_say", "service_data": {"message": "Door open", "entity_id": "media_player.vlc", "language": "en-US"}}}', mid: 158
12.05.22 14:53:31 (-0400) homeassistant 2022-05-12 18:53:31 DEBUG (SyncWorker_1) [paho.mqtt.client] Sending PUBLISH (d0, q0, r0, m159), 'b'simplyhome.hass.event.dbb45b5111d98d67bd2a153844b3c336'', ... (264 bytes)
12.05.22 14:53:31 (-0400) homeassistant 2022-05-12 18:53:31 DEBUG (MainThread) [homeassistant.components.mqtt] Transmitting message on simplyhome.hass.event.dbb45b5111d98d67bd2a153844b3c336: '{"event_type": "call_service", "event_data": {"domain": "media_player", "service": "play_media", "service_data": {"entity_id": ["media_player.vlc"], "media_content_id": "media-source://tts/picotts?message=Door+open&language=en-US", "media_content_type": "music"}}}', mid: 159
There must be some additional change that needs to be made to make this compatible with version 2022.5, but other than being sure to remove BASE_URL and use INTERNAL_URL and EXTERNAL_URL instead (which was already done and working for version 2022.4.7), I didn’t see anything in the changelog indicating what needs to be changed.
I’d greatly appreciate any help.
Thank you!
Kathryn Forsythe