Home assistant bridge - High usage resources

Hi I'm looking for advice !. Can someone tell me if this is normal for a home assistant bridge app? My main hubitat hub is slow to respond sometimes and the only thing that called my attention is the HA bridge app. I only transfer 3 humidity sensors and 5 motion status but it shows 27,700,000ms and 34-40% usage. Also i see the attached error. It seems to get back normal after hub reboot but errors are returned few minutes later. Any advice would be appreciated.





Definitely looks like something is going out of control. Are your sensors extremely chatty? Any way to tone them down a bit? That is showing that the app was called (executed code) over 1 million times, in 19 hours!

Roughly 21 times a second by my math...

The LD2410 mmWave radars in Home Assistant are generating a lot of events (1,467,444 )
For comparison, this is the number of the events generated by 3 of my mmWave radars in HE for a 4 days period:

So in my opinion the problem is not in the HADB, but in these devices generated extraordinarily high number of events.

5 Likes

Thank you all, i only need to see if the radar sensors are on or off but maybe they are passing much more data that I need. I can create a virual switch to read this worse case.
I like to see that your hub is 2.6%, mine main HE hub was around 20% before this .. it that acceptable number? typically action tiles and webcore were the apps using most resources . What is a good % to be in? I have a second HE hub (mesh with the main) should I move some apps to it? or 20% it ok

You have several radar devices which are known spammy devices as @kkossev noted. As for going the virtual switch route, it won't make much of a difference since all events from the radar will still have to be processed by HADB.

Now I don't use HA much but I wonder if you could create a virtual device within HA and share that to HE instead of the real device? Create a rule on HA (in node red I guess?) that filters out all the spam from the device and just updates the active/inactive state of the virtual device.

The device would still be spamming out garbage but you are basically offloading the processing of all the events to HA and keeping it clean on HE this way.

1 Like

It won't work. The event stream from HA send ALL event to HADB regardless what is selected in the app. Not selecting the radars in the app won't prevent HA from sending these events. HADB will have to process them anyway.

2 Likes

I would use the HE > HA integration and share a Hubitat virtual switch. When the radar indicates "occupied", use an HA automation to turn ON the switch. That will keep the events stream off of HE. If you want this to be a motion sensor in your HE rules instead of a switch, use the code for "Motion Sensor with switch".

Alternatively, use an HA helper to create a virtual switch (toggle), create an HA automation that toggles that on when the radar indicated "occupied". Share the HA virtual switch to HE via HADB.

3 Likes

The debouncing must be done in HA, probably something like this :

The virtual switches solution proposed by @SmartHomePrimer seems to be the easiest one!

3 Likes

Radar events will still comes through.

I don't see how this could prevent getting reports from the radar to the event stream. That HA automation use the platform state as a trigger, which is picked up from the same event stream as HADB is listening to.

Yes, you are right…

I think @SmartHomePrimer first solution is the one to try. I would not recommend using HADB with spammy devices.

1 Like

Wow , a lot of information. thank you all !
It seems that no matter what I select/deselect in HADB it will continue overloading my HE hub.

  1. one solution will be use helpers /automations in HA and pass the status back to HE using maker API - AND - remove/ disable HADB all together.

2)reconfigure the mmwave radar sensors so they don't send too much chattering values to HA (i noticed that it also fills HA the logs with useless data . I have 5 radar sensors and I almost can't read the events.
3) the solution proposted by kkossev is a little too much for me. but it seems that there is a room for improvement in HADB in the future.

How can I disable HADB with out remove it all ?

Check the disable box next to it in HE. Not sure if HA will still be sending the events, but if the app is disabled it should not be trying up as much resources processing them all.

1 Like

@fn4862 Not sure either but the app doesn't do much. All the processing is done by the driver. You should disable it too.

Yes the only way to stop it was to disable the driver. All values in Hubitat are back to normal now.
I hope a future an update could fix this by processing only the selected devices.
HA could have millions of entities that are not necessary in Habitat.. HADB is an excellent idea, but it needs a bit more time.
Thank you

This is the actual issue that needs to be addressed. As you said, these devices are creating excessive data and events in HA even before they affect HADB downstream.

That is a feature request for HA. Their model is to send all events on the websocket connection all the time. Until they support a way to filter those events to only certain devices, there is nothing that can be done to reduce the processing load on any client integration like HADB.

This is not a HADB issue. Those devices are behaving poorly, and HA doesn't support a way of keeping them from spamming excessive events to any client like HADB that connects to the event stream from HA.

5 Likes

Thank you for the explanation!

1 Like

You could also run multiple Home Assistant instances linking only 1 to Hubitat.

2 Likes