node-red-contrib-sonos-plus
node-red-contrib-sonos-plus copied to clipboard
group.play.notification plays notification sound multiple times
Description
Got the folowing function node in-line with an universal node:
msg.topic = "group.play.notification";
msg.volume = "60";
msg.payload = "http://192.168.0.15:8123/local/media/conf.mp3";
return msg;
It should play the mp3 file, and does it too. But it plays it multiple times, mostly, the "echoes" are quiter than the first one. If the doorbell sound was played before, activated by another flow it sometimes plays the doorbell sound as "echoes"... Very strage...
In case of a bug: Are you able to reproduce the error
yes
Versions and Infrastructure
**what system: Node Red with HASSIO **node-red-contrib-sonos-plus version: 6.3.0 **Node-RED version: 11.1.1
Hi Alex.
The notification command is "handmade" - means not a SONOS build in function. The command needs time (several seconds) to capture the current state of the group, playing the notification and finally restoring the original state. During this time, any additional command (change the stream, stop, pause, etc) arriving at the player "interfere" with the notification - usally problems restoring the original state and playing multiple times.
Are you sure that there are no additional messages arriving at the player during that time? How does your flow look (export)?
At my home I did solve it by putting a "queue function" in front of the sonos node - see tts example block serialize msgs and play notifications.
My flow is as simple as that. You see the code in the function node above. There are no additional messages.
Functions are always "critical". Could you please post the content of the function or just export it? You can put a debug node after "confirmed sound" and check, when messages are send.
You can see the content of the node in my initial post
Please replace the function node with a change node - function nodes are for real functions not just assignements. Put a debug node behind it and verfiy that per call only one message is send to the SONOS node. You can also put a simple queue node between the change node and the SONOS node to ensure that only one message is send.
no response - closed!