kingsleyadam / local-abbfreeathome-hass

This is the Home Assistant custom_components (HACS) repository for Busch Jaeger/ABB Free@Home (Local API)
MIT License
3 stars 2 forks source link

Suggestion: Create the SysAP as virtual device holding all real devices #8

Closed derjoerg closed 1 week ago

derjoerg commented 1 week ago

What about the possibility to have the SysAP as a virtual device (so the serial and the firmware-version [e.g. 3.2.2] can be displayed) and adding all real devices as "sub-devices" to it?

If I understand the developer documentation right this would be possible with "via_device" of the device registry https://developers.home-assistant.io/docs/device_registry_index#device-properties

So a "device" for the SysAP is created (populating serial_number, sw_version and hw_version from settings.json and perhaps also manufacturer) and all the real devices are added to this device.

kingsleyadam commented 1 week ago

Are you able to find documentation on how to add a hub type device where we can device that device attributes?

kingsleyadam commented 1 week ago

I think I've got it, I'll give it a try, https://developers.home-assistant.io/docs/device_registry_index/#manual-registration

kingsleyadam commented 1 week ago

@derjoerg , I just added this change along with a couple of other changes and pushed a new release. You should see a new device after upgrading which is the System Access Point.

https://github.com/kingsleyadam/local-abbfreeathome-hass/releases/tag/0.5.0

derjoerg commented 1 week ago

Hi,

I can't test this at the moment because of https://github.com/kingsleyadam/local-abbfreeathome/issues/27

When thinking about that I got something additional: You decided to save the functionIds, pairingIds and parameterIds as integers. It is my feeling that this creates additional work for e.g. development and troubleshooting. The Ids are everywhere stored as hex-values, so everytime the lists need to be updated they first need to be converted to integers. In the code they always need to be converted back to hex and when looking into the output from f@h I always need to start a converter for hex-to-int-to-hex. Wouldn't it ease the usage to completely stay with the hex-values?