#Multiple Voice PE External Speaker

1 messages · Page 1 of 1 (latest)

strange chasm
#

I have a voice pe and a box s3. The box has become really unreliable as of late and i'm thinking of getting an additional PE. Currently I'm using this automation to have the other pe broadcast the tts to an external speaker but i dont see a way in this if there is more then one pe. Does anyone have a solution?

alias: Play On External Speakers
description: ""
triggers:

  • trigger: event
    event_type: esphome.tts_ended
    conditions: []
    actions:
  • action: media_player.play_media
    target:
    entity_id: media_player.foyer_speaker
    data:
    media_content_id: "{{ trigger.event.data.url }}"
    media_content_type: music
    announce: false
    mode: queued
    max: 10
novel badgerBOT
#

To format your text as code, enter three backticks on the first line, press Enter for a new line, paste your code, press Enter again for another new line, and lastly three more backticks.
```yaml
example: here
```
Don't forget you can edit your post rather than repeatedly posting the same thing.

strange chasm
#

I should add some context. I have certain automations after a certain time play to different speakers. After hours i have been using the box s3 for the bedroom to play on that speaker. I wish to put another voice pe in there instead

spare cipher
# strange chasm I have a voice pe and a box s3. The box has become really unreliable as of late ...

You can use device_id from event to see which device fired the event, and base the logic on that.
Check the blueprint i have for Respeaker, you may use that, just change the event: https://github.com/formatBCE/Respeaker-Lite-ESPHome-integration/blob/main/readme/tts_uri.md

GitHub

Contribute to formatBCE/Respeaker-Lite-ESPHome-integration development by creating an account on GitHub.

strange chasm
#

`alias: VoicePE-External Speaker
description: ""
triggers:

  • trigger: event
    event_type: esphome.tts_uri
    event_data:
    device_id: e34cf6c05909e92af237fdd48862fa20
    conditions: []
    actions:
  • action: media_player.play_media
    target:
    entity_id: media_player.foyer_speaker
    data:
    media_content_id: "{{ trigger.event.data.uri }}"
    media_content_type: music
    announce: false
    mode: queued
    max: 10`
spare cipher
strange chasm
#

never touched the firmware lol

#

is there a link on your git for that?

strange chasm
#

i'm using default config for voice pe and trying to add certain aspects to the yaml

spare cipher
strange chasm
spare cipher
#

Oh no, don't do that. The hardware is different, so it will brick your device.

#

You may use their YAML first.

#

And then make corresponding changes.

strange chasm
#
  • script.execute:
    id: send_tts_uri_event
    tts_uri: !lambda 'return x;' at the on_tts_end: section?
spare cipher
#

You also want to copy the script itself

#

search send_tts_uri_event in code

strange chasm
#

in your code correct

spare cipher
#

Yes

#

It exists only in my code

strange chasm
#

i've got that, where would i put this in the default?

#

in the scripts section?