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

Enable discovery to continue if reading a holding register hangs #4

Open
tazle opened this issue May 3, 2024 · 2 comments
Open

Enable discovery to continue if reading a holding register hangs #4

tazle opened this issue May 3, 2024 · 2 comments

Comments

@tazle
Copy link

tazle commented May 3, 2024

Hi,

We are dealing with a device that claims to be Sunpec-compliant, but fails to respond to reads of holding register 0, making it impossible to use the standard discovery process as implemented in the sunspec module.

Some options to resolve the issue:

  1. Time out reads, so the process could proceed from 0 onwards
  2. Enable specifying the starting address for discovery
@bikeshedder
Copy link
Owner

I think I'll add a discovery config struct for those two things:

struct Discovery {
    /// Addresses to check for the SunS identifier (default: [0, 40000, 50000])
    info_model_addrs: Vec<u16>,
    /// Timeout to be applied for every `read_holding_register` call
    read_timeout: Duration,
}

@tazle
Copy link
Author

tazle commented May 4, 2024

This sounds excellent.

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

2 participants