Skip to content
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

Latest nightly - Modbus TCP - Gaps in Reading #277

Closed
isarrider opened this issue Sep 3, 2022 · 10 comments
Closed

Latest nightly - Modbus TCP - Gaps in Reading #277

isarrider opened this issue Sep 3, 2022 · 10 comments

Comments

@isarrider
Copy link
Contributor

isarrider commented Sep 3, 2022

Hi,

compared to the build I made on June 11 (with the current master branch then),
the latest nightly has gaps (like every 7s one reading) in reading for me...
See picture attached - revert to the nightly before the commit in the ~last 20%...
Clipboard01

The commit afterwards - thought it is only related to Modbus RTU?

BR,
Alex

@andig
Copy link
Contributor

andig commented Sep 3, 2022

Can you bisect to the breaking commit?

@isarrider
Copy link
Contributor Author

basically already did, as only one commit is after
(the other only changes the systemd requirements for startup)

@andig
Copy link
Contributor

andig commented Sep 3, 2022

Which commit?

@isarrider
Copy link
Contributor Author

isarrider commented Sep 3, 2022

if its no other ting, must be #265

@andig
Copy link
Contributor

andig commented Sep 3, 2022

That will add timeout for TCP, too: https://github.com/volkszaehler/mbmd/pull/265/files#diff-30e0f5e75378b29cffb17ecc20d5fe46e5fbf95b4952a60cb55cba0ade588e37R92. Can you try if increasing the timeout fixes your problem?

@isarrider
Copy link
Contributor Author

was afraid of that
(whats the default timeout in contrast to before the commit?)
Ill figure out how to add this in the config file and post the result here...

@isarrider
Copy link
Contributor Author

couldnt figure out until now where the timeout can be specified in the config.yaml
(https://github.com/volkszaehler/mbmd/blob/master/mbmd.dist.yaml)
Ill try to use an edited source file with:

const DefaultTimeout = 900 * time.Millisecond

in commons.go

@tobima
Copy link
Contributor

tobima commented Sep 6, 2022

The default should be unchanged and still be 300ms.

You could use the cmdline parameter --timeout to change the timeout. E,g. '--timeout 600ms' to change the timeout to 600ms.
The format for the duration is documented here: https://pkg.go.dev/time#ParseDuration

I haven't invest any time so far to understand how the config file.

@isarrider
Copy link
Contributor Author

ok, it seems with the 900ms, the timeout doenst occur for me anymore,
I get measurements now every second... (latest nightly b2590ae (compiled with go1.19))
Maybe the timeout should be by default higher than 300ms?

@isarrider
Copy link
Contributor Author

closing it here...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants