[Release] Logitech Harmony Hub Driver v0.1.20230311

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]]]

Please explain what you're describing above, as I am completely lost.

This appears to be from the Hubitat side of things. Is this data coming from my Logitech Hub parent driver? If so, it appears to be some additional JSON from the Harmony Hub. Without understanding how you linked Zigbee/Z-Wave devices directly with the Harmony hub, I have no idea how to assist you.

Please reverse my deletion.

I wish I could! Tagging @bobbyD to see if he can undelete your post above.

1 Like

Done! Thanks @ogiewon

1 Like

Yes, I enabled the code to get the log from Logitech Hub parent driver.
The Harmony Home Hub Extender allows you to do some minor home automation. Here is a web page. Explains it a little bit.
https://support.myharmony.com/en-us/home-hub-extender

Now I'm also new to Hubitat. I came from a Wink system.

There is an option to link a Wink system with Harmony Home Hub Extender. This allowed me to control the lights from the Wink system. It worked pretty good, but Harmony Automation Control is nothing like the Hubitat system.

Now I want Hubatit to control all of my lighting and I would use my Harmony remote to turn on TV and set a scene. I have that setup and work just fine right now. I also have a light on/off soft button that I want to turn On/Off other lights in the room this way I can getup and leave the room without stubbing a toe. LOL I can't do that with the code only looking at the Activity of the button. If I press the button it is already active. Even though the Harmony's softbutton is set to toggle the lights on and off. I would need to press another button to move the Activity to a new button. Hey LightBulb moment!! pardon the pun. Well let me see if I split the button into two softbuttons an Lights On and Lights Off. That should work.
It would still be nice to have only one button. If you like to still figure this out , we can meet up in a ZOOM, Skype, MS Teams or over the phone and go over everthing.

Thanks for your time and Patience, Mike

To be honest...I would love for someone else to figure this out. :slightly_smiling_face: Numerous folks have looked at it, myself included, and none have found a solution. I sincerely wish you the best of luck. Numerous users would appreciate it. For me, I can just map remote control buttons to my Lutron dimmers, without the need for Hubitat. I still use my Hubitat integration to control Harmony Activities.

Once you remove your home-hub-extender Integration from your Harmony Hub, my guess is you will stop seeing those Harmony remote control buttons produce any data via webSockets.

1 Like

Just wanted to say thanks for this driver. I got a harmony hub a year or so ago, but never really used it. I really don't watch much TV anymore and just never found a real use.

Well today I found a use. I have a portable roll around AC unit down in my shop that has a IR remote and I had purchased a cheap IR device that could learn the on and off codes of the remote so I could turn the unit on and off in my shop office.

I basically had it setup so I would get a warning from HE that the office temp was high and then I could turn on the AC unit with my phone. I had this setup with another system I was trying for awhile and duplicated it when I switched to HE.

While browsing the forums I came across this thread and wondered if the Harmony could learn the IR codes from the AC unit and I could then get the setup totally automated. It does and I could. I now no longer have to be in the loop. If the temp gets high HE will turn on everything automatically. So thanks again. :+1:

5 Likes

Sorry to be dense. I LOVE this integration and was hoping to trigger Hubitat events based on the colored buttons. Is that possible? That is to say that it would be quite nice to be able to manually turn off my lights using the remote control...

1 Like

What this ever added. The home control button support?

Nope.

Can I add h.e device to home assistant? I’m thinking light to he to h.a to emulated hue hub to harmony remote?