homebridge-alexa-smarthome icon indicating copy to clipboard operation
homebridge-alexa-smarthome copied to clipboard

Show proper device information

Open nyirsh opened this issue 1 year ago • 0 comments

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.

nyirsh avatar Jan 05 '24 18:01 nyirsh