Skip to content

Add retry on empty modbus messages for serial protocol#34678

Merged
MartinHjelmare merged 1 commit intohome-assistant:devfrom
janiversen:modbuspatch1
May 6, 2020
Merged

Add retry on empty modbus messages for serial protocol#34678
MartinHjelmare merged 1 commit intohome-assistant:devfrom
janiversen:modbuspatch1

Conversation

@janiversen
Copy link
Copy Markdown
Member

@janiversen janiversen commented Apr 25, 2020

Breaking change

Proposed change

Some devices send a 0 byte message for no obvious reason, this causes
a failed transaction. Instead do a retry and see if the device do respond
at all.

Type of change

  • Dependency upgrade
  • [x ] Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example entry for configuration.yaml:

# Example configuration.yaml

Additional information

It might not solve #34541, but at least partial, as well as a number of similar cases.

#14902 and #18128 should be solved with 0.108.8, but this PR makes it more robust.

Checklist

  • [x ] The code change is tested and works locally.
  • [ x] Local tests pass. Your PR cannot be merged unless tests pass
  • [ x] There is no commented out code in this PR.
  • [ x] I have followed the development checklist
  • [ x] The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

Some devices send a 0 byte message for no obvious reason, this causes
a failed transaction. Instead do a retry and see if the device do respond
at all.
@probot-home-assistant
Copy link
Copy Markdown

Hey there @adamchengtkc, mind taking a look at this pull request as its been labeled with a integration (modbus) you are listed as a codeowner for? Thanks!

@MartinHjelmare MartinHjelmare changed the title Modbus: Add retry on empty messages for serial protocol Add retry on empty modbus messages for serial protocol Apr 25, 2020
@janiversen janiversen mentioned this pull request May 6, 2020
20 tasks
@MartinHjelmare MartinHjelmare merged commit 1b3f925 into home-assistant:dev May 6, 2020
@MartinHjelmare
Copy link
Copy Markdown
Member

Patch release?

@janiversen
Copy link
Copy Markdown
Member Author

yes please, but just when there are other reasons to make a patch release.

@janiversen janiversen deleted the modbuspatch1 branch May 6, 2020 12:21
@MartinHjelmare MartinHjelmare added this to the 0.109.5 milestone May 6, 2020
@balloob balloob mentioned this pull request May 7, 2020
@lock lock Bot locked and limited conversation to collaborators May 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.