-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[modbus] fix defaults for tcp and serial things and some other minor cleanup #10147
Merged
Conversation
This file contains 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
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
RTU is pretty much the only one used in the field. Previous default was ascii implicitly. Signed-off-by: Sami Salonen <ssalonen@gmail.com>
ssalonen
changed the title
[modbus] More strict nullness. Remove apache.commons.lang from itests
[modbus] fix defaults for endpoints and other fixes
Feb 14, 2021
Fyi @Rossko57 on the incorrect defaults |
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
ssalonen
changed the title
[modbus] fix defaults for endpoints and other fixes
[modbus] fix defaults for tcp and serial things and some other minor fixes
Feb 14, 2021
ssalonen
changed the title
[modbus] fix defaults for tcp and serial things and some other minor fixes
[modbus] fix defaults for tcp and serial things and some other minor cleanup
Feb 14, 2021
Regression test added in fbdeb73 I can confirm that the test indeed fails with the
result:
|
Hilbrand
added
the
enhancement
An enhancement or new feature for an existing add-on
label
Feb 17, 2021
Hilbrand
approved these changes
Feb 17, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
K4ntir4n
pushed a commit
to K4ntir4n/openhab-addons
that referenced
this pull request
Feb 17, 2021
…cleanup (openhab#10147) * [modbus] More strict nullness. Remove apache.commons.lang from itests * [modbus] Defaults for tcp and serial things according to docs * [modbus] further explicit defaults * [modbus] document default encoding for serial. RTU is pretty much the only one used in the field. Previous default was ascii implicitly. * [modbus] verify defaults are used for undefined configuration parameters Signed-off-by: Sami Salonen <ssalonen@gmail.com>
themillhousegroup
pushed a commit
to themillhousegroup/openhab2-addons
that referenced
this pull request
May 10, 2021
…cleanup (openhab#10147) * [modbus] More strict nullness. Remove apache.commons.lang from itests * [modbus] Defaults for tcp and serial things according to docs * [modbus] further explicit defaults * [modbus] document default encoding for serial. RTU is pretty much the only one used in the field. Previous default was ascii implicitly. * [modbus] verify defaults are used for undefined configuration parameters Signed-off-by: Sami Salonen <ssalonen@gmail.com> Signed-off-by: John Marshall <john.marshall.au@gmail.com>
thinkingstone
pushed a commit
to thinkingstone/openhab-addons
that referenced
this pull request
Nov 7, 2021
…cleanup (openhab#10147) * [modbus] More strict nullness. Remove apache.commons.lang from itests * [modbus] Defaults for tcp and serial things according to docs * [modbus] further explicit defaults * [modbus] document default encoding for serial. RTU is pretty much the only one used in the field. Previous default was ascii implicitly. * [modbus] verify defaults are used for undefined configuration parameters Signed-off-by: Sami Salonen <ssalonen@gmail.com>
marcfischerboschio
pushed a commit
to bosch-io/openhab-addons
that referenced
this pull request
May 5, 2022
…cleanup (openhab#10147) * [modbus] More strict nullness. Remove apache.commons.lang from itests * [modbus] Defaults for tcp and serial things according to docs * [modbus] further explicit defaults * [modbus] document default encoding for serial. RTU is pretty much the only one used in the field. Previous default was ascii implicitly. * [modbus] verify defaults are used for undefined configuration parameters Signed-off-by: Sami Salonen <ssalonen@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Small improvements and fixes:
AbstractModbusEndpointThingHandler
poolConfiguration
is never null in practice with properly configuredtcp
/serial
endpoints. Therefore marking with@NonNullByDefault({})
More significant finding:
tcp
andserial
configurations. Presumably wrong values were used if one did not explicitly specify the values, e.g. slave id of zero was used instead of 1, or default delay of zero was used between transactions (timeBetweenTransactionsMillis
) instead something more robustSigned-off-by: Sami Salonen ssalonen@gmail.com