[RELEASE] Home Assistant Device Bridge (HADB)

I have an awning cover type. Is there any way to support that one?

Probably. Please enable logging on the parent virtual device and then open and close the awning. Then send debug logs from Hubitat.

Hi - Is there a way to get the Abode gateway alarm state to hubitat? I see it shown in Home Assistant in the dashboard, but I don't see any way to make it visible in hubitat.

Thanks!

For those who wish to have an entity supported or for general troubleshooting, please turn on logging on the parent device and then activate the related device on HA side.

Include these logs with your request so we can analyse the information sent by HA through the bridge.

This information is essential in almost all the cases.

@SmartHomePrimer, maybe add something to that effect in the initial post.

3 Likes

You might look over on the HA community site - you can play around with input booleans and maybe create a virtual switch to expose to the bridge?

-OR-

Expose a virtual switch in HE to HA using the other bridge and add state changes based on alarm activity.

2 Likes

Thanks - great ideas!

1 Like

@ymerj and @tomw
Updated the initial post. Please let me know if there are any errors or discrepancies.

4 Likes

What a fantastic app and driver combo! Love it. :grinning:

My use case involves solar power and reducing grid demand (kW) during peak-rate periods. Solar panels are supposed to arrive soon, and I'm getting prepared.

I installed a Sense whole-home energy monitor, and it's great. I can now see energy demand in real time, and the device creates virtual devices (e.g. "dishwasher") based on the signal (AI is used in the cloud). There is no direct integration in Hubitat, so I've set up Home Assistant, which does integrate with the device. And, with this HA Device Bridge, I am now seeing a few child devices in Hubitat (!!!).

However, the one sensor/entity I need the most isn't showing up as a child device. It's the total home power draw from the grid:

In HA, this entity updates frequently.

I suppose I could set up a virtual sensor in HA and try to monitor that, but I'd have to learn about templates, YAML, yada yada.

Does anyone here have a better idea? Thx in advance.

Enable debug logging on the Hubitat parent device and try to catch a Logs print of the energy reporting. I added energy sensor support a few months ago, and it relies on the report containing domain:sensor and device_class:energy.

1 Like

Thanks! There is a lot of stuff here already. (Edit) Pared log to show what I think is relevent. I see device_class:null. Should read power I believe.

dev:2252022-07-22 08:20:56.489 am debugparse: domain: sensor, device_class: null, entity: sensor.energy_usage, newVals: [7036], friendly: Energy Usage

dev:2252022-07-22 08:20:56.476 am debugparse(): description = {"id":1,"type":"event","event":{"event_type":"state_changed","data":{"entity_id":"sensor.energy_usage","old_state":{"entity_id":"sensor.energy_usage","state":"8037","attributes":{"state_class":"measurement","unit_of_measurement":"W","attribution":"Data provided by Sense.com","icon":"mdi:flash","friendly_name":"Energy Usage"},"last_changed":"2022-07-22T15:18:57.622348+00:00","last_updated":"2022-07-22T15:18:57.622348+00:00","context":{"id":"01G8K7V2APXS829FQXH3YAZF84","parent_id":null,"user_id":null}},"new_state":{"entity_id":"sensor.energy_usage","state":"7036","attributes":{"state_class":"measurement","unit_of_measurement":"W","attribution":"Data provided by Sense.com","icon":"mdi:flash","friendly_name":"Energy Usage"},"last_changed":"2022-07-22T15:20:58.062390+00:00","last_updated":"2022-07-22T15:20:58.062390+00:00","context":{"id":"01G8K7YQYE3DAH5T4ED671MW71","parent_id":null,"user_id":null}}},"origin":"LOCAL","time_fired":"2022-07-22T15:20:58.062390+00:00","context":{"id":"01G8K7YQYE3DAH5T4ED671MW71","parent_id":null,"user_id":null}}}

dev:2252022-07-22 08:18:56.080 am debugparse: domain: sensor, device_class: null, entity: sensor.energy_usage, newVals: [8037], friendly: Energy Usage

Yep, the missing device_class is the issue. Can you adjust your configuration so that it reports as device_class:energy? I'm not sure if that is controlled by your specific config or by the HA integration itself.

2 Likes

Cool. thank you. Got something to chew on now.

FYI I'm a new HE user (about 2 months now) and brand new to HA (just installed HA on a ODROID 2+ yesterday). Lots to learn!

Many thanks! :grinning:

3 Likes

Since the device type is sensor instead of the expected binary_sensor, this won't show up in Home Assistant Device Bridge.

There's another way you can go about this, depending on what you need to accomplish. If you're just trying to trigger an action on HE after the total energy usage falls above or below a certain value, you can to this without knowing YAML. Using the reverse integration from @jason0x43 mentioned at the end of the first post , you can create a virtual switch on Hubitat and publish it to HA. That can then be used as your action in a simple automaton on HA.

Create a blank automation in HA and for the trigger type, select Numeric state and leave the Attribute field blank. Set the value you're looking for, either above or below. Then just set the action to turn on your virtual switch shared from Hubitat. Use that virtual switch in Basic Rules or Rule Machine to do what you want.

2 Likes

HADB supports sensor, as long as the device_class is specified as one of the sensor types you listed here: [RELEASE] Home Assistant Device Bridge (HADB)

Energy will work if you fix the device_class. But the solution that @SmartHomePrimer posted may be a better option, depending on what you are trying to do in the automation.

2 Likes

Thanks, @tomw and @SmartHomePrimer

Just getting back to this. I'm poking around in HA at the moment. So far I haven't found a configuration file that mentions these entities. If that does not work out for me, I'll learn how to create and share a virtual sensor from HE to HA. I'm sure there is good info in the forum somewhere.

I appreciate the help. :smiley:

This instruction for installing Jason's integration is here

On HE, go to Devices > Add Device and select Virtual
Give the device a name, and add a custom label if you want, then set the type to Virtual Switch and save it. Maybe also set it to turn off automatically after 1 second if you just want to use it as a trigger in a Hubitat rule.

Using Jason's HE to HA integration, share that virtual switch with HA.
Over on HA, go to Integrations > Hubitat
Click on the kabob and select Reload. Your virtual switch will now be available to HA and changing its state on either platform will update it on the other.
Add that switch to your automation on HA as the Action

3 Likes

FYI @Doug_Phoenix, I got some education from @SmartHomePrimer about the Sense integration in HA, and it is sort of "special" in how it behaves relative to a standard energy meter sensor type as supported in HADB.

So, it doesn't look like it is going to fit cleanly in to HADB for integration into HE, after all.

However, it looks like there's a good option to go the other direction in @SmartHomePrimer's previous post, so hopefully that will work for you.

3 Likes

Hi @SmartHomePrimer and @tomw

You guys are great! Thank you so much.

I'm quite a NOOB so this is a fun challenge. In HA I've installed HACS as well as add-ons Studio Code Server (for reviewing configuration.yaml) and Terminal & SSH (e.g. to load jason0x43's custom component and to reboot. I've tried installing the Hubitat integration but so far don't see a device or entity. Oh well, I guess that is what weekends are for...

On the HE side I made the virtual switch (so easy!) and think I set up the Maker API instance, but for today I think my brain is full. :wink:

Will keep plugging... tomorrow. (That's the day they serve free beer... always "tomorrow.")

1 Like

Often better to take a brain siesta and come back to it.

Be sure to do the reload step on the HE to HA integration or you won’t see the HE device in HA

1 Like

:smiley: