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

[boschshc] Cache mDNS-based bridge discovery results #16211

Merged
merged 5 commits into from
Jan 15, 2024

Commits on Jan 5, 2024

  1. [boschshc] Cache mDNS-based bridge discovery results

    The bridge discovery participant receives lots of mDNS events.
    Previously, all events that contained IP addresses of potential bridges
    were actively contacted using HTTP requests. On some systems eventually
    the long polling stops due to too many requests.
    
    With this change, we
    * only consider mDNS events where the name property starts with "Bosch
    SHC"
    * cache already discovered bridges so we don't have to contact them over
    and over again
    * make sure that this happens in a thread-safe manner because the mDNS
    events are handled in individual concurrently running threads
    
    Signed-off-by: David Pace <dev@davidpace.de>
    david-pace committed Jan 5, 2024
    Configuration menu
    Copy the full SHA
    12af6a0 View commit details
    Browse the repository at this point in the history
  2. extract constants for HTTP request timeouts, simplify/enhance unit tests

    Signed-off-by: David Pace <dev@davidpace.de>
    david-pace committed Jan 5, 2024
    Configuration menu
    Copy the full SHA
    5a61cbd View commit details
    Browse the repository at this point in the history

Commits on Jan 6, 2024

  1. add mDNS discovery method with name filter to addon.xml

    Signed-off-by: David Pace <dev@davidpace.de>
    david-pace committed Jan 6, 2024
    Configuration menu
    Copy the full SHA
    e736c57 View commit details
    Browse the repository at this point in the history

Commits on Jan 10, 2024

  1. [boschshc] use expiring cache

    * use openHAB cache implementation with 10 minutes timeout
    * set TTL of openHAB discovery results to 10 minutes as well
    * remove obsolete parameter and member
    * enhance Javadocs
    * adapt/enhance unit tests
    
    Signed-off-by: David Pace <dev@davidpace.de>
    david-pace committed Jan 10, 2024
    Configuration menu
    Copy the full SHA
    71e09f3 View commit details
    Browse the repository at this point in the history
  2. rename TTL_MINUTES to TTL_DURATION

    Signed-off-by: David Pace <dev@davidpace.de>
    david-pace committed Jan 10, 2024
    Configuration menu
    Copy the full SHA
    45722a7 View commit details
    Browse the repository at this point in the history