[RELEASE] Home Assistant Device Bridge (HADB)

It should not matter if you change the IP address in the settings for HADB. That is only used for making the connection between HE and HA, but it doesn't actually change anything about the child devices directly.

1 Like

Version 1.53 comes with a fix for CT lights and allow multiple instances of the app (for different HA installations)

Edit: technically it can also be use for the same HA... maybe someone has a use case for that.

2 Likes

Interesting, but given that the device filtering is done on the Hubitat side, that would be double the processing load.

That's true, but it's a really small amount of processing per entity, and as @ymerj said, maybe someone has a use case. The way we had it before (only one HADB app instance per hub) was unnecessarily restrictive.

1 Like

I was able to add my about 10 years old RD200 RadonEye detector into Home Assistant.
Latest HADB easily picked up this new device:

The device produces a correct data but came as "Generic Component Unknown Sensor".
This is not a problem at all but is it any chance to make this sensor somewhat known?

As per instructions:

1 Like

Here is a related new devise portion of log:

dev:17632023-02-25 05:17:34.317 PMdebugparse(): description = {"id":1,"type":"event","event":{"event_type":"state_changed","data":{"entity_id":"sensor.fr_r20_sn0147_radon","old_state":{"entity_id":"sensor.fr_r20_sn0147_radon","state":"0.65","attributes":{"state_class":"measurement","unit_of_measurement":"pCi/L","icon":"mdi:radioactive","friendly_name":"FR:R20:SN0147 Radon"},"last_changed":"2023-02-25T22:07:30.432551+00:00","last_updated":"2023-02-25T22:07:30.432551+00:00","context":{"id":"01GT59VTM0JZBWB1ZWP4NSNK3E","parent_id":null,"user_id":null}},"new_state":{"entity_id":"sensor.fr_r20_sn0147_radon","state":"0.54","attributes":{"state_class":"measurement","unit_of_measurement":"pCi/L","icon":"mdi:radioactive","friendly_name":"FR:R20:SN0147 Radon"},"last_changed":"2023-02-25T22:17:33.435666+00:00","last_updated":"2023-02-25T22:17:33.435666+00:00","context":{"id":"01GT5AE7FV800NW3N5SJ4YBQ74","parent_id":null,"user_id":null}}},"origin":"LOCAL","time_fired":"2023-02-25T22:17:33.435666+00:00","context":{"id":"01GT5AE7FV800NW3N5SJ4YBQ74","parent_id":null,"user_id":null}}}

As I mentioned, everything is working as expected.
But I guess, it is better to convert unknown device into known (if this is not a big deal).

It really depends exactly how your device reports. I did write a radon component sensor, it is based on reporting units being Bq/m3

Is your sensor reporting in this unit ?

1 Like

If you replace the line
if (unit_of_measurement in ["Bq/m³"]) device_class = "radon"

By

if (unit_of_measurement in ["Bq/m³","piC/L"]) device_class = "radon"

In your local copy of the driver, does it work ?

2 Likes

So far I am using very successfully HADB application and drivers.
Yesterday I came across potential integration RD200 RadonEye with Home Assistant.
So, it took me about 10 min to add and start this integration in HA.
It immediately found my RD200 sensor.
Since I already have everything HADB installed it also picked up this new toy.
It works just fine but reported as "Unknown Sensor".
Actually I am 100% OK with this integration "as is" but prefer to convert
"Unknown Sensor" into something known, say Radon Sensor or so
if this is not a big deal to add/update.

As of today I don't have any use case for this Radon Sensor (I brought it
to my apartment in Florida from my house in Massachusetts) but I like to
have all my toys integrated just in case. Now I can see current Radon
level on a Air Quality Dashboard. That about it for now.

Not sure I follow. Does the change suggested by @mboisson works for you or not?

Note: you probably also have to manually change the relevant component from Generic Component Unknown Sensor to Generic Component Radon Sensor.

2 Likes

Ops. I am sorry, I completely missed the point.
Sure, I will try the change suggested by @mboisson

OK,
I added code for the "Generic Component Radon Sensor "
and applied the suggested changes.
Everything works as expected.

Thank you all for the help.

2 Likes

ok, @ymerj, @tomw, I opened a pull requests for this change, to support radon sensors that report in piC/L rather than Bq/m^3

2 Likes

I am sorry for the noise.
Actually the reporting stopped after I changed child driver from Unknown to
suggested Radon Sensor.
This toy (RD200) is too slow and I made an incorrect conclusion if it works or
not working.
I changed back child driver to unknown and reporting resumed.
Just in case here is a portion of the related logs:
dev:17632023-02-26 01:27:44.816 PMdebugparse(): description = {"id":2,"type":"result","success":true,"result":{"context":{"id":"01GT7FP0P1CM7X2KS61BYD505W","parent_id":null,"user_id":"cbef3d0b4da14ffb828ba621b37bcd22"}}}

dev:17632023-02-26 01:27:44.796 PMdebugparse: domain: sensor, device_class: null, entity: sensor.fr_r20_sn0147_radon, newVals: [0.06], friendly: FR:R20:SN0147 Radon

dev:17632023-02-26 01:27:44.791 PMdebugparse(): description = {"id":1,"type":"event","event":{"event_type":"state_changed","data":{"entity_id":"sensor.fr_r20_sn0147_radon","old_state":{"entity_id":"sensor.fr_r20_sn0147_radon","state":"0.1","attributes":{"state_class":"measurement","unit_of_measurement":"pCi/L","icon":"mdi:radioactive","friendly_name":"FR:R20:SN0147 Radon"},"last_changed":"2023-02-26T18:12:43.446601+00:00","last_updated":"2023-02-26T18:12:43.446601+00:00","context":{"id":"01GT7ETMSPVBH83ZYQARWN7JRE","parent_id":null,"user_id":null}},"new_state":{"entity_id":"sensor.fr_r20_sn0147_radon","state":"0.06","attributes":{"state_class":"measurement","unit_of_measurement":"pCi/L","icon":"mdi:radioactive","friendly_name":"FR:R20:SN0147 Radon"},"last_changed":"2023-02-26T18:27:43.397303+00:00","last_updated":"2023-02-26T18:27:43.397303+00:00","context":{"id":"01GT7FP3N5ZE9MDC2C50W7C7PN","parent_id":null,"user_id":null}}},"origin":"LOCAL","time_fired":"2023-02-26T18:27:43.397303+00:00","context":{"id":"01GT7FP3N5ZE9MDC2C50W7C7PN","parent_id":null,"user_id":null}}}

dev:17632023-02-26 01:37:47.855 PMdebugparse: domain: sensor, device_class: null, entity: sensor.fr_r20_sn0147_radon, newVals: [0.17], friendly: FR:R20:SN0147 Radon

dev:17632023-02-26 01:37:47.850 PMdebugparse(): description = {"id":1,"type":"event","event":{"event_type":"state_changed","data":{"entity_id":"sensor.fr_r20_sn0147_radon","old_state":{"entity_id":"sensor.fr_r20_sn0147_radon","state":"0.06","attributes":{"state_class":"measurement","unit_of_measurement":"pCi/L","icon":"mdi:radioactive","friendly_name":"FR:R20:SN0147 Radon"},"last_changed":"2023-02-26T18:27:43.397303+00:00","last_updated":"2023-02-26T18:27:43.397303+00:00","context":{"id":"01GT7FP3N5ZE9MDC2C50W7C7PN","parent_id":null,"user_id":null}},"new_state":{"entity_id":"sensor.fr_r20_sn0147_radon","state":"0.17","attributes":{"state_class":"measurement","unit_of_measurement":"pCi/L","icon":"mdi:radioactive","friendly_name":"FR:R20:SN0147 Radon"},"last_changed":"2023-02-26T18:37:46.455560+00:00","last_updated":"2023-02-26T18:37:46.455560+00:00","context":{"id":"01GT7G8GJQY3XN6Q29E4XQS5A8","parent_id":null,"user_id":null}}},"origin":"LOCAL","time_fired":"2023-02-26T18:37:46.455560+00:00","context":{"id":"01GT7G8GJQY3XN6Q29E4XQS5A8","parent_id":null,"user_id":null}}}

dev:17632023-02-26 01:37:47.855 PMdebugparse: domain: sensor, device_class: null, entity: sensor.fr_r20_sn0147_radon, newVals: [0.17], friendly: FR:R20:SN0147 Radon

dev:17632023-02-26 01:37:47.850 PMdebugparse(): description = {"id":1,"type":"event","event":{"event_type":"state_changed","data":{"entity_id":"sensor.fr_r20_sn0147_radon","old_state":{"entity_id":"sensor.fr_r20_sn0147_radon","state":"0.06","attributes":{"state_class":"measurement","unit_of_measurement":"pCi/L","icon":"mdi:radioactive","friendly_name":"FR:R20:SN0147 Radon"},"last_changed":"2023-02-26T18:27:43.397303+00:00","last_updated":"2023-02-26T18:27:43.397303+00:00","context":{"id":"01GT7FP3N5ZE9MDC2C50W7C7PN","parent_id":null,"user_id":null}},"new_state":{"entity_id":"sensor.fr_r20_sn0147_radon","state":"0.17","attributes":{"state_class":"measurement","unit_of_measurement":"pCi/L","icon":"mdi:radioactive","friendly_name":"FR:R20:SN0147 Radon"},"last_changed":"2023-02-26T18:37:46.455560+00:00","last_updated":"2023-02-26T18:37:46.455560+00:00","context":{"id":"01GT7G8GJQY3XN6Q29E4XQS5A8","parent_id":null,"user_id":null}}},"origin":"LOCAL","time_fired":"2023-02-26T18:37:46.455560+00:00","context":{"id":"01GT7G8GJQY3XN6Q29E4XQS5A8","parent_id":null,"user_id":null}}}

I believe that’s my bad.

He correct line should be

if (unit_of_measurement in ["Bq/m³","pCi/L"]) device_class = "radon"

Rather than

if (unit_of_measurement in ["Bq/m³","piC/L"]) device_class = "radon"

I misread the units in your logs. They are pCi/L, not piC/L

I fixed my PR accordingly

1 Like

OK, I updated my local HADB parent driver accordingly
Now I guess it works but introduced new line radon : 0,32

image

The new "radon" value appeared and it is correct and updated accordingly.
But now previous "value" and "valueStr" parameters are staled.
Overal, this is OK but it will be nice to clear that useless now values.

Delete the current child and let it be recreated automatically.

3 Likes

Version 1.54: Add light effects support and include @mboisson improved radon sensor

3 Likes

I would like to expose power state (on/off) for a few specialized HA devices (Denon receiver, Apple TV, LG TV) that don't have good HE drivers. Since these HA devices are too complex, I was think of using some type of virtual toggle switch in HA that would then be exposed to HE as a on/off switch. How would I do this? I Google HA virtual switch, and the results looked grim.