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

[unifi] Add support for new thing type access point #17499

Merged
merged 48 commits into from
Oct 4, 2024

Conversation

DrRSatzteil
Copy link
Contributor

@DrRSatzteil DrRSatzteil commented Oct 3, 2024

[unifi] Add support for new thing type access point

Description

This PR adds a new thing type "accessPoint" to the unifi binding. Right now the binding allows you to disable complete wifi networks which affects all access points that are configured to provide this network. However it is not yet possible to just disable individual access points to disable wifi coverage in certain areas. Also disabling access points will switch off all radio activity of the device and may be used to reduce emissions and save power in in times when no wifi coverage is needed for the area covered by this access point.

Testing

https://openhab.jfrog.io/artifactory/libs-pullrequest-local/org/openhab/addons/bundles/org.openhab.binding.unifi/4.3.0-SNAPSHOT/org.openhab.binding.unifi-4.3.0-SNAPSHOT.jar

@DrRSatzteil DrRSatzteil changed the title Unifi [unifi] Add support for new thing type access point Oct 3, 2024
DrRSatzteil added 27 commits October 3, 2024 17:37
Signed-off-by: DrRSatzteil <thomas_lauterbach@arcor.de>
Signed-off-by: DrRSatzteil <thomas_lauterbach@arcor.de>
Signed-off-by: DrRSatzteil <thomas_lauterbach@arcor.de>
Signed-off-by: DrRSatzteil <thomas_lauterbach@arcor.de>
Signed-off-by: DrRSatzteil <thomas_lauterbach@arcor.de>
Signed-off-by: DrRSatzteil <thomas_lauterbach@arcor.de>
Signed-off-by: DrRSatzteil <thomas_lauterbach@arcor.de>
Signed-off-by: DrRSatzteil <thomas_lauterbach@arcor.de>
Signed-off-by: DrRSatzteil <thomas_lauterbach@arcor.de>
Signed-off-by: DrRSatzteil <thomas_lauterbach@arcor.de>
Signed-off-by: DrRSatzteil <thomas_lauterbach@arcor.de>
Signed-off-by: DrRSatzteil <thomas_lauterbach@arcor.de>
Signed-off-by: DrRSatzteil <thomas_lauterbach@arcor.de>
Signed-off-by: DrRSatzteil <thomas_lauterbach@arcor.de>
Signed-off-by: DrRSatzteil <thomas_lauterbach@arcor.de>
Signed-off-by: DrRSatzteil <thomas_lauterbach@arcor.de>
Signed-off-by: DrRSatzteil <thomas_lauterbach@arcor.de>
Signed-off-by: DrRSatzteil <thomas_lauterbach@arcor.de>
Signed-off-by: DrRSatzteil <thomas_lauterbach@arcor.de>
Signed-off-by: DrRSatzteil <thomas_lauterbach@arcor.de>
Signed-off-by: DrRSatzteil <thomas_lauterbach@arcor.de>
Signed-off-by: DrRSatzteil <thomas_lauterbach@arcor.de>
Signed-off-by: DrRSatzteil <thomas_lauterbach@arcor.de>
Signed-off-by: DrRSatzteil <thomas_lauterbach@arcor.de>
Signed-off-by: DrRSatzteil <thomas_lauterbach@arcor.de>
Signed-off-by: DrRSatzteil <thomas_lauterbach@arcor.de>
Signed-off-by: DrRSatzteil <thomas_lauterbach@arcor.de>
@DrRSatzteil
Copy link
Contributor Author

It might make sense to inverse the "disabled" logic for this binding: it seems counter intuitive to switch an item ON to actually disable the access point...

Signed-off-by: DrRSatzteil <thomas_lauterbach@arcor.de>
@DrRSatzteil
Copy link
Contributor Author

It might make sense to inverse the "disabled" logic for this binding: it seems counter intuitive to switch an item ON to actually disable the access point...

The more I thought about it and used the new things in my setup the more absurd it seemed to me. So I decided to invert the logic for now. Please advise if you think it should be done otherwise...

Copy link
Contributor

@jlaur jlaur 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 this nice addition! The code looks very clean and consistent with the existing binding code.

@Hilbrand and @mgbowman, would you like to have a look as well?

@jlaur jlaur added the enhancement An enhancement or new feature for an existing add-on label Oct 3, 2024
Co-authored-by: Jacob Laursen <jacob-github@vindvejr.dk>
Signed-off-by: Thomas Lauterbach <2452988+DrRSatzteil@users.noreply.github.com>
@DrRSatzteil
Copy link
Contributor Author

Oh and I guess I have to add the site to the thing config just like for the Clients

DrRSatzteil added 4 commits October 4, 2024 08:35
Signed-off-by: DrRSatzteil <thomas_lauterbach@arcor.de>
Signed-off-by: DrRSatzteil <thomas_lauterbach@arcor.de>
Signed-off-by: DrRSatzteil <thomas_lauterbach@arcor.de>
Signed-off-by: DrRSatzteil <thomas_lauterbach@arcor.de>
Copy link
Member

@Hilbrand Hilbrand 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 adding the accessPoint. I've some style related comments.

DrRSatzteil added 2 commits October 4, 2024 09:30
Signed-off-by: DrRSatzteil <thomas_lauterbach@arcor.de>
Signed-off-by: DrRSatzteil <thomas_lauterbach@arcor.de>
@DrRSatzteil DrRSatzteil requested review from jlaur and Hilbrand October 4, 2024 10:36
Copy link
Member

@Hilbrand Hilbrand left a comment

Choose a reason for hiding this comment

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

LGTM. Only need to remove the already done ToDo.

Co-authored-by: Jacob Laursen <jacob-github@vindvejr.dk>
Signed-off-by: Thomas Lauterbach <2452988+DrRSatzteil@users.noreply.github.com>
@DrRSatzteil
Copy link
Contributor Author

Yes that ToDo is done already. I removed the comment.

Copy link
Contributor

@jlaur jlaur left a comment

Choose a reason for hiding this comment

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

Only one minor comment, otherwise LGTM. I have also reopened a previous one regarding the channel id in the README.

Signed-off-by: DrRSatzteil <thomas_lauterbach@arcor.de>
@DrRSatzteil DrRSatzteil requested a review from jlaur October 4, 2024 15:29
Copy link
Contributor

@jlaur jlaur left a comment

Choose a reason for hiding this comment

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

Thanks!

@jlaur jlaur merged commit a11460c into openhab:main Oct 4, 2024
4 of 5 checks passed
@jlaur jlaur added this to the 4.3 milestone Oct 4, 2024
@DrRSatzteil DrRSatzteil deleted the unifi branch October 4, 2024 15:56
@openhab-bot
Copy link
Collaborator

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/ubiquiti-unifi-binding-feature-discussion/14520/1302

joni1993 pushed a commit to joni1993/openhab-addons that referenced this pull request Oct 15, 2024
Signed-off-by: Thomas Lauterbach <thomas_lauterbach@arcor.de>
matchews pushed a commit to matchews/openhab-addons that referenced this pull request Oct 18, 2024
Signed-off-by: Thomas Lauterbach <thomas_lauterbach@arcor.de>
cipianpascu pushed a commit to cipianpascu/openhab-addons that referenced this pull request Jan 2, 2025
Signed-off-by: Thomas Lauterbach <thomas_lauterbach@arcor.de>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature for an existing add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants