[Release] Logitech Harmony Hub Driver v0.1.20230311

I want to execute a rule in Hubitat when I push off (end an activity) on my Logitech Harmony remote. Will this driver allow me to do that?

Yes. Each Harmony Activity will be represented as child “Switch” device within Hubitat. When you press OFF on the remote, the active Activity will turn off. The Parent Device will also be usable to know whether or not any Activity is on, or if they are all off. The Parent Device implements a Switch attribute that represents this. This can easily be used within RM, or any other App that can be triggered by a switch changing states.

2 Likes

This is brilliant. Working so well after I had facepalm when I realized Harmony wasn’t being friendly and I got a Hubitat.

I’m probably missing something obvious, but I’m not seeing any of my Harmony stuff showing up in the rules app. Any ideas?

Each of your Harmony Activities should have been created as a Switch device, named the same as each activity. If you’re not seeing those, did you add my Child Switch driver per the ReadMe instructions?

1 Like

Ah! Switch... as I was reading that I realized I had seen them in switches when making another rule. Outstanding. Thank you. Still learning my around.... you guys are an amazing help and doing amazing stuff. This is a game changer for me.

Next step is to try and figure out how to start music off so it’s playing when I walk through the door.

1 Like

Lots of options for this and most will depend on what speaker devices you have on hand. Off-topic for this thread so if you don't find your answers by using the search functionality start a thread specifically for that purpose. I'm sure there are threads out there about this though. I'm not sure how searchable they are.

So, those home automation buttons. Is it just technically complicated or impossible to get those integrated with Hubitat, or is it that noone has had the time to do it? I don't really want to go through the hassle of setting up Hub Connect just for these buttons...

Also, is there a way for me to activate a certain scene whenever the Pause button is pushed? I don't see how to set a trigger from rule machine?

Great work @ogiewon and @rebecca. This is exactly what I was looking for. :+1:
I've known about this for a long time, but haven't felt like messing with the Harmony since I screwed it up previously.

For whatever reason, I need to refresh, give a second delay, and then power on the activities otherwise it's not consistent. Same with power off. But as soon as I add that to my rule, it works without fail on my Aqara 6 button remote. But, it just might be because I put it on hub with the crazy Aeon v1 HEM that I'm still sending reports from at 1 second interval (not doctor recommended). :wink:

[Edit] Turns out this was an unrelated issue with the way my Aqara 6 button remote rule was functioning. No refresh or delay required. It's all working as expected with the child devices. :smiley:

Thanks so much for this!

1 Like

It is technically not possible. This integration uses the webSocket interface to communicate with the Harmony Hub. So, anything that occurs on the Harmony Hub, that results in data being sent out over the webSocket interface, can be 'read' by this integration. Unfortunately, when you press those 'home automation buttons' on the Harmony remote, nothing is sent via webSockets that this integration can receive (unless those buttons are already bound to a device via another existing Harmony Hub integration, like to SmartThings, Lutron Caseta, or Philips Hue.)

Unfortunately, individual button presses are not sent via the webSockets interface. Therefore, there is no way for this integration to be informed when a specific button is pressed to act as a trigger for RM.

2 Likes

Unfortunately Logitech hasn’t accepted any new integrations with harmony for a couple years now, which really limits our options.

But depending on what you want to do when pushing a button, as @ogiewon mentioned, it’s also possible to link a harmony remote to Caseta or hue devices, and probably even trigger an automation in rule machine (if you got creative with the trigger from a linked caseta/hue device).

Here’s the list of currently (and forever?) available harmony cloud-based integrations from the app:

3 Likes

I’m lost as to the reason anyone wanting to control Hue wouldn’t just use the HE Hue Integration?

Also, @JustinL, I don’t personally agree that setting up HubConnect is a “hassle”. The instructions are clear and easy to follow. You just need to take your time and it all just works when you’re done.

I've installed this and have got it working and am curious about the sending a custom command to a device. I've got a SiriusXM receiver (Onyx EZ) and would like to send commands to it via IR and have it working more or less (channel up, down, etc).

I've found the device ID via the logs from the driver, but how do I figure out what the command number is?
I've fumbled around and figured out that commands 1-10 are favorite channel number 1-10.. but how about finding the rest?
Is there a way via a driver code modification to have it spit out what the device can do per the hub?

Thanks for this great driver!

Possibly... Are you a programmer? If so, the data you’re looking for may be contained within the JSON returned when the Parent driver interrogates the Harmony Hub. Unfortunately, this JSON is often too large for the Live Logs, so you may need to store the data in a “state” variable.

This is why the first 2 lines of the parse() routine look the way they do...

def parse(String description) {
    //log.debug "parsed: $description"
    //state.description = []

If you change it to the following, you’ll get a massive JSON response stored in the “state.description” variable which you can the copy and paste into a JSON viewer to dig into the details of your Activities and Devices.

def parse(String description) {
    log.debug "parsed: $description"
    state.description = description

You’ll need to uncomment the following line as well

command "getConfig"

After you click “getConfig”, the state.description value will populate in the driver details screen AFTER you refresh the web page. Then you can grab the JSON and start having fun!

Good luck!

2 Likes

Thanks! Doing the above I wasn't able to get it to put it into a state variable that I can see on the device (nothing appeared), but I did manage to uncomment a logging line and got it to dump to the log!.. with a lot of info. I was able to throw it into a JSON viewer and can see the data.

Side note: In case anyone is curious, I was able to figure out how to use the DeviceCommand fuction with a button controller and RM after looking at the driver code - you need to pass two string parameters to the actuator. Now I've got it changing the channel on XM!

4 Likes

Awesome integration, works perfectly thank you!

Any chance of getting sensor status through this? Specially thinking of an end run around Nest’s lockdown, as my Nest Protects‘ statuses are linked into my Harmony hub.

Not that I know of, sorry.

1 Like

No worries, thanks again.

1 Like

Hello,

I left the same message on GitHub

On my Harmony Remote I have created several pushed buttons "ActivityID". One of the pushbuttons I use as a toggle to turn on and off my lights. I understand the code is looking if the button is active. I see in the code a variable that a status state has been changed base active or not. Is there a status state of the pushbutton from the harmony system. Whether it is active or not. The code is looking at ActivityID as radio buttons.

The issue is that if my ActivityID is on "Watch TV" and I press "Lights On/Off" The lights turn on. Press "Lights On/Off again ActivityID doesn't change state because I reselected the already active button. I can press "Watch TV" again the Light will turn off but also does my TV. My "Lights On/Off button is not part of the radio button selection of my other selected devices. The above issue is while using the Harmony Remote. From the dashboard it is a little different.
I understand maybe I can change how my remote works. I was curious if there is an easy fix for this code. If you don't have time to investigate this, can you give where I can find the Harmony developers code or command to find the Active button status?

I am still a little confused by what you're trying to accomplish. However, I can try to clarify a few things...

This Hubitat integration utilizes an undocumented Logitech webSockets API to communicate with the Harmony Hub over the LAN. Individual button presses on a Harmony remote control do note generate any webSockets traffic that the Hubitat hub can receive. What is transmitted from the Harmony Hub to Hubitat are the changes in status for the Harmony Activities. That is the only unsolicited data that I have seen come from the Harmony hub.

If you're trying to use the 'Smart Home' device buttons on your Harmony remote control, the only way to do so that I am aware of is to use an official Logitech Harmony Hub integration. For example, Philips Hue and Lutron Caseta devices can be integrated directly with Logitech, in order to control lights attached to those systems. Likewise, SmartThings connected devices can be mapped to those remote control buttons.

However, Logitech has stopped accepting new integrations, and thus Hubitat has no official method to integrate with a Harmony Hub.

Some users have actually used HubConnect (community integration) to mirror Hubitat lights into the SmartThings system. Then, they use the Harmony/SmartThings integration to assign these virtual ST devices to the Harmony remote control's smart home device buttons. Its a bit of kludge, but it works for them.

Others simply add some logic in Hubitat to adjust the lighting in their house based on the Harmony Hub Activities changing state.

Hope this helps to answer your questions. If not, please let me know exactly what you're trying to accomplish.

1 Like

Hello,
Thank You for your reply. I'm a hack. So, with that said.
Yes there is an integration for ZIGBEE/Z-WAVE Devices, this is part of the "Add Device" menu and I have a select button for "ZIGBEE/Z-WAVE DEVICES"

Here is a line of the code from the Harmony Remote when I press the softkey "Display Key" to turn on and off my Lights.

dev:152020-05-22 12:42:25.713 pm debug [type:automation.state?notify, data:[zigbee0x1998:[status:0, brightness:89, on:false, batteryLevel:-1]]]

dev:152020-05-22 12:41:55.453 pm debug [type:automation.state?notify, data:[zigbee0x1998:[status:0, brightness:89, on:true, batteryLevel:-1]]]