[RELEASE] Home Assistant Device Bridge (HADB)

Summary (warning ramble follows): Using templates in HA can convert the entities that weren't transferring over the hubitat, such as numerical entities changed to pressure sensors to bring them into hubitat using this tool.

Ok so after much confusion trying to work out yaml file editing in home assistant as automations and scripts etc can't do what I wanted... I realised the learning curve I had ahead of me to go back to basics and read a lot to understand before I jumped in..

I've now gone and done I said I wouldn't do = hypocrite and also likely a told you so moment when all this falls apart because I'm all over the place with multiple systems here... I do hear you all.. And will likely redo all this properly when it falls apart and I have more time to learn.. But it's working how I intend at the moment so that's a good start.

I stumbled across templates in home assistant and after only a few hours of frustration realising HA ain't as simple as RM to get my head around, I looked at converting a value of an entity for roborock vac into a pressure sensor in HA. Now hubitat sees the value as a pressure sensor, but it gives the resolution and range I need to monitor the last clean area so I don't care too much for the units. I'm sure I could use virtual devices in hubitat to change the unit.. But hey let's not get even more messy hey.

So I am monitoring for state changes of the vaccum in HA, and using Helpers of value 1 or 0 (I should look at boolean) to transfer the state change to hubitat which includes if the cleaner was started by the xiaomi app or the physical buttons. I'm dealing with the control of the roborock in HA, plus some basic automation which is mainly just changing the helpers that hubitat sees based on state changes of entities and status. And the new development that I am now converting entities that aren't included in the drivers that this home assistant device bridge uses, into pressure if they are numeric values as hubitat happily sees them...

I am using virtual switches/buttons in hubitat to trigger scripts in HA to start the cleaner, send to the dock etc. With the rules relating to "when to clean next" based on presence and days since last clean, all done in RM that changes the switch/button states. All using the maker api to HA with the hubitat integration.

I'd like to thank many people here for encourage me to think creatively to get this working for now. Also like to thank those that have also made me realise this is not the right way and that I should over time transition this all to the right tools rather than all over the place.

3 Likes

Clever solution. It's a Rube Goldberg machine after my own heart. I too have eaten my share of crow. Yes, your solution might be held together with rubber bands, but if they don't break, you will consistently get what you need. I know that some have trouble with HA and some have trouble with HE. Over the years I've learned what works consistently, what breaks occasionally (and most important, how to fix it easily), versus what is just inherently unstable and should be avoided.

For me, the way I use HA and HE, they are both very stable (this is in part due to developer efforts, and in part due to my own resolve to not introduce instability). I have had many teachers, hard lessons, and an occasionally disgruntled spouse. In the end, there is no more important lesson than to backup your work before and after you get things setup the way you need.

2 Likes

I rate how fast all this integration is between the two systems though. Both ways. Sensor value changes from HA to Hubitat are really fast, and Hubitat button presses to trigger HA automations are near instant.

4 Likes

Hi Guys,

My devices from HA are not showing up, and the dashboard can no longer find any authorised devices.

I have two Aqara curtain motors and an Aqara rocker switch that I have set up in HA. They appear and are selectable in the list of devices to import from HA in the list in the Homeassistant device bridge app. I noticed that if I changed the name of a device in HA, the name change was imediately visible in the list in Hubitat. So everything seems to be in place.
I read that the devices will not show up until they are activated in HA. So I went into HA and activated them by starting and stopping them and so on. But they didn't appear in Hubitat after that. So far none of the devices have showed up in Hubitat. Any suggestions?

A bonus. After installing the HA device bridge app and importing the devices (pressed done after selecting them), I created a new dashboard in Hubitat to accomodate buttons for the curtain motors to use when setting them up. I added a tile and noticed that no devices were available and that there is a red text stating 'No Devices Authorised'. It is a while since I did a dashboard but I haven't noticed this before and have had no trouble creating dashboardss before. Could this be related to the HA bridge device install?

All suggestions and ideas welcome

Cheers

Not all Home Assistant device/entity types are supported. See the first post for a liost of supported HA device/entity types. Please try something simply, like a switch or a dimmer and then see if those show up in Hubitat once they are toggled in HA.

If those work, then the issue is probably that this integration does not have support for the HA device/entity types you're trying to add.

2 Likes

Hi,

I think it should be supported.

Fair enough... Have you tried using HADB with just a simple on/off switch to see if that will work with your current configuration? Just trying to to see if we can identify exactly where the communications breakdown might be occurring.

2 Likes

Good point. I have one rocker switch (Aqara Wireless Remote Switch) among the three devices I have started with, which hasn't worked so far. But I will try some other device tomorrow and se if I can get any device to work. Thanks.

2 Likes

This is different from the HADB issue you're experiencing. In HE dashboards, you have to go into the dashboard app and select the devices to share (e.g. "Authorize") for use with the dashboard you create. See the Dashboard docs for help with this particular issue.

Keep in mind that devices must create entities in HA to be imported. Curtain is supported by "Generic Component Window Shade" in HE, but I don't know this is the same for that device. I don't own one of these. Perhaps @philtor can assist.

One way to get things working that are not directly supported by HADB is to instead trigger them via an HA automation by sharing a Hubitat Virtual Switch with HA. Set the virtual switch to turn off after 500ms. This is then configured in HA as the trigger for the HA automation, which then controls the device on HA. For this particular use case, you need to use the HE->HA integration created by @jason0x43.

[Edit] Just looked back at @philtor 's post and this is how he mentioned he is controlling his.

2 Likes

Interesting development this morning. The temperature sensor on the aqara curtain motor has presented it self in Hubitat and now appears as child devices to a HADB device. So maybe it is working? I would have assumed that the other functionality would have appeared after I used them in HA, but perhaps they just need further use to appear?

Skärmbild 2022-08-15 111348
Skärmbild 2022-08-15 111405

Did you install the Generic Component Window Shade?

If so, please read the Troubleshooting section in the first post so we can see if we can assist you.

3 Likes

Hi @ymerj!

I am sorry , but no I hadn't, I only installed what was mentioned initially in this post, i.e. :point_down: I have installed it now though.

Unfortunately I acted on a nagging feeling that maybe I didn't have the latest firmware on my conbee II stick, and could this be the cause of my issues? How hard could it be to update the frimware? I moved the stick to a windows computer and I found some post talking about a software called ZShark so I used that to update the firmware. Having updated the firmwere I noticed that the version installed was from 2019. There are newer versions available which I then tried to install using GCFFlasher_V2_10. Unfortunately that failed. So now I don't have the right firmware and are back to the Error 502: Bad Gateway. As soon as I have sorted this out I will come back with an update. In the mean time, thank you.

I have only ever updated my Conbee 2 once, so should not be needed unless specifically noted in the z2m documentation for that device. I would guess this wasn't needed since the unit joined and there were temperature readings, but this is a guess. Consult the z2m device pages to be sure.

I updated mine with the Windows DeConz app using these instructions:

1 Like

Hi again @ymerj ,

Current status: HA and MQTT are working fine. Information on one of the curtain motors turn up in the eventlog and debug log, but no child devices turn up in Hubitat, apart from the temperature sensors.

-I have sorted the firware issue and have access to the Zigbee2mqtt GUI.

  • I have installed the generic component shade ( by Jonathan Bradshaw. There is no version or other info.)
  • I have read through the troubleshooting section. I have not tried to manually import devices using the entity_id, as I could not find the entety_ids. I have tried deselecting Only pass through. Unfortunately no new/other devices have been imported to Hubitat.
  • I have run the curtain motors both directly on the units and using HA menus/cards. I can see that the devices are working in HA as the various status update as I use them.
  • If I look at the events for the HADB device, I can see that info on changes are being picked up and registered.

  • I have also enabled debug logging on the HADB device. From this it appears that only one of the two curtain motors is sending info to hibitat, curatin motor 02 (Aqara Gardinmotor 02).

I also noticed that there is a complaint about a generic component battery.

Is there a page where all available generic component drives are available for download?

All thoughts and advise highly appreciated.

Cheers,

You need to use the version from HADB. I am not familiar with the driver you mentioned, but it isn't supported by HADB.

The issue is that device_class: null entry in the log. You need to update your HA configuration to specify the device_class as one that is supported by HADB (currently curtain, garage, or shade).

The majority of the Generic Component child drivers are built-in to Hubitat itself. But we had to create a few for HADB that weren't supported. You can get them as optional components through HPM or from the GitHub space that the first post in this thread links to.

1 Like

Hi @tomw ,

Thank you for taking the time to assist. Much appreciated.

Check. I have now verified that all installed generic components are made by @ymerj I now have the following installed:

Any hints on where I can do this appreciated. Sorry.

Thanks, much appreciated.

This page may be helpful. This is a setting on the HomeAssistant configuration (not in Hubitat) that you need to adjust: Customizing entities - Home Assistant

1 Like

Thank you @tomw !

Result! I can now se the curtain motors! :slight_smile:

image

2 Likes

Thank you for your assistance in getting my Aqara curtain motor to work with Hubitat using Homeassistant and mqtt @SmartHomePrimer @ymerj @tomw @ogiewon and @philtor ! :+1: I had only usd Hubitat before and even had a break from that for a while, so much appreciated!

4 Likes

Thank you so much for a great integration! The driver is not handling a device type, and is logging a message to contact the devs so it can be added.

dev:2332022-09-13 02:37:32.558 am info No mapping exists for domain: alarm_control_panel, device_class: null.  Please contact devs to have this added.

dev:2332022-09-13 02:37:32.556 am debugparse: domain: alarm_control_panel, device_class: null, entity: alarm_control_panel.alarm_control_panel, newVals: [disarmed], friendly: Alarm control panel

The device is the alarm control panel from the Home Assistant's Simplisafe integration. It manages the alarm state (Off/Home/Armed). The other devices in the integration work great, the control panel would also bridge integration between Simplisafe & HSM.

Thanks for any suggestions!