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

Fix WDT reset during dallas search algorithm #3293

Merged
merged 2 commits into from Mar 16, 2022

Conversation

wysiwyng
Copy link
Contributor

What does this implement/fix?

Fixes a WDT reset bootloop caused by the dallas sensor search algorithm never terminating for certain combinations of found sensor IDs. This fix was implemented by cross-checking against Paul Stoffregen's OneWire Arduino library.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other

Related issue or feature (if applicable): fixes esphome/issues#3107

Test Environment

  • ESP32
  • ESP32 IDF
  • ESP8266

Checklist:

  • The code change is tested and works locally.
  • Tests have been added to verify that the new code works (under tests/ folder).

@OttoWinter
Copy link
Member

Something must be wrong with the family variable (or it's intentionally not used). I can't find any place it's value is read from. We should figure out why it's there in the first place.

@wysiwyng
Copy link
Contributor Author

Looking at Maxim's documentation for onewire search at https://www.maximintegrated.com/en/design/technical-documents/app-notes/1/187.html, it seems that LastFamilyDiscrepancy is only used for "advanced" search modes, in this case skipping entire device families during discovery.

@OttoWinter
Copy link
Member

Thanks! In that case we should just remove the member variable and its assignments

Copy link
Member

@jesserockz jesserockz left a comment

Choose a reason for hiding this comment

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

Should have read above comments first...haha

@AlexValery13
Copy link

My project stopped because I found this issue:
esphome/issues#3107

How I can testing patch?

Copy link
Member

@OttoWinter OttoWinter left a comment

Choose a reason for hiding this comment

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

Thanks, @wysiwyng !

ESPHome Dev automation moved this from Needs Review to Reviewer Approved Mar 16, 2022
@OttoWinter OttoWinter merged commit e621b93 into esphome:dev Mar 16, 2022
ESPHome Dev automation moved this from Reviewer Approved to Done Mar 16, 2022
@OttoWinter OttoWinter added this to the 2022.3.1 milestone Mar 16, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Mar 18, 2022
ESPHome Dev automation moved this from Done to Reviewer Approved Sep 23, 2023
ESPHome Dev automation moved this from Reviewer Approved to Done Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Development

Successfully merging this pull request may close these issues.

ESPHome won't boot and goes into safe mode when using some DS18*20 sensors.
4 participants