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

Add possibility for GroupValueRead at startup #56

Merged
merged 8 commits into from
Aug 25, 2023

Conversation

nomisim
Copy link
Contributor

@nomisim nomisim commented Aug 1, 2023

This adds a go routing that performs the startup read operation. It is inspired by the poller go routine.

The startup read routine sends GroupValueRead telegrams to all group addresses configured with ReadStartup: true (the default is false). By default the GroupValueRead telegrams are sent in a 200ms interval, in order to not everwhelm the bus. The interval can be changed by adopting the ReadStartupInterval: 200ms configuration parameter in the global section of the config file.

If this is acceptable I can also update README.md to have it documented - just let me know.

Resolves #54

@chr-fritz chr-fritz self-requested a review August 2, 2023 16:54
Copy link
Owner

@chr-fritz chr-fritz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First of all, a big thank you for the PR. Apart from the three minor change requests, I have two major ones before I merge the PR:

First, please build suitable tests for the most important parts, Run() and getMetricsToRead(config *Config) GroupAddressConfigSet, from the startupReader and second, add new configuration options to README.md.

pkg/knx/startup-reader.go Outdated Show resolved Hide resolved
pkg/knx/startup-reader.go Outdated Show resolved Hide resolved
pkg/knx/startup-reader.go Outdated Show resolved Hide resolved
@nomisim
Copy link
Contributor Author

nomisim commented Aug 24, 2023

This took a while now, as I was on vacation in between.

However, I managed to update the code today:

  • integrated the fixes you proposed
  • updated the README.md to include new config options
  • addedd tests for Run() and getMetricsToRead(config *Config) GroupAddressConfigSet from the startupReader
  • merged with upstream

Hope this goes into the right direction - let me know what you think.

@nomisim nomisim requested a review from chr-fritz August 24, 2023 20:49
@chr-fritz
Copy link
Owner

chr-fritz commented Aug 25, 2023

No problem, I hope the holiday was relaxing.

Thanks for the feature, I'll merge itl.

However, I won't build a new release just yet, because I still want to implement the new connection options myself (especially TCP tunnels).

@chr-fritz chr-fritz merged commit 1a99b42 into chr-fritz:main Aug 25, 2023
@nomisim
Copy link
Contributor Author

nomisim commented Aug 25, 2023

Thanks, sure no problem. I am looking forward to the TCP feature as well.

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

Successfully merging this pull request may close these issues.

Add possibility for GroupValueRead at startup
2 participants