Announcing to multiple echo devices through Node-Red and HA

Hi all,

I am having trouble outputting TTS annoucements to multiple echo devices at the same time in Node-Red. I am trying to get all of my echo devices to announce when my ring alarm state changes (disarmed, armed & home, armed & away). I managed to get the announcement to work for one echo device using the posts by cyberumb16 in the following post:https://community.home-assistant.io/t/output-speech-to-alexa-based-on-state/106596/8, and it announces the state correctly. This is how I have it set up:

Node flow jpeg

Edit Service Call Node jpeg

I have tried various ways of getting all of my echo devices to announce. I made a group in my config for all of my media-player echo entities:

Group config yaml code
group:
  all echos:
    name: All Echos
    view: no
    entities:
      - media_player.office_echo
      - media_player.kitchen_echo
      - media_player.bedroom_echo
      - media_player.bedroom_fire_tv
      - media_player.living_room_fire_tv

This made a group called group.all_echos after I restarted HA, but I cannot use it in Node-Red in the entity id or in the service domain (it is not listed and I get an API error when I type it in the service domain).

I also tried to enter multiple service domains separated by a comma (i.e.: alexa_media_office_echo, alexa_media_kitchen_echo, etc.), but that did not work.

I tried using the generic service domain of “alexa_media” and then putting the multiple devices in the entities id section (i.e.: media_player.office_echo, media_player.kitchen_echo, etc.), but that did not work either.

Can someone offer any assistance? I would greatly appreciate it.

Thanks

I’ve found when making changes to config and adding new entities such as groups that I need to restart the Node Red server to have them appear.

For some reason, restarting home assistant doesn’t seem to restart the node red server.

This way works great:

The Data line:


> {"message":"{{payload}}","data":{"type":"announce"},"target":["media_player.patrick_s_dot","media_player.kitchen_dot"]}

3 Likes

@Patrick123 Thanks! That worked perfectly.

1 Like

I rebooted the raspberry Pi in addition to just restarting Home Assistant, and I could not get the group I created to show up. Not sure why.

Have you tried restarting node red?

You have most probably done some manual changes to your HA Lovelace interface.
On the right hand side click on the 3 dots and select show Unused Entities. You will most probably see it there.
You will need Configure your UI, add in an Entity Card and add your Group’s entities to it.