Clarification on volumeUp/volumeDown vs Raise/Lower Volume

@bravenel, got a question about RM that you can prolly answer quicker than anyone else. Under the Control Music Device group of commands in RM 4.0, I see Raise Volume and Lower Volume.

image

Does this match up to volumeUp and voumeDown available in the audioVolume capability?

image

Raise Volume in RM seems to be doing something else. Thanks!

When I try to use the Raise/Lower Volume commands from Rule Machine I get the following error:

Thanks for reporting the error. Fixed.

Yes, they are the same. RM does not implement volumeDown and volumeUp as part of the Audio Volume commands, although they are available as part of the Music Player commands. Could be that I was led astray on the need to add Audio Volume in the first place (the culprit shall remain unidentified). A bit of research is in order, no doubt. Also, we plan to make some changes around speech devices wrt to volume.

Thanks Bruce! I'm using the custom action with the volumeUp/volumeDown and it's working fine. Just thought I'd get it cleared up.

If you don't mind, if you're making changes around speech/voice, I'm working on updates to the Cast-Web-API drivers for Hubitat with the original developer of the software for ST. So, if there's any "beta" announcements about the changes, I'd appreciate being on the distribution list, if it's not too much trouble. Thanks so much!

Hey @bravenel, i see that this was fixed in the last release notes but I think they are backwards. This is what I have in the driver:

def volumeUp(){
    level = device.currentValue("level")
    level = level.toInteger()
    newLevel = level + state.volumeStep
    if (newLevel <=100){
        setLevel(newLevel)
    }
    else setLevel(100)
    log.debug("volume Up called")
}

def volumeDown(){
    level = device.currentValue("level")
    level = level.toInteger()
    newLevel = level - state.volumeStep
    if (newLevel >= 5){
        setLevel(newLevel)
    }
    else setLevel(5)
    log.debug("volume down called")
}

And state.volumeStep is set to an integer in the update function.

image

And i have a button controller set up as follows:

image

When I press button 1 (and i confirmed that on the device edit page) i get the volume dropping and when I press button 5 the volume goes up. Can you confirm?

When I added extra debug logging in I see the following:

image

and

image

Yes, they are reversed. Fix is in, but don't know when it will be released. In the meantime, you can get correct behavior with Custom Action on the device.

Yup...that's what I've been doing. Thanks for confirming.

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