[nextion] Adds a command pacer with command_spacing
attribute
#4499
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.
Description:
This introduces a "pacer" for the communication with the Nextion display, with the main objective to reduce the chances of a buffer overflow on Nextion side.
The buffer overflow can be quite critical, as it removes it's queue, while the component on ESPHome keeps waiting for responses for those removed commands, so a way to control the communication pace and give to users a chance to reduce the chances of a buffer overflow by compromising (a bit?) the performance which many times wouldn't be perceived by end users.
As default I'm setting the pace to 0ms, to keep this transparent to existing installation, although I would highly recommend the use of at least 10ms. Anyhow, users can increase this dynamically, if a buffer overflow happens.
Related issue (if applicable): N/A
Pull request in esphome with YAML changes (if applicable): esphome/esphome#7948
Checklist:
I am merging into
next
because this is new documentation that has a matching pull-request in esphome as linked above.or
I am merging into
current
because this is a fix, change and/or adjustment in the current documentation and is not for a new component or feature.Link added in
/index.rst
when creating new documents for new components or cookbook.