Open pizzalorddex opened 5 months ago
I was only able to test using my current setup a self-hosted UniFi controller (running on RaspberryOS) and U7 Pro WAPs. The refactored code should still work for the older/other API and its endpoints, but it is not tested. This solves the bug I raised a few days ago.
Based on other feedback from other Homebridge plugins and from my testing a session management class was implemented to prevent the API calls from working only for a short time before the cookies/token gets refreshed and is no longer valid for making calls.
In my environment this plugin has now been running for 2 days with no issues observed.
Great to see so much progress on this. Looking forward to its release!
Thank you so much for the work here @pizzalorddex—I just moved across the states to California so I haven't had a chance to take a look at this, but I hope to approve and merge soon!
Very nice!!
I have recently been working together with daywalkeraut to hopefully support setting the LEDs of the UDR. I wasn't able to test my code before with the UniFi hosted endpoints and discovered that my changes didn't 100% cover for that. The main problem was authentication, among others.
I have since fixed that in my repo, but am still working on support for UDRs (and hopefully as a side effect UDMs).
I have also changed a number of things in my repo, so definitely please check over everything.
I am really new to this all still, APIs, GitHub, NPM, even coding, etc etc etc. So I hope the changes in my repo will be helpful and follow some good practices. I am sure I am also doing some strange stuff, so please let me know what I can improve!
Overview: This pull request introduces significant improvements to the homebridge-unifi-wap-light plugin. The updates include a comprehensive refactor of the codebase, the integration of a session manager to handle API sessions more robustly, and extended support for both UniFi hosted and self-hosted UniFi Controller API endpoints.
Changes:
Testing: