Smart Things Cloud to Cloud integration error: Device owner does not have access to profile nor is it owned by location member!

Hello,
I’m making progress in my device integration into the Smart Things ecosystem.

I’m working on a cloud to cloud integration.
I created an organization in the Developer Workspace and also created a Brand.
I made a device profile inside the organization workspace.

I managed to deploy the device in test , add it to my smart things app (same samsung account used in the samsung developer workspace).

I also manged to stateCallback my device.

The next step i wanted to try was to add other devices on other smart things app.
So i requested on the samsung developer workspace to add 2 samsung account to my organization with developer status.
Then after the account were added to the organization I put their smart things app in developer mode and had access to the device i made in the developer workspace.

I tried to add the device on both smar things apps.
The granCallBackAccess request goes fine and during it i also manage to make a token request to store access and refresh token for following callBack.

The problem is that I receive an error during the discoveryRequest.
deviceError=[SmartThingsDeviceError{errorEnu
m=‘BAD-REQUEST’, detail=‘profileId: Device owner does not have access to profile ‘my-device-profile-id’ nor is it owned by location member!’}]

Is there any way to overcome this error?

Hi @emanuele.d1994 ,

The error you’re seeing usually occurs when the device profile you’re trying to use is not owned by you. For others to use the profile, you need to publish it from your account or have the owner publish it. Once published, the profile cannot be modified and this can only be done via the CLI.

To resolve this issue, follow these steps:

  1. Publish the Device Profile: Make sure the device profile is published. You can do this from the SmartThings CLI using this command:
smartthings deviceprofiles:publish profileID

Once published, the profile will be available to other users.

Note: Remember that published profiles cannot be modified, so, in case you want to change the configuration, you’ll have to create another one.

  1. Confirm Profile Ownership: Verify that the profile you are using is owned by you or the account owner. Only profiles published by the owner will be accessible to other organization members.

If you need more details on how to publish the profile using the CLI, please let me know, and I’ll provide the specific commands.

I hope this helps resolve the issue. If you have any other questions, feel free to ask.

Hello @Luis_Humberto_Medina ,

Thank you for the answer, i published the device profile through the CLI and solved the problem.
I managed to add the device on different samsung account and smartthings apps.

What if i want to modify the profile? Is it possible to , at least, change the translation file? Or I need to create a new profile for any kind of change i want to make?

I have just 2 more open questions:

  1. Confirm Profile Ownership: Verify that the profile you are using is owned by you or the account owner. Only profiles published by the owner will be accessible to other organization members.
    How do i check this ? I didn’t find any command in the smartthings cli readme.

  2. Even before publishing the device profile, and after i added some accounts to my organization , the device profile inside my project (on the developer workspace) has disappeared, I add some screen to better expalin:

image
Here the Device Profile is not checked (but i never made any change and the project has always been deployed to test)


If I go inside the Device Profile section it is like no device is provided for the project


If I press “ADD A DEVICE PROFILE” I can see my device profile in list, but if i try to add my device profile to the project i get this error.

On the browser console i see:

PUT https://iotconsole-backend.smartthings.com/smartthingsconsole/iotdev/api/v3/c2cpartner/projects/Hii2ojeUCboUJzKL 400 (Bad Request) 

This is the request response:

{
    "resultCode": "4001",
    "resultMsg": "Invalid input(s) used in request",
    "resultDetail": [
        {
            "field": "dvcPrflIdList[0]",
            "message": "Device Profile not found... {0}",
            "rejectedValue": "RvSFPYHxQ7aRU6Iy"
        }
    ],
    "referenceId": "C0622AE7EE464977B42922F2920F36C9"
}

Any suggestion on why this is happening and how to solve it?
My project is working correctly at the moment but if I undeploy it I don’t know what could happen

Hi @emanuele.d1994

  1. Confirm Profile Ownership:
    You can verify profile ownership using the CLI command:

    smartthings deviceprofiles
    

    This command will list the available device profiles in your account along with their ownership details.

  2. Workspace Issues:
    Ensure that the device profile and the project are in the same workspace. There can be differences between private and organization profiles that might be causing the issues. If possible, try creating a new profile within the organization workspace and see if the problem persists.

    Additionally, ensure that the organization members have the necessary permissions and that the profile is accessible to them.

I hope this helps!

Thank you for the answer, I’m sure that the device profile was made using the organization workspace because i already had some problems with the profile and arleady recreate it , isn’t there any other way to solve this issue?

@emanuele.d1994 Did you perform any other actions the first time this issue occurred? For instance, did you manipulate the profile (edit it) from the CLI or make any changes to it after publishing?

Publishing the profile itself should not cause problems, but editing it afterward can lead to inconsistencies.

Let me know if any additional actions were taken so we can pinpoint the cause.

No, I’m sorry but I didn’t do anything after publishing.
Before publishing the project I added 3 accounts to the organization, but the profile was already impossible to use. I don’t know what is going on because my project is deployed in test and running correctly so I really don’t understand why the custom profile is not linked to the cloud connector.

I don’t want to make a new profile because otherwise i have to remove the device from all of the smartthings app in which it is in use for testing , so if there is any technical issue that can be solved, for me it would be better.

If there isn’t any other option i can make a new profile and repeat all the operations.

Hello Emanuele,

I suggest you create a new profile and edit the schema connector code. You could change the discovery handler of your schema integration to replace the current profile ID with the new one without deleting the devices already installed.

Once this is done, a discovery interaction should be triggered so the devices get the newest profile.

The changes should be effective once the periodic Discovery interaction happens (every 24 hours), but you can force a refresh in linked services by following these steps:

  1. Go to the menu.
  2. Click on the settings icon.
  3. Go to the “linked services”.
  4. Find the integration and you will see the devices discovered in that integration.
  5. Click on the refresh button.
  6. In your logs, you will see that the discovery and state refresh handler were executed.

To confirm that the new profile is in use, check the device’s details in the API.

Thank you for your support, i created a new profile and published it so now it is working correctly also in the previuos installations.

1 Like

@emanuele.d1994 Thanks for keeping us informed! If you experience any further problems with your profiles, don’t hesitate to let us know. We are here to help you.