Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OTA succeeded but is reported as 'Failed' on the firmware dashboard #144

Closed
DirkO4YB opened this issue Aug 2, 2023 · 2 comments · Fixed by #142
Closed

OTA succeeded but is reported as 'Failed' on the firmware dashboard #144

DirkO4YB opened this issue Aug 2, 2023 · 2 comments · Fixed by #142

Comments

@DirkO4YB
Copy link

DirkO4YB commented Aug 2, 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

@DirkO4YB
Copy link
Author

DirkO4YB commented Aug 2, 2023

To be more precise, The Firmware_send_state should produce 'Updated' in stead of FW_UPDATE_SUCCESS, which would produce 'Update success'.

@MathewHDYT
Copy link
Contributor

MathewHDYT commented Aug 3, 2023

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants