Help with increasing AVR volume increment

  • Platform information:
    • Hardware: iMac 2.7Ghz i5, 8GB RAM
    • OS: MacOS Catalina
    • Java Runtime Environment: Azul Zulu 19.30.11
    • openHAB version: 3.4.0

I’m brand new to openHAB. I have an Onkyo AVR that changes volume by 0.5db by default. I want to have each volume button press result in a 1db change. I also have a Harmony Elite Hub remote.

I have a script which I can’t seem to get to work as expected. If there’s an easier way to accomplish my goal, please share any suggestions. But when I enable the rule below and press volume up/down buttons on my remote, the volume bounces around as shown in the log output below (just one press of volume up button). I have the >80 and <100 params in there just to keep it from bouncing around infinitely until I figure this out.

Ultimately what I’d prefer to do (if possible) is to create an action that increments/decrements the AVR volume by 1db and then map that to a button on my Harmony remote. Would someone be willing to help me get started down the right path at least?

Thanks.

Rule:

configuration: {}
triggers:
  - id: "1"
    configuration:
      itemName: Onkyo_TXNR6050_Volume
    type: core.ItemStateChangeTrigger
conditions: []
actions:
  - inputs: {}
    id: "2"
    configuration:
      type: application/vnd.openhab.dsl.rule
      script: >-
        val Number step = 1

        val prevVol = previousState


        logInfo("AVRVolStep1db", "IN:  OldVol=" + prevVol + ",  NewVol=" + Onkyo_TXNR6050_Volume.state)


        if (((Onkyo_TXNR6050_Volume.state as Number) != (prevVol as Number) + (step*2)) &&
            ((Onkyo_TXNR6050_Volume.state as Number) != (prevVol as Number) - (step*2)) &&
            ((Onkyo_TXNR6050_Volume.state as Number) > 80) && ((Onkyo_TXNR6050_Volume.state as Number) < 100)) {
            
          if ((Onkyo_TXNR6050_Volume.state as Number) > (prevVol as Number)) {
              Onkyo_TXNR6050_Volume.sendCommand( (prevVol as Number) + (step*2) )
          } else {
              Onkyo_TXNR6050_Volume.sendCommand( (prevVol as Number) - (step*2) )
          }


          
        }


        logInfo("AVRVolStep1db", "OUT:  OldVol=" + prevVol + ",  NewVol=" + Onkyo_TXNR6050_Volume.state)
    type: script.ScriptAction

Log Output:

09:43:52.144 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 84 to 85
09:43:52.145 [INFO ] [enhab.core.model.script.AVRVolStep1db] - IN:  OldVol=84,  NewVol=85
09:43:52.183 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'Onkyo_TXNR6050_Volume' received command 86
09:43:52.183 [INFO ] [enhab.core.model.script.AVRVolStep1db] - OUT:  OldVol=84,  NewVol=85
09:43:52.184 [INFO ] [openhab.event.ItemStatePredictedEvent] - Item 'Onkyo_TXNR6050_Volume' predicted to become 86
09:43:52.184 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 85 to 86
09:43:52.185 [INFO ] [enhab.core.model.script.AVRVolStep1db] - IN:  OldVol=85,  NewVol=86
09:43:52.186 [INFO ] [enhab.core.model.script.AVRVolStep1db] - OUT:  OldVol=85,  NewVol=86
09:43:52.186 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'Onkyo_TXNR6050_Volume' received command 87
09:43:52.186 [INFO ] [openhab.event.ItemStatePredictedEvent] - Item 'Onkyo_TXNR6050_Volume' predicted to become 87
09:43:52.186 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 86 to 87
09:43:52.187 [INFO ] [enhab.core.model.script.AVRVolStep1db] - IN:  OldVol=86,  NewVol=87
09:43:52.188 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'Onkyo_TXNR6050_Volume' received command 88
09:43:52.188 [INFO ] [enhab.core.model.script.AVRVolStep1db] - OUT:  OldVol=86,  NewVol=87
09:43:52.188 [INFO ] [openhab.event.ItemStatePredictedEvent] - Item 'Onkyo_TXNR6050_Volume' predicted to become 88
09:43:52.188 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 87 to 88
09:43:52.189 [INFO ] [enhab.core.model.script.AVRVolStep1db] - IN:  OldVol=87,  NewVol=88
09:43:52.190 [INFO ] [enhab.core.model.script.AVRVolStep1db] - OUT:  OldVol=87,  NewVol=88
09:43:52.190 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'Onkyo_TXNR6050_Volume' received command 89
09:43:52.191 [INFO ] [openhab.event.ItemStatePredictedEvent] - Item 'Onkyo_TXNR6050_Volume' predicted to become 89
09:43:52.191 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 88 to 89
09:43:52.191 [INFO ] [enhab.core.model.script.AVRVolStep1db] - IN:  OldVol=88,  NewVol=89
09:43:52.192 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'Onkyo_TXNR6050_Volume' received command 90
09:43:52.192 [INFO ] [enhab.core.model.script.AVRVolStep1db] - OUT:  OldVol=88,  NewVol=89
09:43:52.193 [INFO ] [openhab.event.ItemStatePredictedEvent] - Item 'Onkyo_TXNR6050_Volume' predicted to become 90
09:43:52.193 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 89 to 90
09:43:52.194 [INFO ] [enhab.core.model.script.AVRVolStep1db] - IN:  OldVol=89,  NewVol=90
09:43:52.194 [INFO ] [enhab.core.model.script.AVRVolStep1db] - OUT:  OldVol=89,  NewVol=90
09:43:52.194 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'Onkyo_TXNR6050_Volume' received command 91
09:43:52.195 [INFO ] [openhab.event.ItemStatePredictedEvent] - Item 'Onkyo_TXNR6050_Volume' predicted to become 91
09:43:52.195 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 90 to 91
09:43:52.196 [INFO ] [enhab.core.model.script.AVRVolStep1db] - IN:  OldVol=90,  NewVol=91
09:43:52.197 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'Onkyo_TXNR6050_Volume' received command 92
09:43:52.197 [INFO ] [enhab.core.model.script.AVRVolStep1db] - OUT:  OldVol=90,  NewVol=91
09:43:52.197 [INFO ] [openhab.event.ItemStatePredictedEvent] - Item 'Onkyo_TXNR6050_Volume' predicted to become 92
09:43:52.197 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 91 to 92
09:43:52.198 [INFO ] [enhab.core.model.script.AVRVolStep1db] - IN:  OldVol=91,  NewVol=92
09:43:52.199 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'Onkyo_TXNR6050_Volume' received command 93
09:43:52.199 [INFO ] [enhab.core.model.script.AVRVolStep1db] - OUT:  OldVol=91,  NewVol=92
09:43:52.199 [INFO ] [openhab.event.ItemStatePredictedEvent] - Item 'Onkyo_TXNR6050_Volume' predicted to become 93
09:43:52.199 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 92 to 93
09:43:52.200 [INFO ] [enhab.core.model.script.AVRVolStep1db] - IN:  OldVol=92,  NewVol=93
09:43:52.200 [INFO ] [enhab.core.model.script.AVRVolStep1db] - OUT:  OldVol=92,  NewVol=93
09:43:52.201 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'Onkyo_TXNR6050_Volume' received command 94
09:43:52.201 [INFO ] [openhab.event.ItemStatePredictedEvent] - Item 'Onkyo_TXNR6050_Volume' predicted to become 94
09:43:52.202 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 93 to 94
09:43:52.202 [INFO ] [enhab.core.model.script.AVRVolStep1db] - IN:  OldVol=93,  NewVol=94
09:43:52.203 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'Onkyo_TXNR6050_Volume' received command 95
09:43:52.203 [INFO ] [enhab.core.model.script.AVRVolStep1db] - OUT:  OldVol=93,  NewVol=94
09:43:52.203 [INFO ] [openhab.event.ItemStatePredictedEvent] - Item 'Onkyo_TXNR6050_Volume' predicted to become 95
09:43:52.204 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 94 to 95
09:43:52.205 [INFO ] [enhab.core.model.script.AVRVolStep1db] - IN:  OldVol=94,  NewVol=95
09:43:52.206 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'Onkyo_TXNR6050_Volume' received command 96
09:43:52.206 [INFO ] [enhab.core.model.script.AVRVolStep1db] - OUT:  OldVol=94,  NewVol=95
09:43:52.206 [INFO ] [openhab.event.ItemStatePredictedEvent] - Item 'Onkyo_TXNR6050_Volume' predicted to become 96
09:43:52.208 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 95 to 96
09:43:52.209 [INFO ] [enhab.core.model.script.AVRVolStep1db] - IN:  OldVol=95,  NewVol=96
09:43:52.209 [INFO ] [enhab.core.model.script.AVRVolStep1db] - OUT:  OldVol=95,  NewVol=96
09:43:52.210 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'Onkyo_TXNR6050_Volume' received command 97
09:43:52.212 [INFO ] [openhab.event.ItemStatePredictedEvent] - Item 'Onkyo_TXNR6050_Volume' predicted to become 97
09:43:52.213 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 96 to 97
09:43:52.213 [INFO ] [enhab.core.model.script.AVRVolStep1db] - IN:  OldVol=96,  NewVol=97
09:43:52.214 [INFO ] [enhab.core.model.script.AVRVolStep1db] - OUT:  OldVol=96,  NewVol=97
09:43:52.214 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'Onkyo_TXNR6050_Volume' received command 98
09:43:52.217 [INFO ] [openhab.event.ItemStatePredictedEvent] - Item 'Onkyo_TXNR6050_Volume' predicted to become 98
09:43:52.218 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 97 to 98
09:43:52.218 [INFO ] [enhab.core.model.script.AVRVolStep1db] - IN:  OldVol=97,  NewVol=98
09:43:52.219 [INFO ] [enhab.core.model.script.AVRVolStep1db] - OUT:  OldVol=97,  NewVol=98
09:43:52.219 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'Onkyo_TXNR6050_Volume' received command 99
09:43:52.219 [INFO ] [openhab.event.ItemStatePredictedEvent] - Item 'Onkyo_TXNR6050_Volume' predicted to become 99
09:43:52.220 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 98 to 99
09:43:52.221 [INFO ] [enhab.core.model.script.AVRVolStep1db] - IN:  OldVol=98,  NewVol=99
09:43:52.222 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'Onkyo_TXNR6050_Volume' received command 100
09:43:52.222 [INFO ] [enhab.core.model.script.AVRVolStep1db] - OUT:  OldVol=98,  NewVol=99
09:43:52.222 [INFO ] [openhab.event.ItemStatePredictedEvent] - Item 'Onkyo_TXNR6050_Volume' predicted to become 100
09:43:52.224 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 99 to 100
09:43:52.224 [INFO ] [enhab.core.model.script.AVRVolStep1db] - IN:  OldVol=99,  NewVol=100
09:43:52.225 [INFO ] [enhab.core.model.script.AVRVolStep1db] - OUT:  OldVol=99,  NewVol=100
09:43:52.291 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 100 to 86
09:43:52.291 [INFO ] [enhab.core.model.script.AVRVolStep1db] - IN:  OldVol=100,  NewVol=86
09:43:52.292 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'Onkyo_TXNR6050_Volume' received command 98
09:43:52.292 [INFO ] [enhab.core.model.script.AVRVolStep1db] - OUT:  OldVol=100,  NewVol=86
09:43:52.292 [INFO ] [openhab.event.ItemStatePredictedEvent] - Item 'Onkyo_TXNR6050_Volume' predicted to become 98
09:43:52.293 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 86 to 98
09:43:52.293 [INFO ] [enhab.core.model.script.AVRVolStep1db] - IN:  OldVol=86,  NewVol=98
09:43:52.294 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'Onkyo_TXNR6050_Volume' received command 88
09:43:52.294 [INFO ] [enhab.core.model.script.AVRVolStep1db] - OUT:  OldVol=86,  NewVol=98
09:43:52.295 [INFO ] [openhab.event.ItemStatePredictedEvent] - Item 'Onkyo_TXNR6050_Volume' predicted to become 88
09:43:52.295 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 98 to 88
09:43:52.295 [INFO ] [enhab.core.model.script.AVRVolStep1db] - IN:  OldVol=98,  NewVol=88
09:43:52.296 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'Onkyo_TXNR6050_Volume' received command 96
09:43:52.296 [INFO ] [enhab.core.model.script.AVRVolStep1db] - OUT:  OldVol=98,  NewVol=88
09:43:52.296 [INFO ] [openhab.event.ItemStatePredictedEvent] - Item 'Onkyo_TXNR6050_Volume' predicted to become 96
09:43:52.297 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 88 to 96
09:43:52.297 [INFO ] [enhab.core.model.script.AVRVolStep1db] - IN:  OldVol=88,  NewVol=96
09:43:52.298 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'Onkyo_TXNR6050_Volume' received command 90
09:43:52.298 [INFO ] [enhab.core.model.script.AVRVolStep1db] - OUT:  OldVol=88,  NewVol=96
09:43:52.299 [INFO ] [openhab.event.ItemStatePredictedEvent] - Item 'Onkyo_TXNR6050_Volume' predicted to become 90
09:43:52.299 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 96 to 90
09:43:52.299 [INFO ] [enhab.core.model.script.AVRVolStep1db] - IN:  OldVol=96,  NewVol=90
09:43:52.300 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'Onkyo_TXNR6050_Volume' received command 94
09:43:52.300 [INFO ] [enhab.core.model.script.AVRVolStep1db] - OUT:  OldVol=96,  NewVol=90
09:43:52.301 [INFO ] [openhab.event.ItemStatePredictedEvent] - Item 'Onkyo_TXNR6050_Volume' predicted to become 94
09:43:52.301 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 90 to 94
09:43:52.301 [INFO ] [enhab.core.model.script.AVRVolStep1db] - IN:  OldVol=90,  NewVol=94
09:43:52.302 [INFO ] [enhab.core.model.script.AVRVolStep1db] - OUT:  OldVol=90,  NewVol=94
09:43:52.302 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'Onkyo_TXNR6050_Volume' received command 92
09:43:52.303 [INFO ] [openhab.event.ItemStatePredictedEvent] - Item 'Onkyo_TXNR6050_Volume' predicted to become 92
09:43:52.303 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 94 to 92
09:43:52.303 [INFO ] [enhab.core.model.script.AVRVolStep1db] - IN:  OldVol=94,  NewVol=92
09:43:52.304 [INFO ] [enhab.core.model.script.AVRVolStep1db] - OUT:  OldVol=94,  NewVol=92
09:43:52.451 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 92 to 93
09:43:52.452 [INFO ] [enhab.core.model.script.AVRVolStep1db] - IN:  OldVol=92,  NewVol=93
09:43:52.453 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'Onkyo_TXNR6050_Volume' received command 94
09:43:52.453 [INFO ] [enhab.core.model.script.AVRVolStep1db] - OUT:  OldVol=92,  NewVol=93
09:43:52.453 [INFO ] [openhab.event.ItemStatePredictedEvent] - Item 'Onkyo_TXNR6050_Volume' predicted to become 94
09:43:52.454 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 93 to 94
09:43:52.455 [INFO ] [enhab.core.model.script.AVRVolStep1db] - IN:  OldVol=93,  NewVol=94
09:43:52.456 [INFO ] [enhab.core.model.script.AVRVolStep1db] - OUT:  OldVol=93,  NewVol=94
09:43:52.460 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'Onkyo_TXNR6050_Volume' received command 95
09:43:52.464 [INFO ] [openhab.event.ItemStatePredictedEvent] - Item 'Onkyo_TXNR6050_Volume' predicted to become 95
09:43:52.468 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 94 to 95
09:43:52.468 [INFO ] [enhab.core.model.script.AVRVolStep1db] - IN:  OldVol=94,  NewVol=95
09:43:52.469 [INFO ] [enhab.core.model.script.AVRVolStep1db] - OUT:  OldVol=94,  NewVol=95
09:43:52.472 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'Onkyo_TXNR6050_Volume' received command 96
09:43:52.477 [INFO ] [openhab.event.ItemStatePredictedEvent] - Item 'Onkyo_TXNR6050_Volume' predicted to become 96
09:43:52.480 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 95 to 96
09:43:52.481 [INFO ] [enhab.core.model.script.AVRVolStep1db] - IN:  OldVol=95,  NewVol=96
09:43:52.482 [INFO ] [enhab.core.model.script.AVRVolStep1db] - OUT:  OldVol=95,  NewVol=96
09:43:52.485 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'Onkyo_TXNR6050_Volume' received command 97
09:43:52.489 [INFO ] [openhab.event.ItemStatePredictedEvent] - Item 'Onkyo_TXNR6050_Volume' predicted to become 97
09:43:52.490 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 96 to 97
09:43:52.490 [INFO ] [enhab.core.model.script.AVRVolStep1db] - IN:  OldVol=96,  NewVol=97
09:43:52.491 [INFO ] [enhab.core.model.script.AVRVolStep1db] - OUT:  OldVol=96,  NewVol=97
09:43:52.497 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'Onkyo_TXNR6050_Volume' received command 98
09:43:52.498 [INFO ] [openhab.event.ItemStatePredictedEvent] - Item 'Onkyo_TXNR6050_Volume' predicted to become 98
09:43:52.498 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 97 to 98
09:43:52.499 [INFO ] [enhab.core.model.script.AVRVolStep1db] - IN:  OldVol=97,  NewVol=98
09:43:52.499 [INFO ] [enhab.core.model.script.AVRVolStep1db] - OUT:  OldVol=97,  NewVol=98
09:43:52.503 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'Onkyo_TXNR6050_Volume' received command 99
09:43:52.507 [INFO ] [openhab.event.ItemStatePredictedEvent] - Item 'Onkyo_TXNR6050_Volume' predicted to become 99
09:43:52.508 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 98 to 99
09:43:52.508 [INFO ] [enhab.core.model.script.AVRVolStep1db] - IN:  OldVol=98,  NewVol=99
09:43:52.509 [INFO ] [enhab.core.model.script.AVRVolStep1db] - OUT:  OldVol=98,  NewVol=99
09:43:52.514 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'Onkyo_TXNR6050_Volume' received command 100
09:43:52.516 [INFO ] [openhab.event.ItemStatePredictedEvent] - Item 'Onkyo_TXNR6050_Volume' predicted to become 100
09:43:52.516 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 99 to 100
09:43:52.516 [INFO ] [enhab.core.model.script.AVRVolStep1db] - IN:  OldVol=99,  NewVol=100
09:43:52.517 [INFO ] [enhab.core.model.script.AVRVolStep1db] - OUT:  OldVol=99,  NewVol=100
09:43:52.614 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 100 to 98
09:43:52.615 [INFO ] [enhab.core.model.script.AVRVolStep1db] - IN:  OldVol=100,  NewVol=98
09:43:52.616 [INFO ] [enhab.core.model.script.AVRVolStep1db] - OUT:  OldVol=100,  NewVol=98
09:43:52.775 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 98 to 96
09:43:52.776 [INFO ] [enhab.core.model.script.AVRVolStep1db] - IN:  OldVol=98,  NewVol=96
09:43:52.777 [INFO ] [enhab.core.model.script.AVRVolStep1db] - OUT:  OldVol=98,  NewVol=96
09:43:52.840 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 96 to 100
09:43:52.840 [INFO ] [enhab.core.model.script.AVRVolStep1db] - IN:  OldVol=96,  NewVol=100
09:43:52.841 [INFO ] [enhab.core.model.script.AVRVolStep1db] - OUT:  OldVol=96,  NewVol=100

You are using a wrong Java version.
openHAB 3.4 requires Java 11, no higher version supported.

For the new state there is also an implicit variable. As the item update will happen asynchronous it’s not a good practice to quiet the item state directly, but better to use previous & new state variables

Also your rule is triggered by item change, but your rule is also changing the item. Therefore the rule is triggering itself.

Instead of using a rule maybe solve it via UI and define a step-size, depending on the UI element.

Installed Zulu 11. Same issues.

If I create UI buttons, how can I cause them to execute when I press a button on my Harmony remote?

Ah, misunderstood it.

Create a rule, triggered by harmony button press & send a command (current volume +/- 1) to your av receiver

I’ve tried variations on the following with no success…

configuration: {}
triggers:
  - id: "1"
    configuration:
      itemName: Onkyo_AVR_Send_Button_Press
      command: VolumeUp
    type: core.ItemCommandTrigger
conditions: []
actions:
  - id: "2"
    configuration:
      itemName: Onkyo_TXNR6050_Volume
      command: Onkyo_TXNR6050_Volume + 2
    type: core.ItemCommandAction

I don’t think I’m properly setting the When trigger. How do I configure the When trigger for when the Volume Up button is press on the remote?

To send current value +2 you need to use a script action and cannot send it as command directly from the rule.

Still not working. It’s not registering the button presses - I don’t know proper button press command to look for in the trigger. This is what I’ve tried:

configuration: {}
triggers:
  - id: "1"
    configuration:
      itemName: Onkyo_AVR_Send_Button_Press
      command: VolumeUp
    type: core.ItemCommandTrigger
  - id: "3"
    configuration:
      itemName: HarmonyHub_Family_Rm_Button_Press
      command: VolumeUp
    type: core.ItemCommandTrigger
conditions: []
actions:
  - inputs: {}
    id: "2"
    configuration:
      type: application/vnd.openhab.dsl.rule
      script: >-
        logInfo("AVRVolStep1db", "IN:  OldVol=" + previousState + ",  NewVol=" +
        Onkyo_TXNR6050_Volume.state)

        val Number step = 1

        Onkyo_TXNR6050_Volume.sendCommand( (previousState as Number) + (step*2) )
    type: script.ScriptAction

What’s your log file showing when your press the button? It should show anything

It doesn’t show my logInfo messages. Just the activity from the Onkyo:

12:07:13.078 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 94 to 95
12:07:14.070 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 95 to 96
12:07:15.702 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 96 to 95
12:07:16.138 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 95 to 94
12:07:17.238 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 94 to 93
12:07:17.516 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 93 to 92
12:07:18.544 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 92 to 91
12:07:18.822 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 91 to 90
12:07:26.445 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 90 to 91
12:07:27.690 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 91 to 92
12:07:29.493 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 92 to 91
12:07:30.073 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Onkyo_TXNR6050_Volume' changed from 91 to 90

Maybe you first need to fix your harmony integration, that you can receive the update when pressing a button.

What specifically do you mean by that? I’m able to send commands to the Harmony Hub. I just don’t know how to check for the incoming button press (if that’s even possible).

I really just want to press the Volume Up button on the Harmony and have OH increase the volume by 1db (or send two button presses, or some other way of achieving it).

Based on the documentation there is a channel “button” that will tell you what the button you pressed last on the device.
You should have an item linked to this channel and the item should update once you press the button
Logitech Harmony Hub - Bindings | openHAB