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

feat(inputs.huebridge): Make inputs.huebridge an internal plugin #16352

Open
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

hdecarne
Copy link
Contributor

@hdecarne hdecarne commented Dec 28, 2024

Summary

This PR provides the inputs.huebridge plugin for collecting Smart Home statistics.
It gathers status from Hue Bridge devices using the device's CLIP API.
I previously contributed this plugin as an external one. As part of the latest reworks I also converted it into an internal one.

Checklist

  • No AI generated code was used in this PR

Related issues

resolves #16351

@telegraf-tiger telegraf-tiger bot added feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels Dec 28, 2024
Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

Thanks @hdecarne for your contribution and sorry for this taking so long! I do have a very first comments in the code.

Additionally, I suggest splitting the code into some more files to make the plugin code more readable. How about defining a bridge type for handling all the discovery stuff, resource gathering and actual data gathering and keep the plugin code to manage the calls to the different bridges? The new type could then more to an own file for readability...

plugins/inputs/huebridge/README.md Outdated Show resolved Hide resolved
plugins/inputs/huebridge/README.md Outdated Show resolved Hide resolved
plugins/inputs/huebridge/README.md Outdated Show resolved Hide resolved
plugins/inputs/huebridge/README.md Outdated Show resolved Hide resolved
plugins/inputs/huebridge/README.md Outdated Show resolved Hide resolved
plugins/inputs/huebridge/huebridge.go Outdated Show resolved Hide resolved
plugins/inputs/huebridge/huebridge.go Outdated Show resolved Hide resolved
plugins/inputs/huebridge/huebridge.go Outdated Show resolved Hide resolved
plugins/inputs/huebridge/huebridge.go Outdated Show resolved Hide resolved
plugins/inputs/huebridge/huebridge.go Outdated Show resolved Hide resolved
@srebhan srebhan self-assigned this Jan 24, 2025
Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

Thanks for the update @hdecarne! Here are some more comments on the structure...

plugins/inputs/huebridge/sample.conf Outdated Show resolved Hide resolved
plugins/inputs/huebridge/README.md Outdated Show resolved Hide resolved
plugins/inputs/huebridge/README.md Outdated Show resolved Hide resolved
plugins/inputs/huebridge/bridgemetadata.go Outdated Show resolved Hide resolved
plugins/inputs/huebridge/bridgemetadata.go Outdated Show resolved Hide resolved
plugins/inputs/huebridge/huebridge.go Outdated Show resolved Hide resolved
plugins/inputs/huebridge/huebridge.go Outdated Show resolved Hide resolved
plugins/inputs/huebridge/huebridge.go Outdated Show resolved Hide resolved
plugins/inputs/huebridge/huebridge.go Outdated Show resolved Hide resolved
plugins/inputs/huebridge/huebridge.go Outdated Show resolved Hide resolved
Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

@hdecarne we are getting closer... Some more comments...

plugins/inputs/huebridge/huebridge.go Outdated Show resolved Hide resolved
plugins/inputs/huebridge/bridgeresolver.go Outdated Show resolved Hide resolved
plugins/inputs/huebridge/bridgeresolver.go Outdated Show resolved Hide resolved
plugins/inputs/huebridge/huebridge.go Outdated Show resolved Hide resolved
plugins/inputs/huebridge/huebridge.go Outdated Show resolved Hide resolved
plugins/inputs/huebridge/huebridge_test.go Outdated Show resolved Hide resolved
plugins/inputs/huebridge/huebridge_test.go Outdated Show resolved Hide resolved
plugins/inputs/huebridge/huebridge_test.go Outdated Show resolved Hide resolved
plugins/inputs/huebridge/huebridge_test.go Outdated Show resolved Hide resolved
plugins/inputs/huebridge/huebridge_test.go Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Convert external plugin inputs.huebridge into an internal one
2 participants