Hi SmartThings Community, @nayelyz, @Itati
We are integrating OTA firmware update support using SmartThings Schema Connector.
We are able to trigger the firmware update command successfully from SmartThings/Postman flow. After OTA completion, we are sending a stateCallback to SmartThings and receiving 204 No Content, but the SmartThings app is still not showing the firmware update success status.
State refresh response before OTA:
{
"component": "main",
"capability": "st.firmwareUpdate",
"attribute": "updateAvailable",
"value": true
}
Command request to trigger firmware update:
{
"headers": {
"schema": "st-schema",
"version": "1.0",
"interactionType": "commandRequest",
"requestId": "abc-123-456"
},
"authentication": {
"tokenType": "accessToken",
"token": "<access_token>"
},
"devices": [
{
"externalDeviceId": "COPD-WF/AQ_202416111E088E1_b90a0f5e9a",
"deviceCookie": {},
"commands": [
{
"component": "main",
"capability": "st.firmwareUpdate",
"command": "update"
}
]
}
]
}
State callback payload sent after OTA success:
{
"headers": {
"schema": "st-schema",
"version": "1.0",
"interactionType": "stateCallback",
"requestId": "abc-123-456"
},
"authentication": {
"tokenType": "accessToken",
"token": "<access_token>"
},
"deviceState": [
{
"externalDeviceId": "COPD-WF/AQ_202416111E088E1_b90a0f5e9a",
"deviceCookie": {},
"states": [
{
"component": "main",
"capability": "st.firmwareUpdate",
"attribute": "lastUpdateStatus",
"value": "updateSucceeded"
}
]
}
]
}
The callback API response is:
204 No Content
Questions:
-
For Schema Connector firmware update, is
lastUpdateStatus = updateSucceededthe correct attribute/value to notify OTA success? -
Should we instead send
attribute: "state"with value likeupdatedorupdateInProgress? -
Do we need to send
currentVersion,availableVersion, andupdateAvailable: falseagain in the stateCallback after OTA success? -
After receiving
204 No Content, should SmartThings app automatically update the UI, or is a separate state refresh required? -
Is there any specific required format for
authentication.tokenTypein stateCallback? We are currently usingaccessToken.
Any guidance or sample payload for OTA success/failure stateCallback for st.firmwareUpdate would be very helpful.
Thanks.