[RELEASE] Home Assistant Device Bridge (HADB)

Thank you -- I don't know how I missed that! Worked perfectly.

LOL, I definitely don't want to replicate it! I still don't know how it happened in the first place. I take it nobody else experienced this problem?

My next challenge is that those few hundred HA entities ended up replicating to other hubs (via hub mesh) since they were all children of the HADB device. Even though they are now removed from the HE hub running HADB, my other hubs have hundreds of offline devices that I have to get rid of somehow. I tried a full resync of hub mesh, but no joy. Unless someone knows a high-leverage trick, I'll have to restore an earlier backup, which comes which other downsides. Oh well.

Thanks for the help, Tom.

1 Like

Hi :wave: Newbie to HADB here,

Installed the bridge this week, so far it is nice and solid on a new HA install done just for this reason. I have two HVS lights that appear in Smart Life / Tuya but don't get transported over to Hubitat. What is the best way to troubleshoot this?

Thanks

Did you toggle those light so they generate the event needed to trigger the creation of a child device?

3 Likes

Bad news -- the issue replicated itself on both my HADB instances, even though in one case I deleted the app instance and recreated it from scratch. Something is going on with either HA or HE, not sure which.

At this point, I'm going to have to go nuclear, unless you have any other suggestions.

EDIT: Just dawned on me -- I have a theory as to what edge case I've found myself in. A few days ago, the Sure PetCare integration in HA went sideways. I ended up deleting the integration (along with its devices and entities) from HA while the original developer is working on the problem. But there there about 7 entities from that integration that were in one of my HADB instances. When I go to the instance now, those 7 entities don't show up in the dropdown at all, but not because I deleted them from HADB first, which I probably should have. Wondering if HADB is trying to grab other entities in a futile attempt to find the missing data?

That help any?

No, HADB is not grabing anything. It only listen to whatever HA is sending. If you remove those entities they won't send anything. Therefore nothing will happen.

Did you also remove the driver? I wonder if removing the app without removing the associated driver would make it act as if it was a standalone install (in that case everything HA send will be included: No filter)

I didn't deleted the app code or the driver code. I just deleted the instance of the HADB app. And when you do that, if I'm not mistaken, it automatically deletes the associated devices. What I can't figure out is why HA is sending a lot (~ 100-200) of additional entities that I did not select (and never selected) from the HADB dropdown. Strange.

Right now, I'm just deleting everything and starting from scratch. We'll see.

Yes, you are right.

Since nobody else mention experiencing a similar situation, I'm out of idea of what could have cause that.

So is it possible to bring google tv (Brand is TCL) from HA into Hubitat via HADB? I've tried manually entering the entities from HA to HADB and it still doesn't show up in my list. Mainly I simply want to do on/off for it. I have it in homekit but virtual switches can be dicey once out of sync, so having a direct line would be better of course. Any help or thoughts appreciated.




So guys...

I went nuclear -- deleted everything and started from scratch. I rebuilt two HADB instances, one with 7 HA entities and the other with 5. So not a lot, right?

Despite this, pretty much immediately my log was getting spammed with LimitedExceededException errors. As if the devices I've selected are sending a jillion events. The devices are (mostly) Ecowitt devices integrated into HA -- temp, humidity, lux, soil moisture. I wonder if it's possible that the Ecowitt integration changed in a way that created much more frequent events.

Any other theories about what could be going on from folks?
And can I throttle the volume coming across HADB somehow?

EDIT: And, to make things more mysterious, a lot of additional HA entities that I did NOT select in HADB are showing up in HE as child devices yet again. Something very weird is going on. Would love to try to troubleshoot if anyone has ideas.

So, what I do is two helpers (switches) in home assistant. I use one to turn on and one to turn off. I create them in home assistant vs HE and use HADB to talk to bring the switches into HE.

In Home Assistant, I have the routine that does two things when the switch in question turns on: first, turn the switch itself off, second, perform the action (on/off) that I want. This gets around the sync issue, albeit a bit messier. I am asssuming (and that could be an issue as I HATE assuming anything) that HomeKit allows simliar virtual switches and routines?

I prefer using the hub that has the actual entity doing the routine. My theory is that the switch won't visually turn off unless it actually communicated with the host hub. That way, you know it at least sent the message to trigger if you see it go off if done manually. But, you could probably also have HE routine do the auto off if that is your preference.

HA_Virt_SwitchTV_On -> HA Routine turns off HA_Virt_SwitchTV_On, HA Routine Turns On TV

HA_Virt_SwitchTV_Off -> HA Routine turns off HA_Virt_SwitchTV_Off, HA Routine Turns Off TV

3 Likes

The suggestion from @tray_e is sound and will work if you cannot get the entities in, and I often just go this route for simple ON/OFF, because I get what I need and I get it fast. You can also use the HE>HA integration and share Hubitat virtual switches with HA as I suggested above for @mluck

2 Likes

It is not possible to throttle the event stream. Usually in a case like that a device on HA is missbehaving.

As for the unselected devices showing up, is this option turn off in the advance section of the app?

1 Like

Adding to this, make sure to click all the way though to Done in the app. If you just close it or click a link to elsewhere on the last config page, some of the settings might not be properly saved.

If those suggestions don't help, please post a screenshot of the config page for the app (click the gear icon).

I simplified the setup to a single instance of HADB with only ~6 entities that rarely change (it took a few hours for the entities to start showing up in HE). Despite the now trivial setup, I'm still seeing issues. I suspect something on the HA side.

No, it is toggled to ON.

Check.

See below. A couple other tidbits. According to my Hub Info, I'm running a CPU Load on the hub of 50.25 with over 95% of hub busy time being attributed to both the HADB device and the HADB app. I also noticed that strangely 6 of the 7 child devices under HADB have no states shown on the device details view even though the corresponding entities in HA have states and events. Odd. The log continues to spew to the error "com.hubitat.app.exception.LimitExceededException: Device 2269 generates excessive hub load on line 51 (method parse)". Device 2269 is the HADB device.

I'm not sure the above picture is the most effective way to share the screenshot -- LMK if I can do it better/differently. Also I didn't bother to include the full entity list as there are hundreds of entities in HA.

Thanks for looking at this.

I'm going to PM you to gather some more info.

Yeah essentially virtual switches... I have that going through homekit. Was just hoping I could bring it directly in :frowning:

Yeah, have a rule that shuts down the house and it's ok but direct control even through HA would be preferable to the vswitches.

1 Like

I just looked at the logs on the hub I have HADB on and it’s using 40.9% of busy. For me this only works out to around 0.3% of the hubs cpu time, but I only have a few lan and cloud integrations on this particular hub, and have kept my HA setup small. I think that the high number of events is everything that is being filtered from HA. This isn’t causing any alerts for me and I wouldn’t have known if I hadn’t looked in the logs.

1 Like

Thanks, this is the case for most people who see that alert, whether it is from HADB or otherwise.

I advise people to not worry about the "% of busy" statistic unless it is causing a noticeable impact. But a high "% of total" typically warrants a further look.

(Though there are caveats to that, for example drivers that do a lot in Initialize will typically show up as a high % of total after a hub restart and then reduce over time).

2 Likes

Agreed. But did "% of total" go away on the app and device views of the log? I don't see it any more in the checkboxes at the top.

1 Like

Yes. I believe it was deemed not helpful and possibly misleading or inaccurate. Best to look at the device or app percentages in light of the hub’s total processing time (which is listed) which is where I drew my conclusion that while HADB is using 40% of the busy time, my hub is only busy 0.8% of the time.
EDIT: I should have said the hub spends 0.8% of its time processing apps and 1.0% of its time processing devices, leaving it idle 98.2% of the time; possibly more since some of that busy time might be spent waiting for a response.

1 Like