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.
- Login to graph.api.smartthings.com
- Click My Locations > smartapps > Logitech Harmony (Connect)
- Save both HarmonyAccessToken and accessToken (easy to confuse by name)
- Install both drivers and app from github here.
- On the Manual Authentication step, paste the two values copied from the ST install.
- 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!