[Release] Logitech Harmony Hub Driver v0.1.20230311

Please describe what/when you’re seeing a delay. This driver has numerous pieces and parts, and thus I am not sure what you’re describing.

If you’re referring to using the Home Control buttons on the remote..the only time you might see a delay is immediately after clicking SAVE on the device details page. Immediately following, the driver queries the Harmony Hub for new Activities which can take a while to process (somewhere in the 5-20 seconds range.)

I have so far only set button 1 to control a lamp and this was done by identifying the device id for button one (from debug in logs), pasting it into the driver page for button one, saving preferences. After this i tried to turn on off the lamp and the delay for both actions. I tried again this morning and same thing. I may have missed some steps for implementing this. I updated the code and then turned on debug found the button id and pasted. Did I misunderstand the update and fail to do it correctly?

It sounds like you configured it correctly. Let's simplify the problem by breaking into its two main parts... Open up the Harmony Hub Parent Device details page. With that page open, click the EVENTS link in the top left corner. You should now seen any recent activity for this device. Now push the home control button on your remote control, and then start refreshing the EVENTS web page for the Harmony Hub Parent device... You should see a 'pushed' event appear pretty quickly that corresponds to the button press on the remote. Try the same thing with Holding the same button on your remote, and then refresh the Events page. You should see the Hold event appear relatively quickly.

If you're not seeing these events generated with about 1 second of pushing/holding the Home Control button on your remote control, we know the issue is with the Remote/Harmony Hub/Harmony Hub Parent Driver...

If you are seeing the events generated relatively quickly, then the issue is with the Automation you created on the Hubitat hub to handle the button 1 pushed/held events to turn on your lights.

This is much simpler to debug if you set up multiple Home Control buttons in the Harmony Hub Parent Device. Once you do this, you can simply watch the status of the 'pushed' and 'held' attributes in the Current States section of the device details page for changes from button 1 to 2 to 3 to 4 as you push or hold the buttons on the remote. With only one button defined, it will never visibly change on the device details screen, which is why I recommended refreshing the EVENTS page instead.

Okay, I will set another after work. Should toggle on/off be stayed away from and only use single action for pushed and held? I am no programmer so I am learning as I go. Thanks for the help!

What Hubitat App are you using to handle the 'pushed' and 'held' events? You should be able to use a Toggle action on a light. But, if that light is slow to respond with an updated state back to Hubitat, that could result in poor performance of the automation. This is why it is always a good idea to determine where the delay is coming from...the button device (in this case, the Harmony Hub parent device) OR the automation.

I rarely use TOGGLE as an action. When I was testing this particular functionality yesterday, I used 'pushed' to turn on a light and 'held' to turn off a light.

I am using ABC (advanced button controller). I will change to pushed and held and post if there is an improvement. I will looking into the other suggestions you made too!

I am also using ABC to handle these button pushed and held events.

:+1::+1::+1::+1::+1: Thank you so much for this. Not having the home control was the only feature I missed after tossing Smartthings into the abyss. Mapped the buttons to 4 new virtual buttons on my parents smartthings unit, got the codes and mapped them with the built in Button Controller. Devices respond so quick. Thanks again!!

1 Like

Instructions coming for using this properly. I just want to make sure all the edits are done before I type them all up.

2 Likes

Anxiously waiting. I would love to be able to control my lights and Fans using my Harmony Hub

The introduction needs few words. This addition to the driver will allow you to use the "Bulb" and "Socket" buttons on your Harmony Elite/950/Companion. All you would need to do essentially is log onto a SmartThings account (you don't even need a hub anymore) and create four virtual devices and assign them to the harmony.

Let's begin:

  1. Open a Smartthings account if you don't have one

  2. Log into ide.smartthings.com

  3. Go to "My Devices"

  4. Add a Device

  5. Give your first Virtual Dimmer a name

  6. In device type, put "virtual dimmer"

  7. Repeat this 3 more times for the total of 4 virtual dimmers.

  8. Log into the Hamony app

  9. Choose "SmartThings" in Devices and after you authenticate, it will ask you which devices you want to use.

  10. Put check marks into your 4 Virtual Dimmers that you created

  11. Press "Authorize" at the end of the page

  12. Make sure to press the "Click Here" when it allows you to.

It may take a while depending on the size of your SmartThings device list but once it finishes, go back to the main menu.

  1. Remote and Hub
  2. Button Customization
  3. Customize Buttons
  4. Home Control Buttons
  5. For each button, select your virtual dimmer 1 through four) until all four buttons are populated with all the dimmers you created.

Press Save as many and forward to make sure that the remote screen comes back up

Sync your remote

Install the latest version of this driver.
Add the IP address and save.

Go back into the same device when the child devices are populated.
Click on "Debug" and save customizations.

Open a separate window to the Hubitat log.

Click on the parent device and then press one of the bulb or socket buttons.

You'll see a very large ID number for each button pressed.. Copy JUST the numbers/letters, no quotes or other words.

It will look like this:
Unhandled data from Harmony Hub. json = {"type":"automation.state?notify","data":{"24f7da4c-054b-4ab4-be2f-3fec85a8bb5c":{"status":0,"brightness":256.56565656566,"on":true}}}"

You want to copy 24f7da4c-054b-4ab4-be2f-3fec85a8bb5c

Then paste that to the proper zone in here:


So, if you pressed the top bulb socket, paste it into "Light 1"

Do this for the remaining buttons that you want to program.

If you want to use Webcore, make sure to add your Harmony Parent to "pushable button" and "holdable button" and and create a piston like this:

That is it!

Enjoy your new functions. If I missed anything, let me know, I'll add it to these instructions.

7 Likes

Excellent guide! I'm really happy to see that this can be done without a ST hub.
Until now, I used 4 Hue bulbs to be able to use the buttons on the remote. It worked but wasn't a nice and clean solution.

@ogiewon I was able to configure the other buttons and they work as stated with normal response button one takes anywhere from 8 to 25 seconds . Any thoughts? I am lost as to why only one of the four has a huge delay. Buttons register right away in logs.

No clue why one button out of 4 would be slower than the others. Are you sure it isn’t something in your automation that uses the button?

I will keep watching logs and see what jumps out with some use maybe I will catch what is causing it. Thanks for the outstanding app and help! I will let you know what I come up with.

I have major issues when enabling the log to get button presses but it recovers after a while.

@ogiewon You might want to increase the debug time, It takes about 3 minutes to recover from "save preferences" or ash-can the entire idea of disabling the log after a certain amount of time.

It is set to 30 minutes, which should be plenty of time for most users.

I wonder if your Harmony Hub has way more Activities and Devices defined than most? How about third-party integrations with the Harmony Hub? I have Lutron Caseta integrated with my Harmony Hub, and thus I see quite a bit of webSocket traffic for those Caseta devices coming from the Harmony hub. I wonder if this type of traffic adds to the delay you're seeing?

I feel 30 minutes is plenty of time for the vast majority of users. Feel free to tweak your copy of the code to extend the amount of time beyond the current 1800 seconds on line 310. Or simply comment out that line altogether to prevent the automatic disabling of the debug logging.

@ogiewon, I now have it all working and I have eight devices setup on the four buttons with toggle for press and held. I rebooted all hubs 3 Hubitat, one SmartThings, and four Harmony Hubs waited 15 minutes reconfigured and all good! Maybe something hung in the memory in hub connect but all good now thanks again.

1 Like

Excellent! Glad to hear it's working.

Oh. I thought it was 5mins.

I have about 7 activities and 10 devices. Is that a lot?

What do you think that can be done about the brightness buttons (up/down rocker)?

It seems doable, just brighten or dim the last item controlled with the home control buttons.

Set an attribute like "last controlled device" and figure out if the top rocker or bottom rocker has been depressed with some other variable or class to find out which way brightness is going, up or down.