joeyhage / homebridge-alexa-smarthome

Connect Alexa devices to HomeKit
MIT License
62 stars 20 forks source link

Show proper device information #94

Open nyirsh opened 6 months ago

nyirsh commented 6 months ago

Is your feature request related to a problem? Please describe: In HK, when you go into the device settings and scroll all the way down you can see some useful information about the device itself such as the manufacturer, serial no, software version etc. I would like to be able to see accurate information instead of 'Unknown',

Describe the solution you'd like: I know that the SmartHomeDevice already has the serial number of the device and showing it is fairly easy: base-accessory.ts @ line 80

service
      .setCharacteristic(this.Characteristic.SerialNumber,
        this.device.providerData.dmsDeviceIdentifiers
          ? this.device.providerData.dmsDeviceIdentifiers[0]?.deviceSerialNumber || 'Unknown'
          : 'Unknown')

The rest of the information are available in GetDetailsForDevicesResponse but I couldn't quite figure out how to save them myself, still have a lot to learn in FP.

{
  "locationDetails": {
    ...
          "LambdaBridge_AAA/SonarCloudService": {
            ...
            "applianceDetails": {
              "applianceDetails": {
                "AAA_SonarCloudService_...": {
                  "applianceId": "AAA_SonarCloudService_...",
                  "manufacturerName": "Amazon", <---- Characteristic.Manufacturer
                  "entityId": "2aafd215-...",
                  "additionalApplianceDetails": {
                    "additionalApplianceDetails": {
                      "deviceType": "A39QOBV8Y...", <---- Characteristic.Version MAYBE??
                      "configurationVersion": "1",
                      "swVersion": "16975104", <---- Characteristic.SoftwareRevision
                      "regionIdentifier": "00.ATVP...",
                      "deviceSerialNumber": "GD61M60..." <---- Characteristic.SerialNumber
                    }
                  },
                  "firmwareVersion": "0", <---- Characteristic.FirmwareRevision
                  "capabilities": [...],
                }
            ...

It would be interesting, for possible future use cases, to be able to navigate this structure in the DeviceStore or similar.