-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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] New site, wlan, wiredClient, and poePort. Discovery support #11959
Conversation
This pull request has been mentioned on openHAB Community. There might be relevant details there: |
@Hilbrand - I've just given this a test spin. It seems to reintroduce #7001 which was fixed by #11451. Two options:
I would need to look deeper to understand what happened, but this might give you a clue. For reference: Lines 183 to 190 in cf86044
changed back to: Lines 112 to 117 in 6b33a32
|
@jlaur I did refactor this part, and also thought I handled this case. But didn't realize it keeps track of gone clients. I've updated the cache to not reset the map with references and use it to to get the id. So it should now work again. I've updated the marketplace jar. |
Confirmed, it works again now. |
This change adds the following changes: - 2 new things: a wired client and POE port. - Adds discovery of clients and poePort. - Adds guest channel to client thing. Also included some refactoring and bug fixes. This change includes changes made by Matthew Bowman that he created on his own branch but were never completed. Closes openhab#9609: Implemented async http call, which should fix the buffer overflow. Closes openhab#10375: At least should avoid the stack overflow. Closes openhab#11964: cid will be handled in lower case. Also-by: Matthew Bowman <mgb@otr.mx> Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
@Hilbrand, I've been running this in production since January 5th and have so far discovered no issues. Only tested with access point though and so far only normal operation, i.e. stability and online channel working. |
...ab.binding.unifi/src/main/java/org/openhab/binding/unifi/internal/UniFiBindingConstants.java
Outdated
Show resolved
Hide resolved
...ab.binding.unifi/src/main/java/org/openhab/binding/unifi/internal/UniFiBindingConstants.java
Outdated
Show resolved
Hide resolved
...hab.binding.unifi/src/main/java/org/openhab/binding/unifi/internal/api/cache/UniFiCache.java
Outdated
Show resolved
Hide resolved
...ng.unifi/src/main/java/org/openhab/binding/unifi/internal/handler/UniFiBaseThingHandler.java
Outdated
Show resolved
Hide resolved
...ng.unifi/src/main/java/org/openhab/binding/unifi/internal/handler/UniFiBaseThingHandler.java
Outdated
Show resolved
Hide resolved
....unifi/src/main/java/org/openhab/binding/unifi/internal/handler/UniFiClientThingHandler.java
Outdated
Show resolved
Hide resolved
...ding.unifi/src/main/java/org/openhab/binding/unifi/internal/handler/UniFiPoePortHandler.java
Outdated
Show resolved
Hide resolved
...ding.unifi/src/main/java/org/openhab/binding/unifi/internal/handler/UniFiPoePortHandler.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
It's redundant and only used for logging. Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
I compiled it myself, so probably I made a similar mistake as I'm deploying it to a 3.2 system. For now I added |
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
...ng.unifi/src/main/java/org/openhab/binding/unifi/internal/handler/UniFiWlanThingHandler.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
@Hilbrand - signoff is missing for last commit, can you fix the commit message? How much more work is planned before going out of draft state? If aiming for 3.3, perhaps we should try to get it ready for one of the next milestones? |
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
At this moment I'm not planning additional features to this pr therefor I've removed the draft. So this pr can be reviewed for inclusion. I've updated the description in the pr so it can be used as the message for the squashed merge of this pr (or I can squash this pr when the review is done). I've included the new dutch translation. When this pr is merged and synchronized with crowdin I'll upload the dutch translation to crowdin to make sure it won't get lost when a new sync would be done. |
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.
Thanks for all these improvements! The code looks really good, I have added only a few minor comments.
...nhab.binding.unifi/src/main/java/org/openhab/binding/unifi/internal/api/dto/UniFiClient.java
Outdated
Show resolved
Hide resolved
...b.binding.unifi/src/main/java/org/openhab/binding/unifi/internal/api/dto/UniFiPortTable.java
Outdated
Show resolved
Hide resolved
...b.binding.unifi/src/main/java/org/openhab/binding/unifi/internal/api/dto/UniFiPortTable.java
Outdated
Show resolved
Hide resolved
@Hilbrand - gentle ping. :) Only a few minor comments from my side to consider. |
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
@Hilbrand - thanks, I've resolved the comments addressed by your last commit and left the rest open. |
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
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.
Sorry, last round of proof-reading after last commit.
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
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.
Thanks a lot for these many improvements!
…penhab#11959) * [unifi] New wiredClient and poePort, Discovery support This change adds the following changes: - 2 new things: a wired client and POE port. - Adds discovery of clients and poePort. - Adds guest channel to client thing. Also included some refactoring and bug fixes. This change includes changes made by Matthew Bowman that he created on his own branch but were never completed. Closes openhab#9609: Implemented async http call, which should fix the buffer overflow. Closes openhab#10375: At least should avoid the stack overflow. Closes openhab#11964: cid will be handled in lower case. * Removed type from UniFiCache constructor It's redundant and only used for logging. * Added UniFi Site and wLAN things * Improved default state handling Updated refresh/state update, to also update when no data available. Simplified usage of cache: call cache directly instead of implicit via controller class. Made getDefaultState generic to all things, and simplified passing channelId instead of channelUID to sub methods. * Moved dto objects to dto package. * Added support for client experience * Made fields private No need to have them protected. * Added PoE power-cycle command Also added wireless client as command as this better fits with the openHAB model to handle commands that are only one way and not have a state. * Updated readme * [unifi] Added client/guest count to wlan * Fix QRcode construction and added hidden ssid support in qrcode string Also-by: Matthew Bowman <mgb@otr.mx> Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl> Co-authored-by: Matthew Bowman <mgb@otr.mx>
…penhab#11959) * [unifi] New wiredClient and poePort, Discovery support This change adds the following changes: - 2 new things: a wired client and POE port. - Adds discovery of clients and poePort. - Adds guest channel to client thing. Also included some refactoring and bug fixes. This change includes changes made by Matthew Bowman that he created on his own branch but were never completed. Closes openhab#9609: Implemented async http call, which should fix the buffer overflow. Closes openhab#10375: At least should avoid the stack overflow. Closes openhab#11964: cid will be handled in lower case. * Removed type from UniFiCache constructor It's redundant and only used for logging. * Added UniFi Site and wLAN things * Improved default state handling Updated refresh/state update, to also update when no data available. Simplified usage of cache: call cache directly instead of implicit via controller class. Made getDefaultState generic to all things, and simplified passing channelId instead of channelUID to sub methods. * Moved dto objects to dto package. * Added support for client experience * Made fields private No need to have them protected. * Added PoE power-cycle command Also added wireless client as command as this better fits with the openHAB model to handle commands that are only one way and not have a state. * Updated readme * [unifi] Added client/guest count to wlan * Fix QRcode construction and added hidden ssid support in qrcode string Also-by: Matthew Bowman <mgb@otr.mx> Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl> Co-authored-by: Matthew Bowman <mgb@otr.mx> Signed-off-by: Andras Uhrin <andras.uhrin@gmail.com>
…penhab#11959) * [unifi] New wiredClient and poePort, Discovery support This change adds the following changes: - 2 new things: a wired client and POE port. - Adds discovery of clients and poePort. - Adds guest channel to client thing. Also included some refactoring and bug fixes. This change includes changes made by Matthew Bowman that he created on his own branch but were never completed. Closes openhab#9609: Implemented async http call, which should fix the buffer overflow. Closes openhab#10375: At least should avoid the stack overflow. Closes openhab#11964: cid will be handled in lower case. * Removed type from UniFiCache constructor It's redundant and only used for logging. * Added UniFi Site and wLAN things * Improved default state handling Updated refresh/state update, to also update when no data available. Simplified usage of cache: call cache directly instead of implicit via controller class. Made getDefaultState generic to all things, and simplified passing channelId instead of channelUID to sub methods. * Moved dto objects to dto package. * Added support for client experience * Made fields private No need to have them protected. * Added PoE power-cycle command Also added wireless client as command as this better fits with the openHAB model to handle commands that are only one way and not have a state. * Updated readme * [unifi] Added client/guest count to wlan * Fix QRcode construction and added hidden ssid support in qrcode string Also-by: Matthew Bowman <mgb@otr.mx> Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl> Co-authored-by: Matthew Bowman <mgb@otr.mx>
New features:
This change includes changes made by Matthew Bowman that he created on his own branch but were never completed.
Fixes:
Also-by: Matthew Bowman mgb@otr.mx
Signed-off-by: Hilbrand Bouwkamp hilbrand@h72.nl