Different volume when casting

Hi everyone

As a morning routine, I have some text I cast (with the cast node) to my speakers. Now I would like the cast volume to be different at different times.

To be specific, when it's before 9am or after 10pm, the casting volume needs to be 30, otherwise it needs to be 60.

Is this possible and if yes, how would I do it (keep in mind that I'm new at node-red)?


Hi Christophe,
First off, when you mention a 'contrib' node, it is good pratice to mention the full name of the node like 'node-red-contrib-fs'. That saves people from having to guess what node you mean. When I search in the flow library for 'cast', 26 nodes are returned.

Second, have you checked to see if the node you are using supports changing the volume.

Third, what kind of speakers are you using? (remember, not everybody uses or has all types of speakers and only you know what you have)

If you are using https://flows.nodered.org/node/node-red-contrib-cast
Then you could use the function node to alter msg.volume or msg.payload.volume, depending on time of day, prior to the cast node.

1 Like

Ok sorry about that. It's indeed at E1cid said, the https://flows.nodered.org/node/node-red-contrib-cast node.

@E1cid It was msg.volume, thanks.

1 Like

Or msg.payload.volume. You can use either.

There is a list of properties in the node info panel.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.