You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OTA FW updates are performed as expected, but the status on the TB dashboard changes to 'failed'.
Background: i tried using the passive FW update via Subscribe_Firmware_Update, and this works... in the beginning. But after a period (days, weeks) the subscription is somehow lost and the client doesn't receive the updates anymore. I don't know if this is an issue, a feature, or just my misunderstanding of the working of subscriptions.
So i turned to actively checking for new (pending) updates (Start_Firmware_Update) on an hourly bases. This way the update process is robust and within the hour the client will get the update. But after the next round, the check will return a failed state and the dashboard will show this fail. But the update was in fact a succes (earlier).
My proposed solution is very easy to implement:
When the firmware update is performed (Start_Firmware_Update) and the result is 'firmware up to date' or 'firmware not for us', the Firmware_send_state should be FW_UPDATE_SUCCESS rather than FW_STATE_FAILED (but with the appropriate report FW_UP_TO_DATE or FW_NOT_FOR_US). This way the status will stay 'Updated' on the firmware dashboard.
Thanks again, Greetz, Dirk
The text was updated successfully, but these errors were encountered:
Understood, that should be an easy change with sending 'FW_UP_TO_DATE' instead of 'FAILED'.
For why you lose the subscriptions, after a while that might be because you lost internet connection and if you did and reconnect to ThingsBoard all previous subscriptions are cleaned up. Meaning you have to resubscribe them.
Once the previous issue has been fixed you could use my branch again which does not require to subscribe again at least for OTA, this was done so the update can be continued if the connection is lost and then regained.
MathewHDYT
added a commit
to MathewHDYT/thingsboard-client-sdk
that referenced
this issue
Aug 4, 2023
OTA FW updates are performed as expected, but the status on the TB dashboard changes to 'failed'.
Background: i tried using the passive FW update via Subscribe_Firmware_Update, and this works... in the beginning. But after a period (days, weeks) the subscription is somehow lost and the client doesn't receive the updates anymore. I don't know if this is an issue, a feature, or just my misunderstanding of the working of subscriptions.
So i turned to actively checking for new (pending) updates (Start_Firmware_Update) on an hourly bases. This way the update process is robust and within the hour the client will get the update. But after the next round, the check will return a failed state and the dashboard will show this fail. But the update was in fact a succes (earlier).
My proposed solution is very easy to implement:
When the firmware update is performed (Start_Firmware_Update) and the result is 'firmware up to date' or 'firmware not for us', the Firmware_send_state should be FW_UPDATE_SUCCESS rather than FW_STATE_FAILED (but with the appropriate report FW_UP_TO_DATE or FW_NOT_FOR_US). This way the status will stay 'Updated' on the firmware dashboard.
Thanks again, Greetz, Dirk
The text was updated successfully, but these errors were encountered: