HA to HE reverse control

I see there's another effort going on; I started something a few weeks ago for Home Assistant to Hubitat integration but hadn't touched it for a while and figured I'd share what I started in case anyone is interested after some attempts at cleanup I did tonight. Here's what I did:

It's not super fleshed out right now (just switches, motion sensors, and contact sensors) and minimally tested, but I figured I'd share in case anyone thinks it's a good start. Not sure how it compares to the other effort, but that one is probably better if they have any familiarity with Home Assistant's API, as I do not and am trying to figure out what I can from their docs and the way it seems to actually work. :slight_smile: (Why do you need to pass an apparently-incremented id with each command? Security? Tracking separate commands?)

Generally speaking, my vision here was for this to work like the Hue Bridge integration: use an app to help set things up originally and also use the app to choose specific devices, by type, to add to Hubitat. In fact, I based it on my Hue Bridge integration, though between switching from HTTP to websocket connections for most communications, needing to therefore move most of it to a driver instead of an app, and my desire to use generic component devices instead of custom drivers whenever possible (just two pieces of code you need: the app and the "Home Assistant hub" driver), I'm not sure there's much of that left...

Known issues:

  • Lots of device types not yet supported
  • Websocket occasionally disconnects; not sure if this is something I'm doing wrong (is it that id thing?!) or just something with my Home Assistant setup, but the driver does attempt reconnection and should do so successfully if everything is working
  • Minimal testing, so not sure if all commands and attributes "sync" yet
  • No easy way to overcome that I can see: all Home Assistant entities will be imported/seen as separate devices in Hubitat even if they are the same real "device" on Home Assistant (seems to be about how things work on Home Assistant and the only way I can think to make it work on Hubitat without making custom drivers with varying capabilities)
3 Likes