[RELEASE] Home Assistant Device Bridge (HADB)

Damn same websocket error continues to show up. Reboot HA and after that I was able to discover devices. Before that I got a spinning circle and nothing happend.
Discovery seems to be too hard task to do. This is the query for the devices.
"httpGetExec([uri:http://192.168.86.48:8123/api/states, headers:[Authorization:Bearer..."

After that I get huge log line:

Websocker error sounds like a connection issue but Unifi doesn't show any problems on there. Is there a way to check the HA side and it's connection errors?

EDIT: and right after this message Hubitat says "Hub load is severe" "2.33". Now I'm going to do reboot and remove HADB. I'm not saying it is HADB which causes this but I definitely see that when I'm trying to do discovery on HADB I'm getting really slow response from Hubitat and things go bad.

When is the last time you did a soft reset/download recent backup and restore? When you restart the hub if you click advanced you are given the option to restore backup too.

This has fixed weird issues for me in the past.

I do not even remember. Maybe two years ago or something. It sounds so brutal and too exciting for me to reset everything and then try to restore backup. If something goes wrong and automations goes down then I'm having way bigger issue than now.

But...I remember that there has been several times when I have installed Windows again just because everything has slowed down on my computer. So...why wouldn't it work on Hubitat too.

That is not what I am suggesting. The hub database can become corrupted and cause weird issues. I am suggesting you are simply download a database backup and restore immediately. You lose nothing but it might solve your issues.

You can read more here:

1 Like

OK I can reproduce.

The huge log line is expected since HADB has to query every entity on HA to create the complete list of devices to choose from.

The problem occurs when logging it. Disabling debug logging in the app should fix the endless spinning wheel.

1 Like

By the way this is what is logged on my system when I enable debug logging in the app ( it take for ever and generate warning from the hub):

When disabling debug, it is instantaneous.

I'm surprised the logging system is taxing the hub that much.

3 Likes

I was just trying to add some new devices yesterday and the let the Discover page spin for 30 minutes before I gave up. I was going to get back to looking at why tomorrow.

Just now I turned off debug logging and, as you noted, it is now instantaneous.

Yep but I turned debug on because I was trying to understand why it is not discovering devices. So I have same issue whether the debug is enabled or not.
That query makes hub go wild and I did not have any other option than reboot the hub.

FWIW I ran into this when developing the Gmail integration in my community GCal Search app. I was also logging large strings of encoded attachment data and the hub would slow down tremendously and I would have to reboot often. I ended up having to create different log levels so users would experience this by default.

1 Like

In the next version I plan to forgo with climate --> thermostat translation. Meaning HADB will let climate entity modes and states go through as is, regardless what is supported by Hubitat.

Some implications are:

  1. Extraneous modes won't show up in the list of available modes in RM. (They could be choosen as custom command though)
  2. Thermostat tile in regular dashboard may ehxibit strange behavior when these modes are in effect.
  3. Easy dashboard should make these available on its thermostat tile.

If any of you forsee problems with this change, please let me know.

2 Likes

Version 2.7:

  • Add support for event entity (it becomes a button device in HE)
  • Change fan error handling
  • Remap fan percentage to accomodate for missing named speed
  • Forgo with thermostat mode translation
  • Add support for thermostat presets (Untested. The HADB thermostat component must be use for this to work)
  • Use device network ID instead of device name to identify entity in service call.

For this update, I didn't have any of these devices hooked up to HA, so the testing was limited or non-existent.

4 Likes

About thermostat modes:

Previously the Auto mode in HE was mapped to "heat_cool" in HA and auto mode from HA was discarded. If you have rules that select auto as a mode, they either won't work or they will select a different mode then before.

Please revise your rules accordingly.

1 Like

After some time, I’ve revisited this for my Hive (uk) smart thermostats.
I’ve now found that using the latest release the thermostat for heating is working. There is a sensible tile on the hubitat dashboard, and I can access devices through WebCore to respond to events and trigger actions.

The Hive thermostat also handles hot water using a schedule (on/off/auto) or a manual boost. The following screenshot shows the devices available from HA. These attributes can be queried and used in webCore, but can not be changed or cause the triggering of an event. Would it be possible to make these fully operational?

These 2 entities are binary sensors, therefore they only report values and are not actionnable.

The thermostat itself should be a climate entity, which I don't see in your list. Make sure you select it in the HADB app and have it do something somehow (make it generate an event).

The thermostat is there and working well, the list of devices is filtered.
This screen shot shows the water heater in HA, it would be good to get this into HE. I’m not sure if the HA implementation can trigger the boost function, it may just display it, so guess nothing could be done with that?

HADB does not support water_heater entities because there is no such capability in HE.

May I suggest to use HADB custom call service to set your water heater options.

1 Like

Has anyone been able to import a Reolink camera and use the person detection entity?

When I first imported the binary_sensor.front_doorbell_person entity, HADB assigned it a Generic Component Unknown Sensor and the value was turning on/off correctly. The device wasn't selectable in automations though, so I changed the driver to Generic Component Motion Sensor, but now the value isn't turning on/off anymore.

EDIT: I don't see the Generic Component Motion Sensor driver in my hub's Drivers Code section. I installed HADB for the first time today through HPM. Did it not import the motion sensor driver correctly perhaps?

It doesn't have any commands available to it either.

If HADB assigned the unknown sensor, it is because your entity did not report a supported device class. As you mention, the unknown device still report a value though (on/off). Changing the component driver to something else will indeed render the device unusable.

With the proper driver (the one assigned by HADB) you can select it for automation by choosing "custom attribute" as a trigger.

1 Like

Could you point me in the right direction to use the HADB custom call service? I only require to change the timer mode between scheduled, off and on.
Thanks

Do you need to alter the time period or just the on/off status?