[RELEASE] Home Assistant Device Bridge (HADB)

Thanks for the pointer to the template cover docs. This device was 100% created by the HA SmartThings integration, so I'll have a look about to see if I can modify/augment it to drive an actual Door device.

I'm already using the two integrations, (this one and @jason0x43's), with virtual switches as you described to support my August lock in HE. Just always looking for "cleaner" solutions so that I don't have to worry about real and virtual devices on either side getting out of sync due to some glitch in the matrix.

@guarddog13 - I have submitted a Pull Request to add the Home Assistant Smoke Binary Sensor type to this integration. However, I have no simple way of testing it. If you'd like to give it a try, the modified code can be found at https://raw.githubusercontent.com/ymerj/HE-HA-control/ogiewon-patch-2/HA%20parent.groovy

I'd appreciate your feedback, please.

[Update] I was able to test this by creating a Virtual Hubitat Smoke Detector, passing that to Hass, and then using this integration to bring it from Hass back to my development hub. It seems to work fine in my limited testing.

2 Likes

It doesn't seem to be bringing the nest smoke detectors over.

Did you activate the Nest smoke detector?

I pressed the test button and nothing. Will I have to physically activate them with smoke? I tried to also change the state in HA to see if that would work.

Not sure, as I do not have a Nest Protect to test with. In general, this integration requires the device on Hass to change state in order for Hubitat to ‘discover’ the device.

I did test them by setting off a sensor with smoke and it still didn't carry over.

OK, thanks for trying. I am not sure why it's not working? You did manually copy/paste install the correct version of the Parent Driver that has the changes for the smoke stector?

@guarddog13 What does the entity look like in HA?

1 Like

I copied the new driver. I actually imported from your link and it updated it.

If you go into the Hass Developer Tools, and then the select States at the top, what Device Class are your Nest Protects showing up as in Home Assistant? (see examples below)

I am curious as you mentioned you trying to bring in the Nest Protects via SmartThings, to Hass, to Hubitat... Perhaps something is being lost along the way? How do you have these even integrated with SmartThings, as the official Google Nest integration does not expose Nest Protects?

Here is an example...

No, not smartthings. I used a plugin on Homebridge, which exposes them like this.

When I installed HASS it automatically found the bridge as a homekit controller and added them like this.

Ah, OK. I use the same plug-in with Homebridge for my Nest Protects, but I don’t bring them into Home Assistant. I bring mine into HomeKit and sync them with virtual switches using HomeKit Automations (via an Apple TV 4).

However, I just noticed that mine seem to have disappeared (which is what happens in HomeKit when something goes wrong with the integration). So at the moment I don’t actually have anything setup.

I don’t want to bring everything I have in Homebridge into HA. That would not make me happy. :woozy_face: However, I do have Hoobs on another machine I can test with. I will see about loading the plug-in for my Nest Protects and see what I get in Home Assistant Bridge. I’m a little confused why this isn’t working for you.

It's likely because your token expires. I have a plugin that's supposed to automatically pull all the googleauth info but it doesn't work. It only pulls the cookie and nothing else.

I think it's because I have multiple google accounts and sometimes I need to logout of all of them, because in their finite wisdom, Google doesn't let you just sign out of one account. So when I do that, it invalidates the credentials for the Google account I use for the Nest Protects.

@guarddog13 - I get the entities coming into Hoobs and HA, but what I don't know is if this actually works in HA when there's a Smoke or CO event. Do you?

I don't want to set off my smoke alarms. I have a house full right now. I tried the checkup procedure from the Nest app, but that didn't generate a change in HA. When I look at the HA logs, it doesn't show any events after initially adding them via HomeKit Controller.

I set them off with a match the other day and they triggered my emergency switch which is going the other way across the bridge from HE > HB > HAAS.

1 Like

OK. Well I do see them in the Home Assistant Bridge app, but they need to be triggered to show up in the driver. Not something I can do right now.

These are from one of my detectors

I don't know how it is for you in Homebridge to HA, but I don't like how it's showing up in Hoobs, and then HA. It shows the name of the detector but it's just labelling the other components as _2 and _3 (i.e. Hallway, Hallway_2, Hallway_3). With that, I have no idea which one is Smoke, which is CO. Whereas in HomeKit, it labels them Smoke and CO, along with icons.

I can see them in the app as well but if I trigger them still nothing. I checked each one in HAAS to determine which ones have states of smoke vs gas and renamed them as I had that same issue. The wired ones properly get called motion sensors.

I got it to work. In Home Assistant, you need to add _smoke to the end of the entity name.
So for example, my Nest Protect in the Hallway comes into HA from HomeKit Controller as binary_sensor.hallway so I changed the entity name to binary_sensor.hallway_smoke

After that, I went into the Home Assistant Bridge app and selected it again (because once you change the name it will no longer be selected in the app). Then I just went back to HA and selected Reload on the HomeKit Controller integration. I didn't need to trigger the detector.
As you may or may not be aware, there is no separate definition in HE for CO detectors, so you will also add _smoke to the CO component entity and then add a custom label once you have it in HE via the Home Assistant Bridge driver.

Perhaps you can test the smoke detector at some point and let us know if it's changing to detected in HE.

1 Like