[Release] Logitech Harmony Hub Driver v0.1.20190107


#101

If you look through the Logitech Harmony Hub parent driver code, you will find the parse() routine where all of the responses from the Harmony Hub are handled. The last case that is handled is when the parse() routine doesn't know what to do with the incoming data, and thus it simply performs a log.info call to make the data available in the Live Logs.

Ok, so now all you have to do, is look at how I handled all of the known incoming messages. You can then add another IF statement to look for the incoming traffic you're interested in and then take some action. That is the harder part... What type of action do you want to take? I would recommend adding the "Pushable Button" capability to the parent driver. This would allow you to create 'button pushed' events that any other app on the hub could use.

Hopefully this gets you started... It seems like this make be a fairly custom solution, so I am not sure if I could add this to the shared code that everyone uses. Many of the Harmony remote controls do not have those device control buttons at all... We'll need to think about this for a while... Maybe some sort of drop down user preference to select the type of Harmony Remote control? But even then, I am guessing the data only is broadcast from the Harmony Hub when you've associated those buttons with an action, like changing the Hue bulb dimming level? I'd like to keep the shared driver generic. If there is a way to do that and still include support for those buttons, I am all in.


#102

Thanks Dan. I will be giving it a go this weekend. As you say though I think it will be a very customised solution. Obviously, I will post my changes here if I get it working in case they are any use to anyone else.


#103

Eureka!!!! I now have 4 working Bulb/Socket buttons with instant response :grinning:

I will PM the code to Dan for him to check over as I am a very much an amateur, trial and error coder, and wouldn't want to screw up anyone's system with any bugs.

But I've essentially done what Dan suggested, added pushable button capability and then checked for the specific activityID (eg hueScene-Jf9JhjN0a-O2I7o) that is sent when one of the home control buttons has been allocated to a Hue scene. The button presses then just become like any other Hubitat button and the world is your lobster Rodney!!

I haven't found a way to access the +/- button presses because they are only active if one of the other buttons is programmed to a bulb rather than a scene, and then only when it is the last button to have been pressed. You do need the buttons programmed to a scene to be able to trap the button presses. so I don't think that is going to be easily do-able, but I'm happy to have the other 4 working and you can always allocate to +/- buttons to AV functions rather than have them do nothing.


#104

With Dan's help I have sorted a small bug in the code and it is running very smoothly so far. I've allocated commands to all 4 buttons using Hubitat button controller and the response is just as quick, if not quicker, than hitting buttons on my Remotec Zwave remotes. IMO this is now much better than the standard Harmony control of Hue. I have complete freedom of what the buttons control within my system, whereas with the standard Harmony Hue interface, you are stuck with the short press for on, long press for off and it can only control lights.

Dan and I both think this isn't the sort of code that lends itself to putting in his generic driver code as it depends on cutting and pasting ActivityID codes from the logs and that will obviously be specific to each individual user. But if anyone wants to do this I'd be happy to send a copy of my driver code that they can then customise to suit their specific ActivityID's.

I have changed how the Hue scenes work a bit now too. Rather than set the bulb level to 5,10,15% etc for each scene, it now doesn't matter what the scene does, I just need it's unique ActivityID . So now each scene sets the same bulb to the minimum permitted dim level and the only difference between them is the name. I've called them Bulb1, Bulb2, Socket1 & Socket2, just to make it clear which one is which when programming the Harmony remote buttons.

Also, after experimenting, the Hue bulb itself doesn't even seem to need to be connected once it's all been set up. I've had mine disconnected for several hours just to see what happens, and although the Hue app says it's unreachable, the Harmony buttons continue to work fine.


#105

Geoff,

I would love to give this a try. Can you please send the code to me?

Thanks,
Mark


#106

PM on its way.


#107

Wanted to drop back by and say that this has been working so well for me that I forgot it was there :sunglasses: Absolutely no hiccups or strange behavior at all since the auto-reconnect update a few weeks ago. Been through a couple of FW updates to HE hub and everything has gone very smoothly, haven't had to think about Harmony once. Thanks again for your work on this @ogiewon


#108

Thanks for the feedback. I too am extremely happy with how this integration is working. Not a single complaint from the family since deploying it. I haven't had a single issue with it and haven't touched the code whatsoever. As you mentioned, I haven't had to think about it as it just seems to work! As my data always taught me... "Rather be lucky than good any day!" :slight_smile:


#109

Just wanted to Thank You for your work on this. It had been working great.


#110

I love how much quicker this is! Many thanks for the work, and glad to report not a single issue here :slight_smile: