This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.

The Homey Community has been moved to https://community.athom.com.

This forum is now read-only for archive purposes.

increase volume of Sonos through Voice command (logic question)

Hi all,

New Homey user here. :-)

I'm trying to figure out how to increase volume of a playing Sonos system with perhaps 10%increments after speaking a phrase to Homey. I see the Sonos has a volume tag and I'm thinking if I can read the current volume I should be able to pass some logic to homey to increase current value +10% or something like that.

Anyone who can point me in the right direction would be much appreciated.

Many thanks,

Marcel.

Comments

  • @MarcelKleine please try the search function of the forum...

    I know for sure this question has been asked and answered a number of times (this week) before.... ;)
  • @TedTolboom :-) I did try that first, I'll try again..
  • Be aware that when Sonos is playing loud u cannot speak to Homey anymore!
  • @Rocodamelshe  I've ordered an Echo Dot, given up on native speech rather quickly.
  • The main question is, did you find the answer....
  • I found a lot of answers, setting the volume in a flow is quite easy. But my specific question to 'read' the current volume level and add a variable percentage to it I can't figure out. (Okay Homey, turn music up/down by 10%) I think I need to use logic or better logic for that but it's not making a lot of sense to me right now. An example would be great, still open to suggestions. Thanks all so far anyway.
  • bvdbosbvdbos Member
    edited July 2017
    https://forum.athom.com/discussion/comment/48109/#Comment_48109
    for example... or
    https://forum.athom.com/discussion/comment/51451/#Comment_51451

    but Don't know if volume is a gettable tag for sonos, don't have it...

  • does that mean its gettable?
  • bvdbosbvdbos Member
    Yep, and it's a blue tag so a number. You could add 10% or 0.1 etc like in the flows posted above....
  • Not sure what I'm doing wrong here. this flow doesn't pick up the variable I set. If I change the 'THEN' to pauze for example it works so I know it gets triggered. Feel like I'm missing something.
  • bvdbosbvdbos Member
    edited July 2017
    If the variable "volume" holds your new volume, you should drag the corresponding "volume"-tag from the tag-list to the action-card. Now you're just setting the volume which is already has.
  • Lightbulb!  Thank you! starting to make sense now.
  • bvdbos said:
    If the variable "volume" holds your new volume, you should drag the corresponding "volume"-tag from the tag-list to the action-card. Now you're just setting the volume which is already has.
    I tried this, but I seem to have some value updating issues (as well as a problem with increasing digits after the decimal point which causes a no go). Hence my 2 questions:
    - If I drag the new (BetterLogic) tag onto the Sonos Volume-actioncard, will the original Sonos #volume-tag also change to the new value (since the volume on the Sonos will change)?
    - Can I put the value of the BetterLogic Volume tag into the original Sonos #volume-tag and then drag the Sonos #volume-tag onto the Sonos Volume-actioncard?
  • flexy said:

    - If I drag the new (BetterLogic) tag onto the Sonos Volume-actioncard, will the original Sonos #volume-tag also change to the new value (since the volume on the Sonos will change)?

    Yes.

    flexy said:

    - Can I put the value of the BetterLogic Volume tag into the original Sonos #volume-tag and then drag the Sonos #volume-tag onto the Sonos Volume-actioncard?
    Can u explain why u wanna do this?
  • flexyflexy Member
    edited December 2017
    @Rocodamelshe:
    Ty for your answer. The 2nd idea was as a way out, in case the answer on the first question would be no.

    My issue is that when i set the volume on the Sonos with my BetterLogic value, somehow the sonos #volumetag doesn't change. I will try again when i have more time and put a copy of my screen here.
    It all doesn't really work for me because of the long number issue, so i was looking for other logic.
    Update: I figured out my issue, which was that i had not placed $ around the variable name in the mathjs.
Sign In or Register to comment.