[Release] Logitech Harmony Hub Driver v0.1.20230311

Hi, I updated the driver last night myself after finding out I was a few versions behind. I just copied the url from the driver code page for this driver and checked to see if it was the latest version. I was out of date so took the url and on the driver page imported using that url. I didn't experience any issues.

As for using the device and its associated child devices, ask away and if I can offer any advice, based on my learning, I will answer what I can.

@ sburke781
I tried my button idea and it of course works within Hubitat but due to the limitations in how a HE button is used in Sharptools it does not act as a button. I remember Josh over at sharptools mentioning that.

Ok, I don't use SharpTools, so wasn't me aware, but good to know. Thanks for letting me (us) know.

You can use a SharpTools rule to execute the device action directly from your SharpTools dashboard or you can use a virtual switch (configured with auto-off) if you prefer to run a Rule Machine rule.

1 Like

Josh, understood and that is what you pointed out in the Sharptools forum, I am trying to figure out how to operate the volume control, one push raises the volume .5 each time. So raising the volume using a switch means push, release push, release ... until you get to the desired volume level. I am certain there are other ways to do the same task. I will submit a feature request in Sharptools to see if a button can be added for HE use. Thanks for jumping in, as always you are quick with a helpful reply!!
Cheers
B

Thanks for the clarification on the use case! Feedback noted. :slight_smile:

Edit: I forgot to mention that you could also use a Momentary device type. Once added to your dashboard, you can change the tile layout to Momentary Tile layout and it will act like a button.

I put together a Virtual Momentary Switch driver that is a Switch, Momentary, and Button. That probably provides the best flexibility between Rule Machine and SharpTools for a 'button' type of functionality.

From the Hubitat device's perspective it's just sending a deviceCommand('YOUR-VALUE') command each time, right?

You can call a SharpTools rule directly from your dashboard. For example, I might create a rule with just a device command in the Flow (no Triggers):

Then in my dashboard, I would directly add the rule as a tile to my dashboard. So each time I tap on that tile, it would send the device command (or multiple device commands if there were multiple in the flow):

Thanks, I've updated the driver. I might wait till I get home tomorrow till I muck around getting the child devices to work.
Although, what I couldn't get to work was turning on my Fetch box by turning the switch that was created for it on. Perhaps I need to turn the main switch for the Harmony up on as well??
The only thing I have used the app for in the past was to detect that the Off switch had been clicked on the remote, I have a rule that when the switch Harmony remote turns everything on it Off, the rule turns my stair lights on & via another app it checks that all the doors are shut & if not advises which

Probably a stupid newbie question.

I have a device command I want to issue on the Hubitat dashboard. How do you go about that? What template?

You can't run what are referred to as commands from the dashboard directly, at least you haven't been for most of the time I have been using them, not sure if that has changed....

What you need to do is setup a virtual switch or virtual button and use this as a trigger in a rule. If you only want to do this in a dashboard, I would create a virtual button, setup a button controller "rule" (child app) that is triggered by the pushing of button 1, which runs a custom command, calling the deviceCommand command. You then add the virtual button device to the dashboard devices and create a tile on your dashboard for the button.

Makes sense? :slightly_smiling_face:

The same approach can be used for commands on any HE device, not just the Harmony hub.

The only time you would use a switch is if you intend to expose the triggering of the command in Google Home or maybe Alexa.

1 Like

Thanks @sburke781 that makes sense that I have to create a virtual device.

I am a newbie though. When you say "I would create a virtual button, setup a button controller "rule" (child app) that is triggered by the pushing of button"

vs

"The only time you would use a switch is if you intend to expose the triggering of the command in Google Home or maybe Alexa."

My question is this "button controller "rule" child app" thing. Where do I go for that? If there is some documentation I can be pointed to that's fine. I know how to create a virtual switch. I did that to get something working with SmartThings. But not sure on this rule / child app thing. I know how to make rules in the rules engine (sorta).

It’s pretty straightforward

  • Create a Virtual Button Device
  • Add the “Button Controllers” App
  • Within the BC app, create a new Button Controller and use the Virtual Button as the trigger. Add whatever actions you’d like.
  • From the Hubitat Dashboard, trigger the virtual button.

Hope this helps.

Note: Instead of using the Button Controllers app, you can also simply use the Rule Machine app, and create a new Rule that is triggered by the virtual button device you created earlier.

1 Like

Hi @ogiewon - is it possible to expose more data to MakerAPI?

I'd like to add a custom dashboard tile for this device/driver in my app but it seems like there's not enough info available today to do that.

While I can call some generic methods like mute/on/off, most other commands require the device ID. Is it possible to get a list of the available devices (name + ID)? I see they're visible in the state variables section of the driver

I also see in the debug logs there's a LOT of device info - every activity and available command that can be sent. I'm not sure if it makes sense for the driver to capture and expose all of this data -- but with it someone could do a lot to replicate the remote in a dashboard or some other UI.

My goal has always been to simply map the Harmony Hub's features as standard Hubitat Capabilities, nothing more. The problem is that there are a vast number of devices supported by Harmony, each with unique lists of features/commands available. This makes it very challenging to try and find a single solution that fits well for Harmony 'Devices'. Thus, the focus has been on the Harmony 'Activities' which are much simpler. I personally cannot understand why anyone would want to use a smart phone or tablet to interact manually with a Harmony Hub. It just is not an intuitive interface. They can simply use the Harmony app if they are so inclined. I personally use the physical Harmony Remote control for 99% of my interaction with my home theater system. I do have Hubitat start and stop Activities based on things like "Good Morning" and "Good Night" routines that I have implemented.

Not sure how these would be exposed via MakerAPI, as detailed JSON data does not fit into the Hubitat standard capabilities model. Perhaps your application might be better off simply connecting directly to the Harmony Hub on the local network? There are plenty of Open Source code examples that you could use in Android to directly connect to a Harmony Hub. Just a thought... :thinking:

@ogiewon

I must be dense. In the command controller how do you set a device command properly for the harmony device?

This is a pretty solid integration. I agree you should not replicate your remote in your dashboard. My use case is I have a infrared space heater I would like control. Logitech harmony can control anything!

@Brian2000, here is an example of a Button Controller instance that makes a custom command call to the Parent Harmony device.

The deviceId and command parameters are around the other way aren't they?

1 Like

Yep, I fixed the image in my post above. Thx!

1 Like

Thanks for the reply - and I personally also only use this driver for a couple of simple voice actions "turn TV on/off" or a simple dashboard tile that does the same thing.

But, while working on my dashboard app I realized there's a lot of people using dashboards for a lot of things I wouldn't have previously thought of. So, I just try to make the app as flexible as possible.

Anyway, yeah, trying to add every command would probably be overkill for any dashboard. I was originally just thinking of supporting many of the commands that are part of the parent device driver - which includes the navigation arrows. Then I realized these commands all require a device ID which isn't listed anywhere (at least exposed via Maker API). So I was really just looking for the possible device ID's to start (and the device name).

Of course, that leads to thinking about other possible things that could be done and that's where the deviceCommand options came from. I had also thought it could be nice to allow the user to switch activities and I realized there wasn't a way to do this via the parent driver (I know I could use each child driver for this but for me personally having it all on a single dashboard tile would be easier)..

I was hoping some of these request would just be easy on your end but no biggie if not either

Yep - this is what I was thinking... not building a remote control UI in the dashboard but a UI where a user can select a device and command from a list and have a tile or button on a tile call that command. I can prompt the user to enter the device ID and command name too - and accomplish the same thing. But, having the ability to just select from a list - esp on a mobile device is always a plus

Thanks for the help. I am a total newbie. The problem with Rule machine is I can see what you did, but not the steps to do it (no copy paste). I had to go through all options to figure it out.

Anyway attached shows in the button controller wizard what things to poke to get what you need.

Also, I found someone created a virtual button switch for Alexa (https://github.com/mikee385/hubitat-mikee385/blob/master/drivers/virtual-alexa-button.groovy)

So, you can have one virtual device do both (creates a switch that is momentary as well). I am still a newbie though!

2 Likes