# Sonos volume up and down flows

**URL:** <https://community.homey.app/t/sonos-volume-up-and-down-flows/17686>\
**Category:** Questions & Help\
**Created:** [September 4, 2019, 12:15pm UTC](https://community.homey.app/t/sonos-volume-up-and-down-flows/17686 "2019-09-04T12:15:51Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_Nowak](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/michael_nowak/32/15192_2.png) [@Michael\_Nowak](https://community.homey.app/u/Michael_Nowak)\
**Post date:** [September 4, 2019, 12:15pm UTC](https://community.homey.app/t/sonos-volume-up-and-down-flows/17686/1 "2019-09-04T12:15:51Z")

</div>

Hi

i want to convert a Hue dimmer switch into a sonos controller.  
but i cant figure out to make a flow that increases the sound when the plus key is pressed, and decreases sound when minus is pressed. the only option i have is to set a specific volume. any solutions ?

---

<div class="post-metadata">

**Author:** ![Michael](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/michael/32/110520_2.png) [@Michael](https://community.homey.app/u/Michael)\
**Post date:** [September 4, 2019, 1:27pm UTC](https://community.homey.app/t/sonos-volume-up-and-down-flows/17686/2 "2019-09-04T13:27:46Z")

</div>

Hi Michael,

[I did a search that might help you…](https://community.homey.app/t/volume-sonos-instellen-via-afstandsbediening/13455/4)

It’s in dutch but in short you could use variables to get it done…

---

<div class="post-metadata">

**Author:** ![Neuron44](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/neuron44/32/9492_2.png) [@Neuron44](https://community.homey.app/u/Neuron44)\
**Post date:** [September 4, 2019, 1:29pm UTC](https://community.homey.app/t/sonos-volume-up-and-down-flows/17686/3 "2019-09-04T13:29:48Z")

</div>

You can make a number variable (let’s call it ‘volume’) and let that determine the volume for the Sonos speakers.

I would suggest two flows:  
Flow 1:  
When  
The + button is pressed  
Then  
Calculate a number variable  
(in this card you can let Homey add 0.05 to the volume. Just calculate the ‘volume’-card as: Volume-card + 0.05. Or any given interval that you like)  
Then  
Set Sonos to ‘volume’

Flow 2:  
(Same as flow 1 except you need the - button and decrease the volume instead of increase).

---

<div class="post-metadata">

**Author:** ![Michael\_Nowak](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/michael_nowak/32/15192_2.png) [@Michael\_Nowak](https://community.homey.app/u/Michael_Nowak)\
**Post date:** [September 4, 2019, 1:56pm UTC](https://community.homey.app/t/sonos-volume-up-and-down-flows/17686/4 "2019-09-04T13:56:37Z")

</div>

thx that worked. Now the flow look this way

 ![volumeup](https://us1.discourse-cdn.com/flex025/uploads/athom/original/2X/c/c03cf42912125c575e7393a1dbca6d0b5adad710.png)

---

<div class="post-metadata">

**Author:** ![Odechr](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/odechr/32/14691_2.png) [@Odechr](https://community.homey.app/u/Odechr)\
**Post date:** [September 5, 2019, 12:36pm UTC](https://community.homey.app/t/sonos-volume-up-and-down-flows/17686/5 "2019-09-05T12:36:18Z")

</div>

What did you type in the value field of the variabel you made?

---

<div class="post-metadata">

**Author:** ![Michael\_Nowak](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/michael_nowak/32/15192_2.png) [@Michael\_Nowak](https://community.homey.app/u/Michael_Nowak)\
**Post date:** [September 5, 2019, 1:02pm UTC](https://community.homey.app/t/sonos-volume-up-and-down-flows/17686/6 "2019-09-05T13:02:50Z")

</div>

![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/2X/0/0612d6697d879691e7cd1617c4d300bc0d137f9c.jpeg)

---

<div class="post-metadata">

**Author:** ![Odechr](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/odechr/32/14691_2.png) [@Odechr](https://community.homey.app/u/Odechr)\
**Post date:** [September 5, 2019, 3:28pm UTC](https://community.homey.app/t/sonos-volume-up-and-down-flows/17686/7 "2019-09-05T15:28:18Z")

</div>

As long as we cant read the actual volum at the time the calculation happens it will eventually fail. Or else your forced to only use the switch for volum.

Change the volum on sonos or your phone and the calculation will be wrong.

---

<div class="post-metadata">

**Author:** ![Rocodamelshekima](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rocodamelshekima/32/8209_2.png) [@Rocodamelshekima](https://community.homey.app/u/Rocodamelshekima)\
**Post date:** [September 5, 2019, 3:42pm UTC](https://community.homey.app/t/sonos-volume-up-and-down-flows/17686/8 "2019-09-05T15:42:49Z")

</div>

> [@Odechr](#):
>
> Change the volum on sonos or your phone and the calculation will be wrong.

Dunno where u get that from but the Set volume tag is updated whenever u change the volume from whatever place u like.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/2X/7/7e6ea36d8f59df8234b0a97ca9103df1d4f4f1cc.jpeg)

---

<div class="post-metadata">

**Author:** ![Odechr](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/odechr/32/14691_2.png) [@Odechr](https://community.homey.app/u/Odechr)\
**Post date:** [September 5, 2019, 4:21pm UTC](https://community.homey.app/t/sonos-volume-up-and-down-flows/17686/9 "2019-09-05T16:21:18Z")

</div>

I just tried that, and mine only changes using the volum button inside homey. Whether that is a bug or not, I don’t know, but it doesn’t change.

Not my trough sonos app or spotify. But as soon as I go back to homey, press sonos, change volum it changes.

---

<div class="post-metadata">

**Author:** ![Rocodamelshekima](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rocodamelshekima/32/8209_2.png) [@Rocodamelshekima](https://community.homey.app/u/Rocodamelshekima)\
**Post date:** [September 5, 2019, 4:22pm UTC](https://community.homey.app/t/sonos-volume-up-and-down-flows/17686/10 "2019-09-05T16:22:55Z")

</div>

And which Sonos app version are u using ? And did u add the Sonoe speakers again after updating the app?

---

<div class="post-metadata">

**Author:** ![Odechr](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/odechr/32/14691_2.png) [@Odechr](https://community.homey.app/u/Odechr)\
**Post date:** [September 5, 2019, 4:29pm UTC](https://community.homey.app/t/sonos-volume-up-and-down-flows/17686/11 "2019-09-05T16:29:53Z")

</div>

My app version is 5.0.11. I can try and reinstall the sonos app and connect sonos again. Just too see.

I’ve only had this version as I installed my first sonos speaker 4 days ago.

---

<div class="post-metadata">

**Author:** ![Rocodamelshekima](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rocodamelshekima/32/8209_2.png) [@Rocodamelshekima](https://community.homey.app/u/Rocodamelshekima)\
**Post date:** [September 5, 2019, 4:34pm UTC](https://community.homey.app/t/sonos-volume-up-and-down-flows/17686/12 "2019-09-05T16:34:20Z")

</div>

Hmmm. Checked with 5.0.11 and it doesn’t change indeed. Must be a bug. It’s working in 4.0.13.  
Sorry for my comment earlyer.

---

<div class="post-metadata">

**Author:** ![Odechr](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/odechr/32/14691_2.png) [@Odechr](https://community.homey.app/u/Odechr)\
**Post date:** [September 5, 2019, 4:39pm UTC](https://community.homey.app/t/sonos-volume-up-and-down-flows/17686/13 "2019-09-05T16:39:48Z")

</div>

Hopefully it will be fixed. i can send in a bug request. I was wondering why my flow got messed up.

---

<div class="post-metadata">

**Author:** ![Neuron44](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/neuron44/32/9492_2.png) [@Neuron44](https://community.homey.app/u/Neuron44)\
**Post date:** [September 5, 2019, 6:20pm UTC](https://community.homey.app/t/sonos-volume-up-and-down-flows/17686/14 "2019-09-05T18:20:13Z")

</div>

Just trying to figure out exactly what you mean. I just tested it using Sonos directly. When I press on the + volume button on Sonos itself it immediately updates in Homey.

So I’m not sure why the flow will fail?

---

<div class="post-metadata">

**Author:** ![Odechr](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/odechr/32/14691_2.png) [@Odechr](https://community.homey.app/u/Odechr)\
**Post date:** [September 5, 2019, 6:49pm UTC](https://community.homey.app/t/sonos-volume-up-and-down-flows/17686/15 "2019-09-05T18:49:40Z")

</div>

And you’re using 5.0.11?  
Doesn’t update for at least two of us.

---

<div class="post-metadata">

**Author:** ![Neuron44](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/neuron44/32/9492_2.png) [@Neuron44](https://community.homey.app/u/Neuron44)\
**Post date:** [September 5, 2019, 7:21pm UTC](https://community.homey.app/t/sonos-volume-up-and-down-flows/17686/16 "2019-09-05T19:21:11Z")

</div>

Yes, i’m using 5.0.11

Edit: just tested it with the Sonos app on my mobile phone (not via Homey) and with a flow in Homey. Both works for me.

---

<div class="post-metadata">

**Author:** ![Odechr](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/odechr/32/14691_2.png) [@Odechr](https://community.homey.app/u/Odechr)\
**Post date:** [September 5, 2019, 7:41pm UTC](https://community.homey.app/t/sonos-volume-up-and-down-flows/17686/17 "2019-09-05T19:41:00Z")

</div>

I just restarted my homey and now it updates.

Volume up and down works with one issue:  
first press volum goes up normal  
Second press volum goes down a little Bit  
Third press volum goes up again Normal

And it keeps on like this. Same goes for volume down button just opposite.

I’ll try to post some values tomorrow. I use exactly the same flow as above

---

<div class="post-metadata">

**Author:** ![Neuron44](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/neuron44/32/9492_2.png) [@Neuron44](https://community.homey.app/u/Neuron44)\
**Post date:** [September 5, 2019, 7:58pm UTC](https://community.homey.app/t/sonos-volume-up-and-down-flows/17686/18 "2019-09-05T19:58:47Z")

</div>

That seems strange. You could try to determine what’s wrong by looking to the exact values that Homey reports in the logic cards between each step. They should simply go up by 0.1.

You could try to set a 1 second delay on the Set volume to Volume-up card. Perhaps Homey (sometimes) processes the Set volume to-card before it finishes calculating the volume-up card. This would mean your volume won’t go up at all, and the next time it would go up with 0.2.

---

<div class="post-metadata">

**Author:** ![Danny\_Trusbak](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/danny_trusbak/32/1082_2.png) [@Danny\_Trusbak](https://community.homey.app/u/Danny_Trusbak)\
**Post date:** [November 2, 2019, 10:41pm UTC](https://community.homey.app/t/sonos-volume-up-and-down-flows/17686/19 "2019-11-02T22:41:43Z")

</div>

Tried this flow with a Nod-on Soft Remote.  
Pressing the +/- buttons the values in the logic app disappears.  
Is this normal or is it a bug in Homey or the Sonos app?  
Homey version 3.0.0  
Sonos app version 5.0.12

---

<div class="post-metadata">

**Author:** ![Neuron44](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/neuron44/32/9492_2.png) [@Neuron44](https://community.homey.app/u/Neuron44)\
**Post date:** [November 2, 2019, 10:52pm UTC](https://community.homey.app/t/sonos-volume-up-and-down-flows/17686/20 "2019-11-02T22:52:31Z")

</div>

Can you post your flow(s)? Maybe there is something wrong in the calculation that causes the variable to go to 'undefined, meaning the value disappears.

[Next page](https://community.homey.app/t/sonos-volume-up-and-down-flows/17686.md?page=2)
