[RELEASE] Home Assistant Device Bridge (HADB)

A quick update on this. I significantly cleaned out my HA setup. I had accepted a lot of discovered devices in the past and wasn't using them so took everything out. Then I installed the bridge and it is running without issues. Unfortunately I can't point to what exactly was causing the issue as I did a wholesale cleaning. But just to let you know that it is working now. Thanks.

5 Likes

I notice that when I delete entities in HA that were connected through HADB, they no longer show up in the HADB app in Hubitat when I perform a Discover. However they still remain as devices in Hubitat. Presumably I have to delete the devices manually from Hubitat? Thanks for the info.

Never mind - I am an idiot - I found the option. Thanks.

Related to my idiot question before I have run into an odd situation. HADB is setup on my main hub. I have a secondary hub and I wanted to use a HASS device on that hub.

So I went to share it through hub mesh and realized I have to share the parent. No issues there, and everything worked fine.

Then I cleaned up some devices on the main hub by having the app delete devices that were not connected.

In the second hub they all show as OFFLINE. I could go through and delete them one by one.

But I thought I would ask - is it better to establish a second connection with HASS on this secondary hub vs. using Hub Mesh? Thanks.

There are pros and cons to both approaches, IMHO. Using HADB on both HE hubs means that they can operate independently of one another. However, it also means that both HE hubs have to process ALL of the event traffic generated by the Home Assistant system. I personally have HADB running on one HE hub, and I use Hubitat's Hub Mesh feature to share the Parent device to other HE hubs as you mentioned above. This minimizes the workload on my main HE hub, as it is the one that does not have HADB installed on it. Thus, it only has to handle a small number of updates versus everything that HAOS would otherwise be throwing at it.

4 Likes

Thanks for the note. This is something I have been toying with since I added additional hubs. My original C5 is doing most of the rule management. I moved most zigbee and zwave devices to my C8. I have two other C7 hubs - one that is in use and one that is on the shelf.

My whole idea was to spread the processing around the hubs and also place in different locations and/or locate them based on devices to improve response. But the C8 has largely done away with the need to locate hubs nearer the devices, and managing the events across multiple hubs is a bit of a nightmare. So I am actually starting to consolidate down again.

It is my understanding that the processor in all models is the same so there is no advantage of using one over the other except the external antenna on the C8 which I am seeing makes a difference.

I am not connecting a lot of home assistant devices at present so I don't mind reconnecting as needed on different hubs.

1 Like

Hi @SmartHomePrimer , thank you very much for the bridge.

I installed the application and all drivers via HPM.

I have configured one Outlet device as such:

But only the voltage & power show up as child devices of the bridge device:

Any idea what I am missing? I turned on Debug in case you need any logging.

Child devices only appear if Home Assistant sends a status update for the Attribute in question. Try turning the HA outlet on/off and you should see a Child Switch device appear on Hubitat.

2 Likes

That did it, thank you.

2 Likes

Why would HADB add what seems to be all HA devices after a HE-hub restart? It kills the hub and causes all sorts of issues.
I have about seven devices selected and no manually configured devices. "Only pass through user-selected and manually added entities" is enabled.
What usually happens is that after a restart, the hub complains about excessive hub load. According to the log, HADB is the offending app. To get the hub going, I would disable the HADB app; wait for the load to stabilize and then enable the app again; remove the non-selected devices (with the "Remove all child devices that are not currently either ...." etc.
It often takes more than half an hour to nurse the hub like this, because any activity on the hub takes forever because of the heavy load.
Needless to say, I fear a hub restart because of this.
Thanks in advance.

Edit: Some more info - it seems that the issue is caused if the HADB is disabled. I did a test by disabling the app before a reboot. Even though the app was disabled, it continues to add HA devices as they become active until eventually all HA devices (or so it seems) have been added. As the devices are added, the lad on the hub obviously increases until it becomes almost complete unresponsive.

This is the intended behavior for HADB. If you disable the app, it will no longer filter out unwanted devices. Therefore all devices will be added as soon as they activate.

Why do you disable the app?

1 Like

Thanks for your response. I disable the app because it causes excessive hub load during startup. The problem is, if that is the behaviour as you describe, it causes even worse device loads because the more devices are added, the slower the hub gets. I'm sure there is a good reason why the app was designed this way, but in my case, this behaviour causes even more issues.
Should disabling the app not stop it completely stop and stop all child devices from syncing?

This is the way in which the App and Driver are architected. Originally, when we started development of HADB, there was only a Parent Device Driver. Any Home Assistant device, that this driver received a status update for, would be created automagically on the Hubitat Hub (as long as an appropriate child driver was available, of course.)

As you've noticed, this can lead to a very large number of child devices being created on the Hubitat hub. Thus, the HADB 'App' was created and added. It allows the selection of devices that are desired to be added to the Hubitat Hub. It does this by maintaining a list of devices that are allowed. When the 'Device' driver receives a HA status update, it checks this list in the Parent App to see if this is a device that has been allowed. If there is no HADB 'App' available to query that list, then it is assumed that the user wants ALL HA devices to be created.

TL/DR - do not disable the HADB "App" if you're using it.

2 Likes

My guess is that you have a substantial number of devices/entities on your Home Assistant system. I am guessing ( I only helped with the Driver, not the App) that the HADB 'App' might be querying the HA system for a fresh list of devices, to make it ready when the user opens the HADB App, in order to select which devices are desired. @tomw would know for sure, as he is the author of the HADB App.

I never see the excessive load on my HE hub, as I really only have a few devices/entities on my Home Assistant system.

I have over 200 entities on HA and I don't see that excessive load happening. @hendrec how many devices do you have on HA?

2 Likes

I was just reviewing the code for both the HADB Driver and the App... I do not see where there should be any sort of excessive load occurring during the startup of the Hubitat Hub. The HADB App only queries Home Assistant for the list of entities when a user actually interacts with the HADB App. The HADB Driver does not initiate any discovery process whatsoever when the HE hub boots. It simply creates the webSockect connection between HE and HA, and then waits for status updates from HA.

I am not seeing anything in the code that would cause a heavy load during a HE boot.

5 Likes

I would guess between 175 and 200.

I saw some heavy event traffic with this until I realized that HA apps (that I wasn’t even using) were bombarding the websocket connection. I deleted “Sun” and weather apps and the traffic dropped substantially.

3 Likes

My guess (total guess) is that when the HA connection is first opened it may send a flurry of device updates, and it's enough to trip that warning.

IMO you should ignore that load warning if it happens only at hub startup and doesn't cause performance issues otherwise. It's a non issue if it goes away with more uptime.

5 Likes

One thing for sure, if you disable the app after having used the "remove all child..." option, it will instruct HADB to recreate all devices on activation. This will put an heavy load on the hub especially if those devices are sensors with frequent reports.

1 Like