Harmony Hub Integration

Any chance of getting Harmony hub and MyQ integrated?

7 Likes

Thanks for the feature requests. They are on our Integration Wish List and will add your request to the list.

6 Likes

+1 for Harmony Hub, please!

Is IFTTT on the roadmap as well? While IFTTT isn’t the fastest platform, it would provide integration with a vast number of other services very quickly.

6 Likes

Matt, with your permission, I'd like to split this in two different topics, one for MYQ and one for Harmony. That way we can track and update each integration request individually. There will be 3 tags available for feature requests (and we could add more if we need to).

request_device
request_application
request_other

@john.eubanks thanks for your suggestion

1 Like

@bobbyD, I’m happy to be of use :smile:

1 Like

By all means. Three that I need are Harmony, Nest, and MyQ. That would allow me to get rid of ST all together.

3 Likes

I have been experimenting with the harmony-api server found in this GitHub repo

I am running this on a Raspberry PI that I also run Homebridge on. Just a few minutes ago I was able to use a Virtual HTTP Switch Driver (shamelessly taken from an old ST post) and got it to turn on my "Watch TV" activity and then turn off the Harmony Hub's current activity (which shuts down all of my AV equioment.) I am going to work at packaging this up as an intermediary Harmony Hub workaround solution until Hubitat release an official integration. I should have something fairly easy to install and use within a day or two and will share the information here.

4 Likes

Thank you for this @ogiewon. Maybe looking at the kuku harmony post in the ST forums will be helpful as well.

Yes, that is exactly where I started. However, KuKuHarmony does NOT handle Harmony Activities at all, if I read correctly… It seems KuKu is focused on individual device commands, not activities. He mentions in some of his posts to use the official ST/Harmony integration for Harmony Activities.

All I really need at this point is the simple ability to turn on/change an activity and shut everything down. That would allow me to replace my current dependency on SmartThings for how I use the Harmony Hub integration.

So, for now, I think I am going to try the KISS (keep it simple, stupid) approach. I am not a very good groovy programmer, so perhaps someone else will want to take up the challenge to make a more sophisticated App that automatically queries the Harmony hub for Activities and creates child devices for each one? That would be a good start. I may try to tackle that once I get the basics working… :slight_smile:

3 Likes

Ahh…I didn’t realize that. What you are working on is exactly what I need as well. Look forward to see what you come up with. This and hue would allow me to bring over most of my devices.

4 Likes

Harmony is the only thing I have left in ST get it working and I would be golden.

Early adopters, here is a very basic Logitech Harmony Hub integration for Hubitat. The install and configuration is manual, but it does appear to work in my limited testing over the past 24 hours.

You will need to get the harmony-api server up and running on another system on the same LAN as your Harmony Hub and Hubitat Elevation hub. I did this on a Raspberry Pi that I also use for Homebridge.

Here is the ReadMe from my Hubitat GitHub repository that should help get you started. Let me know how it goes. If you want to help improve the ReadMe, please feel free to submit a pull request with you edits.

4 Likes

Arggg…now I have another App to try tonight. My wife is not gonna be happy…but I will be if this works.

Thanks in advance…and if this works…I’ll have just one integration left to be all in. Huey, Huey…Where art thou? Me thinks @patrick can find him.

2 Likes

I just update the “HTTP Momentary Switch” driver as I noticed that these devices would sometimes get stuck in the “on” state, which should never happen by design. I have modified the code and revised my GitHub repo accordingly.

Although this is a cloud to cloud solution, it works until a local solution is finalized.

Control Hubitat from Harmony Activities

  1. Setup Hubitat SmartThings Integration

  2. Create a simulated switch in SmartThings

  3. Use Rule Machine in Hubitat to assign actions based upon the virtual switch turning on.
    Note: So the virtual switch in Hubitat is ready to activate again, set a rule to turn it off after a 1 second delay.

  4. From the Harmony App > Harmony Setup > Devices - Authorize connection to SmartThings and enable access to the virtual switch in SmartThings.

  5. Create an activity (Ex. Dining Room OFF) and set the home controls to turn the virtual switch on when the activity starts. This could also be assigned to an existing activity, and as a second example, you would have the virtual switch trigger a rule via RM that dims your lights when the Harmony activity starts.

You can also go the other direction if you need to - Control Harmony from Hubitat

  1. Setup Other Hub

  2. Install the Logitech Harmony Trigger SmartApp in SmartThings (Marketplace > SmartApps > + More)

  3. Using the Logitech Harmony Hub Control SmartApp, configure it to react to the state of your virtual switch, which is linked to your OH switch in SmartThings, and it will now start a Harmony activity.

2 Likes

I was interested in the harmony-api with KuKu since it runs locally but I haven’t had a chance to get it setup on my Pi.

But! I did get the native SmartThings Harmony (Connect) SmartApp and Hub/Activity DTHs ported over. Main issue is getting OAuth setup since I don’t have an API key and I’m not sure if Logitech is going to respond to my request for one. In the meantime the auth tokens can just be copied over from SmartThings after it’s successfully authenticated there. There isn’t any refresh or expiration on the tokens from what I see. Only if the account password is changed or they’re otherwise revoked. So once it’s setup once, it should continue working without any intervention. Disclaimer: This might be against TOS somewhere, but seems to be an open API if you have an auth token.

  1. Login to graph.api.smartthings.com
  2. Click My Locations > smartapps > Logitech Harmony (Connect)
  3. Save both HarmonyAccessToken and accessToken (easy to confuse by name)
  4. Install both drivers and app from github here.
  5. On the Manual Authentication step, paste the two values copied from the ST install.
  6. Hubs/Activities should be found. The page refreshes every 15 seconds during setup so they might not show up right away.

Luckily there weren’t too many code changes required. Obviously the OAuth entry changes and also needed to modify the asynchttp methods to the regular synchronous ones. I think there’s possibly an issue with Hubitat’s sendEvent isStateChanged handling. Repeat events should be handled automatically, but each time polling is called (every 5 minutes) there’s a log entry even if the state hasn’t changed. I added in a check for the activity switch status to prevent this for now.

This is still a cloud connection to Logitech’s servers so not completely local yet, but at least a start and not requiring any extra hardware.

Let me know if it works for you!

9 Likes

Thank you so much! That works great. I tried my “goodnight” activity, which turns off my Insteon lights downstairs and my entertainment system. Worked perfect!

1 Like

KuKu Harmony is working in Hubitat now. There is a ton of code that needs to be cleaned up, but you can get the code from here:

2 Likes

May I suggest you add this to the Code Share category and tag it as a Community_app.

2 Likes

One thing I used in ST integration was the ability to tell set a specific Harmony Hub “all off” so that all activities were terminated. I do see the “all off” command in the hub device in Hubitat, but I don’t see a way to call it via a “switch” using RM?