The API to list all device profiles for a user does not return edge device profiles

If I call
https://api.smartthings.com/v1/deviceprofiles
I seem to get profiles I have created using the Developer workspace.
If I call https://api.smartthings.com/v1/deviceprofiles/{deviceProfileId} using the id for an edge device, it returns the required info.

I assume this is expected behaviour? Is there away to get a list of all edge device profiles?

As far as I can tell it is actually more complicated than that. Each profile in an Edge driver package appears as one of the deviceIntegrationProfiles in the driver metadata with a UUID style id and a majorVersion number. Each time you create a new version of the Edge profile it results in a new device profile with a different ID being created, or the reuse of an already existing profile. This suggests a mechanism similar to that used with device configs and device presentations.

When that device profile is created isn’t clear. It might be when the package is uploaded, or it might be when a particular Edge profile is used by a device. Either way the profile of a device and the Edge driver profile are not the same thing. I’ll retract that, as it is pretty obvious things happen at upload time.

Somewhere out there it seems there ought to be a mapping between the Edge profile, indexed by name and ID, and an actual device profile ID, though on reflection it perhaps doesn’t need to be stored anywhere as it is only needed when the device is being updated with a new profile. I wouldn’t be surprised if the Edge profiles are also maintained independently of the driver source but they surely must be out there somewhere.

Something like that anyway.

I haven’t found a trace of them anywhere.

For anyone who hasn’t read one, this is what the top of a driver metadata object looks like:

{
    "driverId": "408981c2-91d4-4dfc-bbfb-84ca0205d993",
    "name": "Zigbee Contact",
    "packageKey": "zigbee-contact",
    "deviceIntegrationProfiles": [
        {
            "id": "00abbee9-a609-3c9c-a947-931de6493109",
            "majorVersion": 13
        },
        {
            "id": "1d2dc3d4-2fde-3fb7-87b6-e7fdb91a9763",
            "majorVersion": 0
        },
        {
            "id": "1f9fdc55-9540-3faa-bf37-3ae992b69cd4",
            "majorVersion": 4
        },
        {
            "id": "229f559b-faf4-3d9a-9486-e53f6165c81e",
            "majorVersion": 7
        },
        {
            "id": "6b844edf-d465-32a9-9080-893f4a7a1e4f",
            "majorVersion": 3
        },
        {
            "id": "b4303d67-88a8-3d2c-8b60-283bbd637b93",
            "majorVersion": 12
        }
    ],
    "permissions": [
        {
            "name": "zigbee",
            "attributes": []
        }
    ],
    "version": "2023-02-28T20:01:54.635905863",
    "fingerprints": [
        {
            "id": "LUMI/lumi.magnet.agl02",
            "type": "ZIGBEE_MANUFACTURER",
            "deviceLabel": "Aqara Door and Window Sensor T1",
            "zigbeeManfacturer": {
                "manufacturer": "LUMI",
                "model": "lumi.magnet.agl02",
                "deviceIntegrationProfileKey": {
                    "id": "b4303d67-88a8-3d2c-8b60-283bbd637b93",
                    "majorVersion": 12
                }
            }
        },

The bottom of the file looks like:

        {
            "id": "SmartSense/MultiSensor/Generic",
            "type": "ZIGBEE_GENERIC",
            "deviceLabel": "Multipurpose Sensor",
            "zigbeeGeneric": {
                "clusters": [],
                "deviceIdentifiers": [
                    313
                ],
                "zigbeeProfiles": [
                    64513
                ],
                "deviceIntegrationProfileKey": {
                    "id": "1d2dc3d4-2fde-3fb7-87b6-e7fdb91a9763",
                    "majorVersion": 0
                }
            }
        }
    ]
}

Oh and it really does say zigbeeManfacturer in the API. I didn’t lose the u.

Interesting…this will take me some time to absorb.

Thanks very much

You may come up with a better idea of how it fits together.

It seems quite plausible that all that need to exist in the API are the profiles in /deviceprofiles. They have the driverId and profile name in their metadata so it is not that there isn’t a direct correspondence with specific Edge driver profiles. So when I suggest they aren’t the same thing perhaps I am implying too much.

What is perhaps distracting me is the device integration profile ID in the driver metadata. The actual driver code uses a name exclusively, including when changing the profile, and that name appears in the device profile too. So it seems a bit incongruous to see a UUID style ID appear. It just seems redundant. It could be a relic or it could mean a piece of the jigsaw is missing. I think I’ve been giving the latter too much weight.

One other comment about the profiles. When you upload a package with a new version of a profile it appears that any device that was using that profile switches to a new profileId (or reuses one if the new version is actually a reversion). I may be wrong about this but it doesn’t seem to matter whether the device is using the updated driver source or not, the profiles seem to be maintained independently.