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
} ]
} ]
}