# Different volume when casting

**URL:** <https://discourse.nodered.org/t/different-volume-when-casting/32971>\
**Category:** General\
**Created:** [16 September 2020 17:57 UTC](https://discourse.nodered.org/t/different-volume-when-casting/32971 "2020-09-16T17:57:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![cvandingelen](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cvandingelen/32/28595_2.png) [@cvandingelen](https://discourse.nodered.org/u/cvandingelen)\
**Post date:** [16 September 2020 17:57 UTC](https://discourse.nodered.org/t/different-volume-when-casting/32971/1 "2020-09-16T17:57:38Z")

</div>

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)?

Thanks

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [16 September 2020 18:37 UTC](https://discourse.nodered.org/t/different-volume-when-casting/32971/2 "2020-09-16T18:37:44Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [16 September 2020 18:51 UTC](https://discourse.nodered.org/t/different-volume-when-casting/32971/3 "2020-09-16T18:51:05Z")

</div>

If you are using [https://flows.nodered.org/node/node-red-contrib-cast](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.

---

<div class="post-metadata">

**Author:** ![cvandingelen](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cvandingelen/32/28595_2.png) [@cvandingelen](https://discourse.nodered.org/u/cvandingelen)\
**Post date:** [16 September 2020 19:20 UTC](https://discourse.nodered.org/t/different-volume-when-casting/32971/4 "2020-09-16T19:20:16Z")

</div>

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

@E1cid It was msg.volume, thanks.

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [16 September 2020 19:33 UTC](https://discourse.nodered.org/t/different-volume-when-casting/32971/5 "2020-09-16T19:33:36Z")

</div>

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

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [30 September 2020 19:33 UTC](https://discourse.nodered.org/t/different-volume-when-casting/32971/6 "2020-09-30T19:33:41Z")

</div>

Closed on 30 September 2020 19:33 UTC

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