0
Under review

Sonos up/down volume control

Grzegorz Kulinski 3 years ago in Devices / Sonos updated 3 years ago 6

Hello.

Is it possible to add "volume up"/"volume down" function directly in the Sonos driver? I don't see such a possibility in current driver, so I perform an additional calculation of subtracting/adding a constant value to the current volume value. And it works fine.

But I want to add a loop while the "volume up"/"volume down" button is held down. I used the MouseDownButton object for this.


Image 3408


Is there any other way to restart the program or make a loop? In used "Restart" function, the minimum time can be set to 1s, but it is definitely too long to get smooth volume down/up.

Regards,

Grzegorz Kulinski

Under review

Hello,

yes it is possible to create up / down function. You need to add a program task and two Booleans, one Boolean is for up the second for down. You need to select the Up and Down template for each button. In program task you will have to add both Booleans as trigger. In program you add If button Up = true and then select speaker, Property must be value and select the Calculation. In Math operation you need to click on add and select Sonos Volume as input value and click OK. Then you need to add addition 1 . You need to repeat the process for button Down. I am sending you the export of configuration in the attachment so you can import it in your configuration.

Best regards


Sonos UpDown.bos

Hello.

Thank you for example. I did it a bit differently, but I came to this point myself ;) The problem is the minimum available time interval for the "Restart" command. One second is definitely too long to perform smooth volume control. For this, a much shorter time is needed, like 0.1s. Any idea, concept?

Regards.

Hello,

adding that short delay, usually brakes the software as it sends too much data in. Current limit is 1s and cannot go any faster.


Best regards

Hi.


Is there any possibility of making a Do-While / Do-Until loop?

Regards

+1

Hey,

If 1 sec feels too long then you can use higher value for calculations maybe like so...


Loop works when the button is set as MouseDownButton

Hi.

Of course I tried that way :) However, even with a value of +/- 5 and restart every 1s, the effect is far from acceptable.

Regards.