[SOLVED] Harmony Hub volume control

Dear Community!

I want to make a Switch in sitemap which controls my Harmony Hub volume controls.
However I couldn’t find any relevant info on this. Firstly I have set my Hub up on PaperUI and I haven’t added the controlled devices to my openHab. My main problem is that I don’t want to control specific device’s volume but I want to control like I’m pressing the buttons on my Harmony Remote. The Harmony knows which is the target device depending on the current activity. Is this possible somehow? Or should I add all devices to openHab and manage it manually in openHab that what device should it trigger depending on the Current Activity?

Ps.: How can I make a button not sticky? Like I mean when you press “Volume Up” it shouldn’t get stucked and have this pink background

Thanks

items:

String HarmonyWZBose <receiver> (gRestore) { channel="harmonyhub:device:HarmonyWZ:26434536:buttonPress" }

sitemap:

Switch item=HarmonyWZBose label="Lautstärke" mappings=["VolumeUp"="Lauter","VolumeDown"="Leiser"] icon="soundvolume"

Yes, but this will just trigger that one device, am I right?

Sure. Do you have more volume controls? :grinning:

Yes, because when I control it from the Harmony Remote or the Harmony app, the volume is dependent on the Activity :slight_smile: I mean for example I have a Chromecast. When I start it, it mutes the TV and the Volume Up and Volume Down triggers my AV amplifier, etc, etc…
That’s why I have asked this, but no probs if there is no universal solution for it, I will just write a rule for that :slight_smile:

I would set up a rule that would contain an if statement depending on the activity. Have an item for each button push, then use a proxy item for volume control. Have the rule contain the activity and depending on which one have it perform the button push on the correct volume item.

The per-activity mapping of how the user-facing Harmony remote or app buttons control which real device functions is not exported, and the binding doesn’t provide access to the user-facing controls (such that the Harmony could handle the mapping, which is what you’re looking for)

I think in most people’s configurations, all Harmony activities use the same device for volume control - either the TV or the receiver, if you have one (or powered soundbar, etc.). So addressing that device’s volume control directly as indicated above is the way to go. If you’re using the TV speakers in some activities and the AV Amp in others, that’s unusual, so yes, you’ll need to write some code to handle that.

Yes, thought that somehow this is limited to Harmony only. Yes, I have made a simple switch with + and - buttons and made a rule where it selects the preferred volume depending on the Current Activity.

Thanks for everyone!