HTD - Lync 12 - How to increment Volume Up or Down by 5

@igorkuz - I am trying to setup a rule in which I can increase the volume Up or Down in set increments of 5.

Problem - When I create a rule to increase volume up or down in the HTD driver, it takes several calls to get the volume up to an increased volume or a decreased volume.

I am running the latest code on a C8

If this is a custom driver / app you are talking about you should either post in the thread for it, or at least provide a link for it. Some people may have some ideas but right now I don't even know what you are talking about exactly, except I can assume the person you tagged is the author of it.

OP’s referring to the driver released in this thread, which was closed due to inactivity at some point.

It’s hard to say without seeing the rule if this is an issue related to the driver or the rule logic, though.

It looks like you can set the value to a specific level in that driver. You could make a rule that grabs the current volume, puts it in a variable, adds 5 to it and then sets it back. That would effectively adjust it by increments of 5.

1 Like

That would be my general approach too.

I use this driver and can confirm it seems to control volume on the HTD Lync system just fine.

But I don’t currently have a need to adjust volumes in this way, so haven’t tried. Not sure why it would be a problem, though.

This is a known issue. Lync controller doesn't support volume up or down, and that's why it's not a future in their app. I tried my best to create it but there are some other road blockers, when you set your volume, it doesn't report back on the status. My approach was to store the current volume value, when you press Up or Down, I would take the current value and increment it by one then poll the device to update current status value.

I think I'm going to add Volume Up and down future, with variable value.

Volume state is only reported back when something else is changed or device is polled. This is a HTD Lync "future" and I did my best to work around it.

When you do volume up, try to have a little delay between command for now as it take a bit longer to record and update the device status.

Here is the snippet of the driver code for reference, that is dealing with volume up:

void volumeUp() {
    def zone = state.zoneNumber as byte
    def currentDBValue = state.dB
    def volUpDownVal = state.volUpDown

    if (!currentDBValue.equals(volUpDownVal)) {
        newVolVal = volUpDownVal+1
        state.volUpDown = newVolVal+1
    } else{
        newVolVal = currentDBValue+1
        state.volUpDown = newVolVal+1

    def cmd = [2, 0, zone, 0x15, newVolVal] as byte[]


1 Like

That's what the driver actually doing but it only increments by 1.

1 Like

I should’ve clarified I have no issues with getting Hubitat to set specific volume levels, since as you said even the HTD Lync app doesn’t do “volume up” or “down” very well.

So I rarely bother to use it whether in the Lync app or with Hubitat.

Yeah, I never used it as well, but I had it added anyways in case someone do use it, they need to do a wait for like a second or two between increments as it depending on the control to send a volume value which only happening, when you poll the controller, or send some other command.

Controller just takes the command for volume, sets the volume, but will not provide any feedback, and I don't know why HTD did this that way, maybe to minimize chatter over RS232? :man_shrugging:

I will add an option to increment by variable number, when I get some free cycles.

1 Like