Has anyone developed a Cloud Webhook Schema server using the Spring Framework?

Hello,

Our company is trying to integrate our service with SmartThings.

Instead of using the Node.js-based SDK provided by SmartThings, we are attempting to develop the integration using Java-based Spring Boot.

For now, we are conducting simple integration tests.

When implementing the example using the official SmartThings SDK, it works correctly.

However, our Java Spring Boot implementation does not seem to integrate properly.

Specifically, OAuth integration and discovery request/response work fine, but the refresh status request/response stage does not function correctly.

When adding a device through the SmartThings app, the device is added successfully, but the app shows a message stating that the device status has not been updated, and the device functions do not work properly.

We have, of course, implemented the callback as required.

We used a @RestController to respond in JSON format.

Also, when checking logs on both servers, all fields and values except the requestId are sent identically.

Yet, the error described above occurs.

If anyone has developed a Schema server based on Spring and experienced similar issues, I would greatly appreciate it if you could share how you resolved them.

below is logs. both server use same device profile

[from st-schema node.js library, its work]

{
  "headers": {
    "schema": "st-schema",
    "version": "1.0",
    "interactionType": "stateRefreshRequest",
    "requestId": "2e1a7c66-18d6-471f-ba0e-d3f0f6d8242f"
  },
  "authentication": {
    "tokenType": "Bearer",
    "token": "Smartthings_RB230415:$20YUMH"
  },
  "devices": [
    {
      "externalDeviceId": "external-device-1",
      "deviceCookie": {}
    }
  ]
}
{
  "headers": {
    "schema": "st-schema",
    "version": "1.0",
    "interactionType": "stateRefreshResponse",
    "requestId": "2e1a7c66-18d6-471f-ba0e-d3f0f6d8242f"
  },
  "deviceState": [
    {
      "externalDeviceId": "external-device-1",
      "states": [
        {
          "component": "main",
          "capability": "st.switch",
          "attribute": "switch",
          "value": "on"
        },
        {
          "component": "main",
          "capability": "st.switchLevel",
          "attribute": "level",
          "value": 100
        }
      ]
    }
  ]
}

[from spring server , its not work]

ngFilter] - 
[API Request]
[URL] : POST /samsung/schema/events
[Authorization] : null
[BODY]
{
  "headers" : {
    "schema" : "st-schema",
    "version" : "1.0",
    "interactionType" : "stateRefreshRequest",
    "requestId" : "1baa6fc8-2b67-41a7-8b68-f36d6c7632db"
  },
  "authentication" : {
    "tokenType" : "Bearer",
    "token" : "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOltdLCJzaXRlIjpbXSwiYXV0aCI6IltBZG1pbiwgVGVzdGVyLCBEZXZlbG9wZXJdIiwidXVpZCI6IkVacWJRSUxWS3pXbkNKN1pDOWdZdHg3MDc3UDIiLCJjYWxsX2xpbWl0Ijp7IlBVVCI6MTAwLCJERUxFVEUiOjEwMCwiUE9TVCI6MTAwLCJQQVRDSCI6MTAwLCJHRVQiOjEwMH0sImlhdCI6MTc1Mzc3NTM5NSwiZXhwIjoxNzU2MzY3Mzk1fQ.NQF_Kj-b1a2_l976X_JC2ML4oIBstZoMT-G4ipl_hfs"
  },
  "devices" : [ {
    "externalDeviceId" : "external-device-1",
    "deviceCookie" : { }
  } ]
}
2025-07-29 07:49:56.662 [INFO] [UUID: 46714454bf] [http-nio-4000-exec-10] [io.sollink.plus.global.log.logback.ApiLoggingFilter] - 
[API Response]
[STATUS] : 200
[BODY]
{
  "headers" : {
    "schema" : "st-schema",
    "version" : "1.0",
    "interactionType" : "stateRefreshResponse",
    "requestId" : "1baa6fc8-2b67-41a7-8b68-f36d6c7632db"
  },
  "deviceStates" : [ {
    "externalDeviceId" : "external-device-1",
    "deviceCookie" : { },
    "states" : [ {
      "component" : "main",
      "capability" : "st.switch",
      "attribute" : "switch",
      "value" : "off"
    }, {
      "component" : "main",
      "capability" : "st.switchLevel",
      "attribute" : "level",
      "value" : 100
    } ]
  } ]
}

Tagging @nayelyz .

Hi, @rocky1

I looked for this request ID in the Cloud logs and saw different errors, so, I will list them below so you can take action:

  1. At 1:49:56.025 AM GMT-6, you made an AccessToken request, and there was a “failed due to invalid clientSecret” error
  2. At 1:49:56.681 AM GMT-6, you sent a stateRefreshResponse but there’s an error saying “Empty device state”

I cannot find this specific call you mention, so, can you replicate the error and provide the following, please?

  • Open support access to your account
  1. Confirm the email account registered in the forum is the same one you use for SmartThings. If not, please share it with me over DM
  2. Enable support access to your account:
  1. Go to the SmartThings Web (my.smartthings.com)
  2. Log in to your Samsung Account
  3. Select Menu (⋮) and choose Settings
  4. Toggle on Account Data Access
  5. Select the time period and confirm - In this step, please select “Until turned off”, once the team finishes, we’ll let you know so you can disable it again.

See more information about this access here: https://support.smartthings.com/hc/en-us/articles/36170233944852-Enabling-Account-Data-Access-for-Support

  • Name of the device discovered by the integration
  • Date and time of when you replicate the error including your timezone. For example: July 30th 12:00 GMT-6