[RELEASE] Home Assistant Device Bridge (HADB)

Is that a fork of the "original" app?

I think it’s a fork of the driver and the changes were never sent as a pull request to @ymerj .

@tomw @ogiewon Hopefully the fact that the two of you "liked" @aaiyar's post means you're already on top of this, but I wanted to ask just to be sure. Any chance someone could review the code posted by @gabriel_kpk and merge the parts for climate devices into the main release?

And any info on my motion sensor issue would be greatly appreciated as well.

1 Like

Is this the code in question, @aaiyar and @dylan.c ?

I would be happy to review, but I would need a GitHub pull request as a starting point.

1 Like

Can you point us to the details on this issue?

Link to my post explaining the motion sensor issue...

It is. I'll see what I can do re: the pull request. I'm not clear what exactly was added to the driver and I'll need to create a github account,I suspect. Hopefully sometime today.

1 Like

I think it would be easier for @gabriel_kpk if they wouldn't mind doing the PR. The main issues are formatting between the forum and the original code, plus a merging of the current version of the code back into the forked version. Both are easier if you have the original modified version from the Hubitat editor to start with.

2 Likes

Ah, I missed that detail in your post.

Will you please turn on logging on the parent device and send a few logs with presence changing in HA from this device? This is the line I'm hoping to see on the Hubitat side:

parse(): description =

I was able to get a copy of the modified driver from @aaiyar. You should see a pull request in github. I did my best to eliminate trivial differences between the current version and the modified one, but I'm no programmer. Let me know if there is anything else I can do.

I'll also get more info on the motion devices ASAP.

2 Likes

Is this enough to go on? dev:742 is the parent device, and 744 is the child motion sensor.

dev:744		2021-12-26 02:21:48.421 pm info		EcobeeSensor2 is updated
dev:742		2021-12-26 02:21:48.405 pm debug	parse: domain: binary_sensor, device_class: motion, entity: binary_sensor.ecobeesensor2, newVals: [on], friendly: EcobeeSensor2
dev:742		2021-12-26 02:21:48.403 pm debug	parse(): description = {"id": 1, "type": "event", "event": {"event_type": "state_changed", "data": {"entity_id": "binary_sensor.ecobeesensor2", "old_state": {"entity_id": "binary_sensor.ecobeesensor2", "state": "off", "attributes": {"friendly_name": "EcobeeSensor2", "device_class": "motion"}, "last_changed": "2021-12-26T19:57:50.197543+00:00", "last_updated": "2021-12-26T19:57:50.197543+00:00", "context": {"id": "2a872b01f8c1131baf85b2254ed57d7d", "parent_id": null, "user_id": null}}, "new_state": {"entity_id": "binary_sensor.ecobeesensor2", "state": "on", "attributes": {"friendly_name": "EcobeeSensor2", "device_class": "motion"}, "last_changed": "2021-12-26T20:21:43.860745+00:00", "last_updated": "2021-12-26T20:21:43.860745+00:00", "context": {"id": "096b1e0d329b9f49ca240b86500380ad", "parent_id": null, "user_id": null}}}, "origin": "LOCAL", "time_fired": "2021-12-26T20:21:43.860745+00:00", "context": {"id": "096b1e0d329b9f49ca240b86500380ad", "parent_id": null, "user_id": null}}}

About the PR: The differences in formatting between this forum and github introduces changes in the code where in fact there is none, making it practicaly impossible to review properly. As @tomw said, it would be better if @gabriel_kpk make a new PR integrating the changes done to the driver since version 1.29 (we are at 1.36).

2 Likes

Everything looks like it's working correctly, but I have a hunch on what may be going wrong. I'll message you with some modified code to try.

1 Like

I'll see if I can manage this...

1 Like

If someone have an unaltered version of the file (meaning no formatting change introduced by this forum) maybe I could compare it with the original 1.29 and sort out the relevant info.

1 Like

@dylan.c I made a pull request with the changes I extracted from the file posted here and asked @tomw to review.

2 Likes

Got it. I also just finished cleaning up a modified version based on version 0.1.36. I can send it your way if needed. I closed my PR and saw yours in the repo so I did not open a new one.

1 Like

I reviewed and merged the PR. I also updated the version on the HPM listing for anyone who wants to upgrade from there.

1 Like

I just updated using HPM and rebooted the hub. I don't see climate devices showing up in the App's list of available devices. Will the app need an update as well? It looks like maybe just adding "climate" to line 84 of the app code will do it.

All of the added code looks to be working based on a few minutes of testing. I did notice that the attribute "thermostatOperatingState" (idle/heating/cooling) was missing. I took at stab at adding it into the driver and it seems to be working. I'll submit a pull request in just a few minutes.

2 Likes

Good catch- I didn't think to update the app. Would you mind making that change and testing it, then including with your upcoming PR for the other driver functionality?

1 Like

FWIW, that's exactly what I did.