SmartThings Schema Device Profile: Can I create custom device profile?

Hi All,

I am new to ST and I am working on an integration using the SmartThings Schema Connector. Currently I am using device handler types that are defined in the docs
(https://smartthings.developer.samsung.com/docs/guides/smartthings-schema/device-handler-types.html) to describe my device’s capabilities (and they work fine). However, I need a new device handler types for a relay and a thermostat but I can’t see an option in the Developer Workspace to create a custom device profile when SmartThings Schema Connector.

Now my question is: Is there a way I can create a custom device profile while using SmartThings Schema Connector? If so, how? Or Is there a way around this?

Many thanks in advance :slight_smile:

Hey Jacques,
You can create a device profile using this documentation:
https://smartthings.developer.samsung.com/docs/guides/device-profile/basics.html

Currently the platform requires integrations with ST Schema to have “published” device profile. We are working on removing this requirement for easier testing, but currently this criteria is a requirement. You can use the following API to “publish” your device profile, but please note that this is a one way street. You won’t be able to make edits to your profile after publishing and won’t be able to revert it back to development state either.

POST to https://api.smartthings.com/v1/deviceprofiles/{deviceProfileId}/status with the following JSON payload:
{
“deviceProfileStatus”: “PUBLISHED”
}

After this you can send this device profile id instead of the device handler type in ST Schema discovery response payload.

hi I have the same issue. I cannot see the tab on my samsung account login which allows me to create a device profile. I understand that we need to publish but is there any space allocated to create a device profile and corresponding ID. https://lexidevices.com/smartthings-login This link does not mention that. Also is there a way to edit the existing standard device profile. Eg “c2c-rgbw-color-bulb” shows temperature range of 2200K-9000K on smartthings app. Is there a way that i can change this to 2500k-6500k

Hi,
I tried to call https://api.smartthings.com/v1/deviceprofiles/{deviceProfileId}/status as you explained, but I always get :

400 Bad Request

Do I miss something ?

Was the original query ever resolved? I have the same problem in that there is no obvious link in the workspace to create a device profile when creating a schema connector.

We are working on making device profiles more easily accessible, but for now you will have to create a new C2C project under “SmartApp Connector” at which point you will see the Device Profiles tab. You can then use that device profile in Schema Connector. The Developer Workspace team is working on making this process more developer friendly.

Thanks, I will give that a go.

Are you sure you are making a POST call? the GET call does fail to /status.
I just tried it out and it is still working.

Yes sure, other methods give error 405 method not allowed.
I just try with a “super” user (all scopes), but same response:

400 Bad Request
{
    "requestId": "6D87BA62-84AF-4F76-9607-F1A23E6D80AC",
    "error": {
        "code": "BadRequestError",
        "target": null,
        "message": "The request is malformed.",
        "details": []
    }
}

Can you post your body here? make sure you don’t have weird quotes when you copy my json body

This was due to the request Content-Type header which was not application/json.
I checked “json” format in the client I use, but I doesn’t apply to Content-Type.

So this well works.

Thank you.

Edit - just re-read your response for April 2 so will now do that too.

Edit2 - publishing as per above successfully

Is there currently a way of publishing the profile without publishing the SmartApp Connector? Currently I get the error below:

{“headers”:{“schema”:“st-schema”,“version”:“1.0”,“interactionType”:“interactionResult”,“requestId”:“xxxxxx”},“authentication”:{“tokenType”:“Bearer”,“token”:“xxxxxx”},“deviceState”:[{“externalDeviceId”:“41-3”,“deviceError”:[{“errorEnum”:“BAD-REQUEST”,“detail”:“profileId: Profile cb90f42c-67ff-4ce4-97d9-69c0bb6b8b60 is not published!”}]},{“externalDeviceId”:“41-2”,“deviceError”:[{“errorEnum”:“BAD-REQUEST”,“detail”:“profileId: Profile cb90f42c-67ff-4ce4-97d9-69c0bb6b8b60 is not published!”}]}],“originatingInteractionType”:“discoveryResponse”}

The discovery should work for you with the published device profile.

Thanks, it’s all working.