Fix modbus default delay#33877
Merged
MartinHjelmare merged 4 commits intohome-assistant:devfrom Apr 9, 2020
janiversen:modbus_issue3
Merged
Fix modbus default delay#33877MartinHjelmare merged 4 commits intohome-assistant:devfrom janiversen:modbus_issue3
MartinHjelmare merged 4 commits intohome-assistant:devfrom
janiversen:modbus_issue3
Conversation
CONF_DELAY was used in a serial connection, which is not permitted. Sometimes async_update is called after async_setup is completed, but before event EVENT_HOMEASSISTANT_START is issued, leading to a missing object.
|
Hey there @adamchengtkc, mind taking a look at this pull request as its been labeled with a integration ( |
Do not wait for start event, but activate pymodbus directly in async setup.
Member
|
Should we close #33873 with this PR? |
Member
Author
|
I would prefer to keep the issue open until I have a confirmation from the people that it works, if that is not a problem for you. |
Member
|
Ok. |
balloob
pushed a commit
that referenced
this pull request
Apr 10, 2020
* solve modbus issue #33872 CONF_DELAY was used in a serial connection, which is not permitted. Sometimes async_update is called after async_setup is completed, but before event EVENT_HOMEASSISTANT_START is issued, leading to a missing object. * resolve review comment. Do not wait for start event, but activate pymodbus directly in async setup. * review 2 Remark, this does not work, async_setup hangs. clean start_modbus() from async calls, leaving only the pymodbus setup. * review 2a Moved listen_once back to start_modbus, since it is sync.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Breaking change
Proposed change
CONF_DELAY was used in a serial connection, which is not
permitted.
Sometimes async_update is called after async_setup is completed,
but before event EVENT_HOMEASSISTANT_START is issued, leading to
a missing object. So added a test for missing object.
Type of change
Example entry for
configuration.yaml:# Example configuration.yamlAdditional information
Modbus crashed on 0.108.1 with pakcages #33873
Update modbus text, with warning (relevant for V1.08) home-assistant.io#12762
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: