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

[shelly] Fix thing re-init after power cycle for firmware update #17163

Merged
merged 10 commits into from
Aug 2, 2024

Conversation

markus7017
Copy link
Contributor

@markus7017 markus7017 commented Jul 27, 2024

After a power cycle all connected devices should be re-initialized and thing should go ONLINE. This was broken.
Same after a firmware upgrade. Thing went to FIRMWARE_UPDATING, but never got back ONLINE.

Closing
#17014

@markus7017 markus7017 added bug An unexpected problem or unintended behavior of an add-on work in progress A PR that is not yet ready to be merged labels Jul 27, 2024
@markus7017 markus7017 self-assigned this Jul 27, 2024
@markus7017 markus7017 linked an issue Jul 27, 2024 that may be closed by this pull request
@markus7017 markus7017 changed the title [shelly][WIP] Fix thing re-init after power cycle for firmware update [shelly] Fix thing re-init after power cycle for firmware update Jul 27, 2024
@markus7017 markus7017 removed the work in progress A PR that is not yet ready to be merged label Jul 27, 2024
@markus7017 markus7017 requested a review from jlaur July 27, 2024 16:42
@markus7017
Copy link
Contributor Author

@lsiepel changes applied

please also consider as back-Ort to 4.2

Copy link
Contributor

@jlaur jlaur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix. I have added a few comments as well. (FYI @lsiepel)

@markus7017 markus7017 added the additional testing preferred The change works for the pull request author. A test from someone else is preferred though. label Jul 28, 2024
@markus7017
Copy link
Contributor Author

review changes are applied, please check

Copy link
Contributor

@jlaur jlaur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing comments. I have added two additional findings.

@lsiepel - anything more to add, I see your two comments are already resolved?

@markus7017, please remove the label "additional testing preferred" when verified and ready to be merged.

@markus7017
Copy link
Contributor Author

@jlaur changes pushed

Copy link
Contributor

@jlaur jlaur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@lsiepel lsiepel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Was on the road last couple of days so just had a quick look. See that other comments are made and i have nothing to add.

Edit: Will merge (and backport) once tests confirmed.

@jlaur
Copy link
Contributor

jlaur commented Jul 31, 2024

Ping @markus7017

@markus7017
Copy link
Contributor Author

I'm running the build since several days with my 60 Shellys, looks good. I'll ask for additional testing, just to make sure

@jlaur
Copy link
Contributor

jlaur commented Jul 31, 2024

I'll ask for additional testing, just to make sure

For the avoidance of doubt, do you mean that you are going to ask user(s) to test this, then get back to this PR with confirmation when it has been succesfully tested and is ready to be merged?

Just to reiterate:

Please remove the label "additional testing preferred" when verified and ready to be merged.

on ota_success message.

Signed-off-by: Markus Michels <markus7017@gmail.com>
Signed-off-by: Markus Michels <markus7017@gmail.com>
further events throughout the upgrade process

Signed-off-by: Markus Michels <markus7017@gmail.com>
Signed-off-by: Markus Michels <markus7017@gmail.com>
Signed-off-by: Markus Michels <markus7017@gmail.com>
Signed-off-by: Markus Michels <markus7017@gmail.com>
Signed-off-by: Markus Michels <markus7017@gmail.com>
Signed-off-by: Markus Michels <markus7017@gmail.com>
@openhab-bot
Copy link
Collaborator

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/shelly-binding/56862/4003

jlaur added 2 commits August 1, 2024 12:43
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
@markus7017 markus7017 added community approved and removed additional testing preferred The change works for the pull request author. A test from someone else is preferred though. labels Aug 1, 2024
@markus7017
Copy link
Contributor Author

@jlaur we are good to go

@lsiepel
Copy link
Contributor

lsiepel commented Aug 2, 2024

@jlaur we are good to go

As i’m on holiday, not able to backport now. With the upcoming point release don’t wait for me.

@jlaur jlaur merged commit 8c29b59 into openhab:main Aug 2, 2024
5 checks passed
@jlaur jlaur added this to the 4.3 milestone Aug 2, 2024
jlaur pushed a commit that referenced this pull request Aug 2, 2024
)

* Fixes thing re-init during/after firmware update. API will not be closed
on ota_success message.
* Don't disconnect from device during firmware update, this ensures to get
further events throughout the upgrade process
* suspress COMMUNICATION_ERROR on expected restart after fw upgrade

Signed-off-by: Markus Michels <markus7017@gmail.com>
@jlaur jlaur added the patch A PR that has been cherry-picked to a patch release branch label Aug 2, 2024
digitaldan pushed a commit to digitaldan/openhab-addons that referenced this pull request Aug 29, 2024
…nhab#17163)

* Fixes thing re-init during/after firmware update. API will not be closed
on ota_success message.
* Don't disconnect from device during firmware update, this ensures to get
further events throughout the upgrade process
* suspress COMMUNICATION_ERROR on expected restart after fw upgrade

Signed-off-by: Markus Michels <markus7017@gmail.com>
pgfeller pushed a commit to pgfeller/openhab-addons that referenced this pull request Sep 29, 2024
…nhab#17163)

* Fixes thing re-init during/after firmware update. API will not be closed
on ota_success message.
* Don't disconnect from device during firmware update, this ensures to get
further events throughout the upgrade process
* suspress COMMUNICATION_ERROR on expected restart after fw upgrade

Signed-off-by: Markus Michels <markus7017@gmail.com>
Signed-off-by: Patrik Gfeller <patrik.gfeller@proton.me>
joni1993 pushed a commit to joni1993/openhab-addons that referenced this pull request Oct 15, 2024
…nhab#17163)

* Fixes thing re-init during/after firmware update. API will not be closed
on ota_success message.
* Don't disconnect from device during firmware update, this ensures to get
further events throughout the upgrade process
* suspress COMMUNICATION_ERROR on expected restart after fw upgrade

Signed-off-by: Markus Michels <markus7017@gmail.com>
matchews pushed a commit to matchews/openhab-addons that referenced this pull request Oct 18, 2024
…nhab#17163)

* Fixes thing re-init during/after firmware update. API will not be closed
on ota_success message.
* Don't disconnect from device during firmware update, this ensures to get
further events throughout the upgrade process
* suspress COMMUNICATION_ERROR on expected restart after fw upgrade

Signed-off-by: Markus Michels <markus7017@gmail.com>
cipianpascu pushed a commit to cipianpascu/openhab-addons that referenced this pull request Jan 2, 2025
…nhab#17163)

* Fixes thing re-init during/after firmware update. API will not be closed
on ota_success message.
* Don't disconnect from device during firmware update, this ensures to get
further events throughout the upgrade process
* suspress COMMUNICATION_ERROR on expected restart after fw upgrade

Signed-off-by: Markus Michels <markus7017@gmail.com>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on community approved patch A PR that has been cherry-picked to a patch release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Shelly] Thing /device offline after a power failure
4 participants