Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Service to suggest addons via generic IP scan #3920
Service to suggest addons via generic IP scan #3920
Changes from 3 commits
83c97ae
6e4f471
ded7540
7f94a12
99bdd55
e4b5a9b
16b7032
73dc742
acd6195
cfcbb79
179132e
468e01b
5deb85b
73b166f
fc38fdb
933c9e6
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I would expect an @activate method as well and a regular (scheduled) poll. Remember this should be not just for KNX. The whole finder can be switched off. If it is not switched off, it should poll for all defined ip broadcast finders on a schedule.
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.
This should also be addressed in a 4.2 PR. I understand the code to only do a scan on start of the finder or added AddonInfo. I would expect a regular scan. I think this is fine now, but I would like to see it improved in the future.
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.
I don't think this can be generalized. Can't you read the buffer, convert to String and do a regex on it?
We could leave this improvement for later when we make more add-ons discoverable through this finder. But it should be improved.
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.
yes, in principle....
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.
The long answer to this is.....
Yes of course we can hex dump the received frame and do a regex match. Maybe the regex needs to be dynamic (using $srcIp etc before doing the match).
I would need to change the receive loop, as just taking the first frame and return is no longer possible. I.e. a receive loop, which takes care for the overall timeout and then checking every frame within the time period.
Not sure if this is required for the first implementation, I would probably leave a shortcut for ".*" in anyway as it avoids the regex matching etc.
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.
I am OK to improve this for 4.2. I hope you will do some work to look at all bindings that use this type of discovery and try to cover more of these. Start by defining criteria, and then see where this core matching needs to ba adapted.