I am currently using the SmartThings Schema Connector to integrate my device with SmartThings. However, I am encountering an issue where an error is returned on ST App (It takes time and ST app shows “network or server got error. Try later” ) when attempting to update the device state to the same value. Below are the details of the issue and related logs.
1. Issue Description
-
I am handling the
setActionModecommand to update the actionMode state of my device. -
When the state changes (e.g.,
Stop→Move), everything works as expected. -
However, when the state remains the same (e.g.,
Move→Move), SmartThings returns an error.
2. Logs
- Stop→Move OK
- REQUEST {
“headers”: {
“schema”: “st-schema”,
“version”: “1.0”,
“interactionType”: “commandRequest”,
“requestId”: “892a886b-060b-4b56-9f22-61af94ad5c08”
},
“authentication”: {
“tokenType”: “Bearer”,
“token”: “Smartthings_RB230415:$fsADJH”
},
“devices”: [
{
“externalDeviceId”: “external-device-1”,
“deviceCookie”: {},
“commands”: [
{
“component”: “main”,
“capability”: “bigwaveroboticsdev.action”,
“command”: “setActionMode”,
“arguments”: [
“Move”
]
}
]
}
]
}
Command handler called with accessToken: Smartthings_RB230415:$fsADJH
setActionMode command received
Current actionMode: Stop
Requested actionMode: Move
RESPONSE {
“headers”: {
“schema”: “st-schema”,
“version”: “1.0”,
“interactionType”: “commandResponse”,
“requestId”: “892a886b-060b-4b56-9f22-61af94ad5c08”
},
“deviceState”: [
{
“externalDeviceId”: “external-device-1”,
“states”: [
{
“component”: “main”,
“capability”: “bigwaveroboticsdev.action”,
“attribute”: “actionMode”,
“value”: “Move”
}
]
}
]
} - Move → Move
- REQUEST {
“headers”: {
“schema”: “st-schema”,
“version”: “1.0”,
“interactionType”: “commandRequest”,
“requestId”: “ce177989-b05b-4021-a43d-ed787eaf0f0e”
},
“authentication”: {
“tokenType”: “Bearer”,
“token”: “Smartthings_RB230415:$fsADJH”
},
“devices”: [
{
“externalDeviceId”: “external-device-1”,
“deviceCookie”: {},
“commands”: [
{
“component”: “main”,
“capability”: “bigwaveroboticsdev.action”,
“command”: “setActionMode”,
“arguments”: [
“Move”
]
}
]
}
]
}
Command handler called with accessToken: Smartthings_RB230415:$fsADJH
setActionMode command received
Current actionMode: Move
Requested actionMode: Move
RESPONSE {
“headers”: {
“schema”: “st-schema”,
“version”: “1.0”,
“interactionType”: “commandResponse”,
“requestId”: “ce177989-b05b-4021-a43d-ed787eaf0f0e”
},
“deviceState”: [
{
“externalDeviceId”: “external-device-1”,
“states”: [
{
“component”: “main”,
“capability”: “bigwaveroboticsdev.action”,
“attribute”: “actionMode”,
“value”: “Move”
}
]
}
]
}
4. Questions
- Why does SmartThings return an error when the state remains the same and is returned in the response?