In Node-RED I’ve started encountering automation errors with TTS (Alexa Media Player) and Google Home (MP3 sound effects). I believe the problem occurs both with grouped media players (Alexa and Google Home) as well as flows using template nodes to construct output. I suspect the problem began with the Node-RED upgrade to 11.0.0 but only noticed the issue last night with 11.0.1.
Google Home (which I use for MP3 sound effects)
= = = = = = = = = = = =
In Developer Tools I see
group.downstairs_wake_googles
entity_id: media_player.family_room_google, media_player.master_bedroom_google
order: 74
friendly_name: Downstairs Wake Googles
Those grouped entities used to be available as a target entity in the Node Red Call Service Node. That group is no longer selectable there.
So this flow, which sends an MP3 sound effect to a single Google device, works:
[{"id":"6a9cf30d2a417888","type":"inject","z":"922c617359cdf6d0","name":"Google Home MP3","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":170,"y":480,"wires":[["c4cd7732e5ca71a5"]]},{"id":"c4cd7732e5ca71a5","type":"function","z":"922c617359cdf6d0","name":"msg_func","func":"msg.payload =\n {\n \"data\":{\"media_content_id\":\"https://[redacted].duckdns.org:8123/local/audio/hween/01.mp3\",\"media_content_type\":\"audio/mp3\"}\n }\nreturn msg;","outputs":1,"noerr":0,"x":340,"y":480,"wires":[["bbdfff2d8bb89841"]]},{"id":"bbdfff2d8bb89841","type":"api-call-service","z":"922c617359cdf6d0","name":"MBR Google","server":"36944218.4145ce","version":4,"debugenabled":false,"domain":"media_player","service":"play_media","target":{"entityId":["media_player.master_bedroom_google"],"areaId":[],"deviceId":[]},"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","x":490,"y":480,"wires":[[]]},{"id":"36944218.4145ce","type":"server","name":"Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30}]
This flow does not work:
[{"id":"168afc25c160dca8","type":"inject","z":"922c617359cdf6d0","name":"Downtstairs Googles MP3","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":190,"y":560,"wires":[["246e393bee5c1329"]]},{"id":"246e393bee5c1329","type":"function","z":"922c617359cdf6d0","name":"msg_func","func":"msg.payload =\n {\n \"data\":{\"media_content_id\":\"https://[redacted].duckdns.org:8123/local/audio/hween/01.mp3\",\"media_content_type\":\"audio/mp3\"}\n }\nreturn msg;","outputs":1,"noerr":0,"x":380,"y":560,"wires":[["6b6be1ae6c81cc1d"]]},{"id":"6b6be1ae6c81cc1d","type":"api-call-service","z":"922c617359cdf6d0","name":"Downstairs Googles","server":"36944218.4145ce","version":4,"debugenabled":false,"domain":"media_player","service":"play_media","target":{"entityId":["group.downstairs_wake_googles"],"areaId":[],"deviceId":[]},"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","x":560,"y":560,"wires":[[]]},{"id":"36944218.4145ce","type":"server","name":"Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30}]
Alexa TTS (which I use for announcements)
= = = = = = = = = = = =
In Developer Tools I see
group.alexa_wake_downstairs
entity_id: media_player.master_bedroom_echo, media_player.family_room_echo
order: 56
friendly_name: AM Alexa Downstairs Alarms
This works (single entity):
[{"id":"0775f8a57ecb829e","type":"inject","z":"922c617359cdf6d0","name":"Alexa TTS (no \"ding\") - single","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":200,"y":160,"wires":[["fa99b483d58d2920"]]},{"id":"fa99b483d58d2920","type":"api-call-service","z":"922c617359cdf6d0","name":"Test","server":"36944218.4145ce","version":4,"debugenabled":false,"domain":"notify","service":"alexa_media","target":{"entityId":[],"areaId":[],"deviceId":[]},"data":"{\"message\":\"Testing the tts function on the family room echo.\",\"data\":{\"type\":\"tts\",\"method\":\"all\"},\"target\":\"media_player.family_room_echo\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":390,"y":160,"wires":[[]]},{"id":"36944218.4145ce","type":"server","name":"Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30}]
This fails with an API error (grouped entities):
[{"id":"753287c077f86a13","type":"inject","z":"922c617359cdf6d0","name":"Alexa TTS (no \"ding\")","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":180,"y":200,"wires":[["3765324511a9ab75"]]},{"id":"3765324511a9ab75","type":"template","z":"922c617359cdf6d0","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{\"data\":{\"message\":\"This is a test of TTS with a template node.\",\"data\":{\"type\":\"tts\",\"method\":\"all\"},\"target\":\"group.alexa_wake_downstairs\"}}","output":"str","x":360,"y":200,"wires":[["21dfb3b0c16fe3a9"]]},{"id":"21dfb3b0c16fe3a9","type":"api-call-service","z":"922c617359cdf6d0","name":"Downstairs Wake Group","server":"36944218.4145ce","version":4,"debugenabled":false,"domain":"notify","service":"alexa_media","target":{"entityId":[],"areaId":[],"deviceId":[]},"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":550,"y":200,"wires":[[]]},{"id":"36944218.4145ce","type":"server","name":"Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30}]
This fails with no error (grouped entities):
[{"id":"38b0859440b77d4f","type":"inject","z":"922c617359cdf6d0","name":"Alexa TTS (no \"ding\")","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":180,"y":240,"wires":[["7fcb836c72b94ea1"]]},{"id":"7fcb836c72b94ea1","type":"api-call-service","z":"922c617359cdf6d0","name":"Downstairs Group","server":"36944218.4145ce","version":4,"debugenabled":false,"domain":"notify","service":"alexa_media","target":{"entityId":[],"areaId":[],"deviceId":[]},"data":"{\"message\":\"Test announcement to the downstairs Alexa wake group.\",\"data\":{\"type\":\"tts\",\"method\":\"all\"},\"target\":\"media_player.alexa_wake_downstairs\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":390,"y":240,"wires":[[]]},{"id":"36944218.4145ce","type":"server","name":"Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30}]
This also fails with no error (grouped entities):
[{"id":"1971062eb1fb99e4","type":"inject","z":"922c617359cdf6d0","name":"Alexa Announcement (\"ding\")","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":200,"y":280,"wires":[["a07fa7edce14e693"]]},{"id":"a07fa7edce14e693","type":"api-call-service","z":"922c617359cdf6d0","name":"Downstairs Group","server":"36944218.4145ce","version":4,"debugenabled":false,"domain":"notify","service":"alexa_media","target":{"entityId":[],"areaId":[],"deviceId":[]},"data":"{\"message\":\"Announcing to the downstairs wake group.\",\"data\":{\"type\":\"announce\",\"method\":\"all\"},\"target\":\"media_player.alexa_wake_downstairs\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":430,"y":280,"wires":[[]]},{"id":"36944218.4145ce","type":"server","name":"Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30}]
EDIT: After rolling back, I can verify that everything works as it did previously with Node-RED 10.4.0 running on HA Core 2022.2.6.