Fix modbus transaction response#33824
Fix modbus transaction response#33824balloob merged 1 commit intohome-assistant:devfrom janiversen:modbus_patch_issue1
Conversation
|
Hey there @adamchengtkc, mind taking a look at this pull request as its been labeled with a integration ( |
Sometimes a modbus server do not respond to a transaction, this is a contradiction to the modbus protocol specification, but merely a matter of fact. Use asynio.await_for() to provoke a timeout, and close the transaction.
|
@MartinHjelmare changed according to your suggestion (and tested). I updated the commit (look for _read and _write). @balloob you approved the PR earlier, so just informing you that the content have changed slightly. |
MartinHjelmare
left a comment
There was a problem hiding this comment.
Thanks!
For the future, please don't squash commits after review has started to make it easier for readers to track changes. We'll squash when merging.
|
hmmm: |
|
No, that's not you. Sorry. It's fixed on dev now. It would be good to rebase this PR on dev again to make sure nothing else is wonky. |
|
I'll merge it, I want to tag the beta :) |
Sometimes a modbus server do not respond to a transaction, this is a contradiction to the modbus protocol specification, but merely a matter of fact. Use asynio.await_for() to provoke a timeout, and close the transaction.
|
This or the other change to modbus seems to have broken something related to my modbus setup. I don't have a good enough understanding of either modbus protocol or the change that is implemented in these PR. See mine https://community.home-assistant.io/t/0-108-logos-area-pages-lovelace-entity-card-lovelace-map-history/184891/309?u=jolo and also this report: https://community.home-assistant.io/t/0-108-logos-area-pages-lovelace-entity-card-lovelace-map-history/184891/68 |
|
Please open an issue if you suspect a bug. Merged PRs should not be used for support or bug reports. Thanks! |
Breaking change
Proposed change
Sometimes a modbus server do not respond to a transaction,
this is a contradiction to the modbus protocol specification,
but merely a matter of fact.
This patch implements a timeout (as configured in the modbus: platform or default 3sec),
which cancels the transaction and sets unavailable (next scan cycle, will hopefully get a value).
Type of change
Example entry for
configuration.yaml:# Example configuration.yamlAdditional information
fixes: Modbus broken in 0.108b #33754
Checklist
black --fast homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all..coveragerc.The integration reached or maintains the following Integration Quality Scale: