[Release] Logitech Harmony Hub Driver v0.1.20230311

Good question. Let's look at it this way... If you're holding a Logitech Remote Control in your hand, can you set a specific volume on any device? :wink: Of course not, since the Logitech remote control has absolutely no way of knowing what volume your current device is set at, nor are there any IR commands to set a device to a specific volume. The communication from the Harmony Hub to the devices it controls is all one way. There is no feedback from the devices to the Harmony Hub.

As such, the only thing we can expose in this integration is the ability to adjust the volume of a device, relative to its current value. I believe Mute also works, but Mute is a simple toggle, as there is no feedback to the Harmony Hub to know if the actual device is muted or not.

So... it is not possible to send a specific volume 'number' request via the Harmony Hub to any device that I am aware of. I am not saying that there is not a device in existence where this works, however, that would probably be the exception to the rule. Televisions, Surround Sound Receivers, Soundbars, etc... all expose Volume Up, Volume Down, and Mute (toggle). They do not (typically) expose any way to send a specific volume number to them via an infrared remote control.

Hope that helps. In general, if you can do it with a Harmony Remote Control, then there is probably a way to do it from Hubitat via this integration. Not saying everything is currently exposed...but users have found ways to send device specific commands, if one is willing to do a little digging into the data that I have exposed.

Note: Some devices do support more sophisticated integration methods, like a direct LAN integration for some Surround Sound Receivers and Televisions. In those cases, there would need to be a specific Hubitat Device Driver written that allows the hub to have two-way communications with the device. In that scenario, the Hubitat Hub could set a specific volume. I know Hubitat has some built-in drivers for a few receivers.

1 Like

thanks for the response and it makes sense when answering the question about why presses and not a volume number. However, it doesn't answer the question why the driver requires one to set a volume press at all when using your default activity function. i can start my TV setup with Harmony without touching the volume control, and it defaults to the last volume setting. Can't it be made optional to set a number of volume presses, or accept a zero value for that field?

LJ

Ahhh. That field is only used IF you issue a VolumeUp or VolumeDown command via the Parent Device.

Thanks again. Just so I am clear, When i selected my default activity and tried to save it, I got an onscreen field level help message that says this field must be 1 or greater, so I concluded it was a requirement of the default activity field.

What I am understanding you to say now, is that it is a default setting in general when a volume up or volume down command or button press is issued by the driver. It defines the number of presses sent by the driver for each "press" of a volume direction by the driver.

Is that correct?

LJ

That is correct.

1 Like

Should this be happening with the setLevel>>, every second? Just recently re-installed and verified that drivers were up to date. Thanks!

image

Looks like you've uncovered a bug. I believe it is fairly harmless, however I will implement a fix for it shortly.

Thank you for reporting this! :slight_smile:

1 Like

Actually, I think I caused it and can reproduce. I saw the Level at 50 in the device page and I though no no 50 is to high. But I don't think it is really setting volume level correct? Anyway when I added in 18 for the level and pressed setlevel that is when the looped setlevel >> 50 happens. It does stop after a bit of time.

Please IMPORT the latest version from my GitHub Repo. I have corrected the issue, I believe.

Correct, we cannot actually set the volume of any Harmony Hub controlled device to an absolute value. Some users wanted a way to adjust volume via the Hubitat Dashboard, so I came up with this solution. The volume is always at 50 in the device. If you set volume to a value above 50, it will increase the volume like you pressed the 'Volume Up' button on the remote. Then the driver resets the value back down to 50 to be ready for the next command. Likewise, a volume command of less than 50, will lower the volume, and then the device volume will bounce back to 50.

In both cases, as well as using the volumeUp and volumeDown command, the driver will use the User Preference for "VolumeRepeat" to issue the actual IR command a certain number of times. This was added to make it easier to actually move the volume on the actual device a meaningful amount, without having to issue a bunch of commands. Sort of like automatically pressing the volume up button on your remote control a bunch of times.

3 Likes

That worked. Thank you very much!

2 Likes

@ogiewon,
Thanks for this driver. It works a treat however I was wondering if there is any way to expose specific IR commands to hubitat without it needing to be an activity. Basically there are a few things that I would like to be able to control without ending the current activity, but have yet to find a workaround for this. Sorry if this has already been asked, I didnt find it when I did a search for it.

Yes, you can issue device specific commands, as long as you know the device ID and the command. The device ID can be found in the STATE data section on the parent device’s details page. The actual device command is much trickier to figure out. It has been discussed a few times in previous posts of this thread.

@phil.gush - here is a post where I helped another user figure out the device commands available. It takes a little Groovy programming to be able to see the list of commands per device...

[Release] Logitech Harmony Hub Driver v0.1.20200301

2 Likes

I do not use the activities at all with the harmony hub. I was always trying to find ways to work around them....Thank goodness for this integration @ogiewon !! In fact, if I wanted to create an "activity" I would probably do it through rule machine.

You can send any command to any device by using the device command feature. (from the device page or in rule machine)


You get the device id from the Harmony hub device page:

And the command name from the harmony app.

I don't even use this Harmon Kardon receiver any more. I just teach it new commands from different remotes in the harmony app. Whatever you name the command is the name you would use on the command line. The example above are commands I use to control my samsung TV.

6 Likes

So cool...when will the award ceremony for @ogiewon be happening again? I think an Oscar and Emmy are called for - maybe an Oscemmy!! :slight_smile:

Thanks for this driver. Another great contribution.

1 Like

Sorry for being a noob, but I'm moving from ST to HE and I use a smart socket to turn on my subwoofer via ST integration with Logitech activities. Does this driver support control in that direction?

This integration will create a “Switch” device for each of your Harmony Activities. Thus, when a specific Activity turns “on” in Hubitat, you can use an app like Simple Automations or Rule Machine to turn on the subwoofer smart outlet.

2 Likes

I should have thought of that. Thanks.

1 Like

Can anyone help me with getting this up and running? I've followed the instructions closely but I'm getting this error in the logs every time:

org.apache.http.conn.ConnectTimeoutException: Connect to 192.168.5.61:8088 [/192.168.5.61] failed: connect timed out on line 276 (initialize)

Thanks!

Sounds like the IP address of your Harmony hub is either incorrect, or it is not accessible from the Hubitat hub.

1 Like

Correct, my Tenda Mesh network had decided to start issuing IP addresses :roll_eyes: All good now.

1 Like