[Release] Logitech Harmony Hub Driver v0.1.20190723


#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:


#111

Hi everyone, I just received my HE hub today and got it setup, I was trying to get harmony working on it but I get getting this error in the log can somebody help determine what I'm doing wrong

2019-01-24 10:29:10.983 pm errorFailed to create child device with error = com.hubitat.app.exception.UnknownDeviceTypeException: Device type 'Child Switch' in namespace 'ogiewon' not found


#112

It appears that you may have skipped this step from my ReadMe...


#113

:man_facepalming:I sure did. It's working great now I can see all my activities. Thank you :slight_smile:


#114

I've discovered another (admittedly very niche) use for this great driver.

I previously had a his and hers remote setup with an Elite and a Companion remote on the same hub. But I found the Elite a bit of a PITA to be honest. It was quite laggy and I found the Companion button layout much better and just generally easier to use. Anyway, because of a strange Logitech system restriction you can't have 2 Companions on the same hub. But, by having 2 hubs with duplicate activities and both connected using this driver to HE, I can tie the activities of both hubs together via their HE activity switches and they now work as if they were on one hub. So if activity X starts on one hub it automatically (and instantly) starts activity X on the other hub and the remotes stay in sync. So I now have 2 Companion remotes working perfectly in Harmony (sorry!) and an Elite for sale on EBay. Its a pain that Logitech have forced this to be more complicated and expensive than it should be, but it works really well and wouldn't have been possible without HE and Dan's driver.

Thanks again Dan :+1:


#115

Good to know. I always wondered about the elite. My Harmony One suffers the same fate. I find it also laggy. From the time I pick up the remote to pressing a button is always too much of a delay. I wondered if the elite had that same issue as they are selling it for 450$ (Cheaper if you look around) in Canada. For that price i should be near perfect.

I love the companion remotes though. They are very responsive and better lay out. I just wish they had a screen (for more customization) and a backlit keypad so I can see it in the dark.


#116

:point_up: 100% agree with this!

On the topic of the Elite, I love mine. My other two Harmony Hubs are companion remotes only. My wife misses the backlight.

@Geoff_T - What kind of condition is your Elite in? How long have you had it? Is it already on eBay?


#117

Yes I think the screen remotes must go into some sort of sleep mode when the screen goes off and if you then press a button it has to wake up before it sends the command. It's not good and the problem has been complained about to Logitech for years apparently. Also I found it too easy to trigger another activity accidently when picking up the remote. I agree about the Companion. It's a great little remote and sits nicely in the hand. Don't have to worry about putting it on charge either.


#118

It's perfect. Its only a few weeks old. Its on EBay for £90 buy it now as we speak. Not sure if I'm allowed to post links on here but it's on the UK site and the main picture is of the remote, charger, booklet etc lying on the carpet.


#119

I found it. It does look nice and new...probably not worth the hassle of shipping to the US. Thanks, though.


#120

My dog does this all the time if I leave it sitting on the couch.