[RELEASE] Home Assistant Device Bridge (HADB)

Hey OP great app. BigAssFans doesn't send anything on the Speed property in the JSON from HA. I modified the code to account for null.. hope this helps others.

            case "fan":
            if (response?.event?.data?.new_state?.attributes?.speed != null) {
                    def speed = response?.event?.data?.new_state?.attributes?.speed.toLowerCase()
            }

I just installed this via HPM but I am unable to see the app in the Apps section. Has anyone else faced this? For the life of me I can't figure out how to open the app. If I go to Apps Code, I see that the app is installed. It just doesn't appear. I tried removing and re-installing as well.

You add the Apps Code (either manually or via HPM). Then you have to actually go to the Apps section and install the app. It's a bit confusing the first time.

3 Likes

Oh! I feel like a dummy. That did the trick. Thank you!

1 Like

Are binary sensors supported? Can they be mapped to "Generic Component Contact/Switch"?

Many types of binary sensors are supported, and the specific mappings are determined by the device_class of the HA entity.

I mean to ask about a binary sensor that does not have a class type, or None. When I try selecting it it does it come through Binary Sensor - Home Assistant

Ah, I see. What kind of functionality does it actually have? Is it not possible for you to map it to a 'typical' device_class in HA? HE doesn't really have a generic binary sensor, so I'd be concerned that we would map an HA "None" into something confusing on the HE side.

The device is just a basic low voltage binary input sensor which gets triggered by a momentary switch. I'm using HA because I interface with the device through MQTT which is manually defined in the YAML config file. I'm not very familiar with HA so maybe you can help me out in how to define it in HA. The MQTT configuration for the sensor is not very different than a switch which has been working great with the HA Device Bridge. The difference I noticed in the configuration is only that the the switch has a command topic whereas the sensor only has a state topic.

I keep getting timeouts when searching for new devices.. I think this may be to do with the number of entities I have in HA.

Is it possible to add the device manually knowing the entity id? Or do I need to add via the app?

Sadly, I am also not that familiar with HA. :wink:

But where your declare your entity for this sensor, you should be able to assign it a device_class like opening and then it will just work with HADB.

I was wondering, why not integrate directly to Hubitat with one of the few MQTT app available instead of going through HA?

2 Likes

I tried looking but didn't find anything that worked. Hubitat can't host a MQTT server but does have the built-in capability to be a client, though no built in app to configure it. So I need HA just to host the Mosquito MQTT server, the question was just how to get devices into HE. I would have preferred a direct integration to MQTT but I didn't find any community supported app that worked. HA Device Bridge was super simple to setup and I didn't need to do any configuration to get the devices imported. (Getting the MQTT devices setup in HA was more difficult since these devices don't support auto discovery and needed to be defined in the configuration.yaml, all 118 of them.) If you know of something that would work for some simple dimmers, relays, and binary sensors please point me in the right direction.

FWIW, if you are unaware, there are several community-developed MQTT clients that work pretty well. Here are a couple:

1 Like

@aaiyar I looked at both of those. YAMA publishes local devices to MQTT. I'm looking to import and control MQTT devices in HE. I tried the app from xAPPO and I couldn't get it to work with my MQTT devices. I tried enabling statestream so the devices could be discovered but it didn't work. And I was not about to create 118 devices manually.

If you’re talking about 118 devices, I can see the dilemma. If you’re talking only a few binary devices, then I would simply use the HE > HA integration from @jason0x43 to expose virtual switches to HA, and then create very simple automations in HA that change the state of the virtual switch when the device state changes. I use this method when a device’s state is not supported by Home Assistant Device Bridge.

1 Like

I did something similar. I exposed the devices I wanted to control to HA and programmed the automation in HA. This way should cut down a bit on the latency which is a bit too long already for my application.

@SmartHomePrimer - I’m having an issue refreshing the device list using the app - it typically times out. I suspect its to do with the number of entities I have in HA.

You mention that the app is optional - how would I go about adding a HA device without the app?

Thanks in advance!

You only need the app if you want to ignore some devices and only let the ones you select pass through. If you don't install the app, the parent driver passes everything through.

The problem is that once your start using the app, you have to keep using it. I should probably add an option to ignore the filtering settings OR to add a new device directly by ID like you suggested.

Which improvement out of those two would be more useful to you?

1 Like

One more question -- when you say that it typically times out, do you mean intermittent or always? Seems like an HA issue, regardless. It should always work. We could also try extending the timeout in that HADB app as a workaround.