Closed tobima closed 2 years ago
Thank you for the PR. Could you please make the timeout
a time.Duration
instead of an int
?
Thank you for the PR. Could you please make the
timeout
atime.Duration
instead of anint
?
Good idea. I already commited these change.
Thought about this some more:
...Option
als variadic parameter. Or (probably preferred) NewRTU
already has a Timeout
function- why not call that after creating the connection?Good catch. I didn't realize that there was already a Timeout
function for RTU
and TCP
.
It should look better now.
I realized that the shorthand parameter -t
conflits with the -t, --type string Register type to write: holding|coil (default "holding")
of the mbmd write
command.
Should the shorthand paramter be removed for the timeout parameter as the other one already exists or could the shorthand parameter for the write command be renamed or removed as this is only an experimental feature at the moment?
Thank you, nice PR!
maybe related to #277
we should note here, that it is not only RTU, but TCP too! also we should update the https://github.com/volkszaehler/mbmd/blob/master/mbmd.dist.yaml
I run into the issue mentioned in pull request #258 with an ORNO 3 phase meter. These changes add a command line parameter
-t timeout
to change to default timeout for Modbus RTU operations.fix https://github.com/volkszaehler/mbmd/issues/266