[Release] Logitech Harmony Hub Driver v0.1.20230311

You're not missing anything. That is really not possible with this integration. This simply provides a means to map Harmony Activities into Hubitat.

Note: A saavy user or two has accomplished using the Harmony Elite smart device buttons, but it takes some customization and ingenuity.

Thank you @ogiewon!

This is a nice integration. I can control my activities really well (especially turn them off when they're not supposed to be turned on :smiley:)

One question - is there any way to control individual devices through this integration? I'm guessing not, or at least I couldn't find any. I'm currently using HA-Bridge running on an Odroid for that.

Currently, no... Another user was working on adding Device control capability, but it gets very complicated, very quickly as many Home Entertainment Devices do not map very well into Hubitat Devices.

1 Like

Yup. I can see that. My need was for volume control, which would map to a virtual dimmer very nicely. Turn it up a couple notches when the air-handler blower comes on, and crank it down when it goes off ....

I created an activity on my harmony that does nothing but turn up the volume. I can access it from HE and Alexa. Should work for what you want.

If you still have your ST hub you can do this easily, and it's what I am using. Setup everything in HE. Then, use the Hubconnect App by @srwhite to push the devices you want to control via Harmony to ST. You can then use the ST Harmony integration to setup the home control buttons on your remote. You would only be using ST for the Harmony integration.

1 Like

That's what I did and it works really well. It took me a couple tries to get the hub connect devices to become visible in the harmony app but once done I was back to where I was before when using only a Smarthings hub which was the last bit of moving all my devices over to Hubitat.

1 Like

How did you do that exactly? Doesn't that then switch your Harmony remote to being in that activity when you activate it?

E.g. if you are currently in say "watch TV" or "watch satellite" activity doesn't the remote then change to "volume up" activity?

Yes I guess it would. We never use the harmony remote.

1 Like

Yup, that's exactly what happens. So setting up a separate activity to control the volume alone doesn't work for me.

I'm back to using HA-bridge on my Odroid to independently control the sound level (if necessary). And I just realized that HA-Bridge accepts HTTP requests, so Hubitat can directly send commands to it.

I haven't looked at the code yet, as my coding skills are generally limited to using google to modify things others have created. I only use my harmony hub to turn devices on and off as part of hubitat sequences (maybe 7 devices). Right now I have a convoluted system where hubitat sends a http request to tasker which then controls harmony thru a plugin that grabs all the device commands.

Would it be fairly simple for me to modify the code for or on/off commands only? I know not officially supported but it seems others might have simple device commands working.

I found previously (a long time ago) that using separate activities for on and off was a little slow to respond and the harmony didnt react well to multiple activity requests in short timeframes.

Just looking for thoughts before I dig in!

I've posted this before, but for those that are looking for activity control, there is always the Harmony API built on node.js that still works. I've been using it for 2+ years now without an issue.

To use it with HE, one just simply needs to issue HTTP GET/POST requests to the API via RM. Using this method, you could use a button remote to control the volume on an individual device or even dashboard tiles.

1 Like

@ogiewon and I used this a while back but it would progressively affect our Harmony Hub's performance until I needed to reboot it (within a week). I'm surprised this hasn't affected your hub. I wonder what's different about your implementation.

1 Like

I changed the state update times in app.js (line 22 I think?) from 5 seconds to 10 seconds. Since I did that, all three of my hubs have been fine.

It could also be something that was in one of the older firmwares as well. On the past few versions, I've not had any slow downs at all using the harmony-api scripts.

2 Likes

I may have to give this a shot again. I was also planning to test out the node red (contrib-harmony) at some point. Have you played with that node yet?

1 Like

@corerootedxb - As @stephack mentioned, we used the 'harmony-api' nodejs server for quite a while in the early days of Hubitat, but it caused issues with the Harmony Hubs. I even created a Hubitat HTTP Switch Driver specifically to turn on/off Harmony Activities. One issue using it is that it is one-way communications between Harmony Hub and Hubitat, IIRC. If a remote control is used to change the Activity, Hubitat will get out of synch.

The webSocket implementation is really pretty amazing. Super fast, reliable, and no man-in-the-middle server required.

If volume control is everyone's number one wish, I can take a look at trying to add device support for Harmony device classes that are known to support volume (e.g. Receivers, TV's, etc...) It just has not been a high priority for me personally.

6 Likes

I did and it's actually pretty good! There's even a websocket version of it now.

@ogiewon Yeah, I believe that's all been resolved. However, I'm only doing HTTP POSTs from HE to Harmony for volume using a virtual dimmer (it's messy, imho, but it works). For bi-directional communications, I actually modded your HTTP Momentary Switch driver to call for status after the device command was sent and it worked OK. But, like you, my use case is dead simple for Harmony; Turn on/off activities and occasionally adjust the volume of said activities.

Curious - does anyone know if Volume Control is in any way abstracted away from the specific device controlling volume? It would be nice if logitech exposed a volume control that is tied to the Activity versus a specific home theater component. This would allow for a single, universal volume control which the harmony hub would translate into the correct device specific commands. This would be truly universal and would be much simpler to add and maintain. In fact, the Parent Device could have the volume level commands added directly to it, if this were the case. I just haven't poked around enough yet to know if this is possible.

1 Like

AFAIK, Yes. If the activity has a volume capable device included in it, then there is a top level volume up/down. If you don't specify a volume device in your activity, the hub just ignores the volume commands.

That's exactly how I do it with the API today. I use the URL: http://[server]:8282/[hub]/commands/volume[up|down]. I can dig through the code and see what that translates to on the hub if it'll help.

Not sure it will help, as the harmony-api is not using webSockets, IIRC. But, I definitely appreciate the information and the offer for assistance!