-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Conversation
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.
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
.
Co-authored-by: Christian Fritz <chr-fritz@users.noreply.github.com>
This took a while now, as I was on vacation in between. However, I managed to update the code today:
Hope this goes into the right direction - let me know what you think. |
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). |
Thanks, sure no problem. I am looking forward to the TCP feature as well. |
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 theReadStartupInterval: 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