Kane610 / aiounifi

Asynchronous library to communicate with Unifi Controller
MIT License
59 stars 51 forks source link

Unifi Network 8.0.7 breaks PoE port status #523

Closed cdalessio closed 8 months ago

cdalessio commented 9 months ago

Looks like Unifi Network 8.0.7 (currently EA) breaks PoE Port status and control. It was still working on 8.0.6. Observations:

Kane610 commented 9 months ago

Have you checked the debug logs of the integration to see what is reported from unifi?

cdalessio commented 9 months ago

Test setup: USW-24-POE switch

Initial observation: Home Assistant (HA) UI shows POE status as on for all ports, including port 16.

Toggle POE mode on the port 12 port via switch set up on HA dashboard Check port status directly in Unifi controller Expected result:

Observed result:

This triggers a single put command, which sends poe_mode: auto for 15 of the 16 ports on this switch which support it; it sends poe_mode: off for port 12 (the one I am trying to toggle off) - I am assuming that the JSON blob logged is the data sent.

This results in a 200 response code and the subsequent log showing the following (I'm not totally sure how to read all of this) and the HA interface back to showing all ports as on Looking in port_table response data:

Looking in port_overrides response data:

cdalessio commented 9 months ago

This may have been a very bizarre fluke; will have to keep an eye on things as I went through quite a few steps to verify the behavior was consistent before raising the issue including restarting HA, trying different browsers, and rebooting the computer I was using. This morning everything appears to be working exactly as it should. The only thing which changed yesterday was grouping two port-off automations into one (previously 10 min apart) and that particular automation running on schedule. Nothing changed when I manually tested the relevant automations earlier in the day, so this seems to be a "nothing changed" scenario; no updates to any Unifi firmware versions, no (intentional) reboots of any hardware, no updates to anything in HA. I don't see any logs indicating any of the Unifi hardware restarted on its own (some of the newer EA switch firmware seems to be doing that; I'm not using those versions currently). I do have the full debug logs saved I excerpted above. I did not ever see any debug logs loading the initial state.

Kane610 commented 9 months ago

A couple of months back another thing changed on unifi in what it reported regarding port configuration on a newly added device. The workaround then was to make sure to toggle poe state yourself via unifi interface and then the integration would work. Maybe something similar? As you're trusting stuff you affect the system making it work. I guess we'll see once more upgrade to the new release

Kane610 commented 8 months ago

closing this as no more issues have been reported.