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 PoE not working #71017

Closed
grillsoftware opened this issue Apr 28, 2022 · 25 comments · Fixed by #73716
Closed

unifi PoE not working #71017

grillsoftware opened this issue Apr 28, 2022 · 25 comments · Fixed by #73716

Comments

@grillsoftware
Copy link

The problem

Pulled the latest home assistant version and make the integration to a Unifi Controller CLoud Key. The user is local-access and role administrator with all permissions.

I can see PoE switches once the integration is done.

When turning PoE clients on/off I get this response.

2022-04-28 17:48:42 DEBUG (MainThread) [aiounifi.devices] Override port 5 with mode off
2022-04-28 17:48:42 DEBUG (MainThread) [aiounifi.controller] https://10.7.254.30:443/proxy/network/api/s/default/rest/device/619d429784b28907dd89df7e
2022-04-28 17:48:42 DEBUG (MainThread) [aiounifi.controller] 403 application/json <ClientResponse(https://10.7.254.30:443/proxy/network/api/s/default/rest/device/619d429784b28907dd89df7e) [403 Forbidden]>

What version of Home Assistant Core has the issue?

core-2022.4.7

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

unifi controller

Link to integration documentation on our website

https://www.home-assistant.io/integrations/unifi

Diagnostics information

config_entry-unifi-2cfea9d7d7a07a560690b6f774e3a19c.json.txt

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2022-04-28 17:48:42 DEBUG (MainThread) [aiounifi.devices] Override port 5 with mode off
2022-04-28 17:48:42 DEBUG (MainThread) [aiounifi.controller] https://10.7.254.30:443/proxy/network/api/s/default/rest/device/619d429784b28907dd89df7e
2022-04-28 17:48:42 DEBUG (MainThread) [aiounifi.controller] 403 application/json <ClientResponse(https://10.7.254.30:443/proxy/network/api/s/default/rest/device/619d429784b28907dd89df7e) [403 Forbidden]>

Additional information

No response

@probot-home-assistant
Copy link

Hey there @Kane610, mind taking a look at this issue as it has been labeled with an integration (unifi) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)


unifi documentation
unifi source
(message by IssueLinks)

@Kane610
Copy link
Member

Kane610 commented Apr 29, 2022

What version of UniFi controller are you running?
Is it the same message for any port or only for specific ports? What devices are you trying to control?
Has it worked on previous releases?

@daylehouse
Copy link

daylehouse commented May 1, 2022

Same for me too. Any ports with a PoE client fail to enable or disable PoE.

Unifi Version - UniFi OS UCK G2 Plus 2.4.8
Unifi Network - V 7.1.61
Switch Firmware - 6.2.14

Local user account with Administrator permissions used for integration from HA. Controlling a couple of IP phones and Dante devices. Not trying to control Unifi devices (APs etc) as not supported.

@grillsoftware
Copy link
Author

grillsoftware commented May 3, 2022

Current versions:
Unifi Network Controller: 7.1.61
Unifi OS: 2.4.8
Switch PoE firmware: 6.2.14

Connecting to a Cloud Key with Local user and role Administrator.

Trying to turn on/off a port where an Axis Camera is connected. There are other clients that I can't tell what they are (I'm not onsite) that I try to turn on/off but it's also not working.

It used to work in the previous version of the Network Controller

@daylehouse
Copy link

If I configure the port directly on the network switch, the switch entity in HA does reflect if the port has PoE enabled or disabled (on or off state). Looks like the call from HA to Unifi to enable or disable PoE is failing?

@grillsoftware
Copy link
Author

If I configure the port directly on the network switch, the switch entity in HA does reflect if the port has PoE enabled or disabled (on or off state). Looks like the call from HA to Unifi to enable or disable PoE is failing?

Yes, I activated the logs and I can see the request going out and the response coming in. The response to change the port status has the code 403 (Forbidden).

2022-04-28 17:48:42 DEBUG (MainThread) [aiounifi.devices] Override port 5 with mode off
2022-04-28 17:48:42 DEBUG (MainThread) [aiounifi.controller] https://10.7.254.30:443/proxy/network/api/s/default/rest/device/619d429784b28907dd89df7e
2022-04-28 17:48:42 DEBUG (MainThread) [aiounifi.controller] 403 application/json <ClientResponse(https://10.7.254.30:443/proxy/network/api/s/default/rest/device/619d429784b28907dd89df7e) [403 Forbidden]>

@Kane610
Copy link
Member

Kane610 commented May 3, 2022

I don't have any time for the next few days. But will look at this after. Same issue seems to be with block commands. Maybe unifi have changed something

@Kane610
Copy link
Member

Kane610 commented May 10, 2022

Tested and works fine with UniFiOS UDM Pro 1.11.4, UniFi Network 7.1.61

Check that your user has credentials enough to control POE.

@Maxybo
Copy link

Maxybo commented May 10, 2022

To add also, same issue for me PoE control has stopped working.

UDM PRO 2.4.9
Switch fw 6.2.14
Network Controller 7.1.61#

Using account with full access rights.

@Kane610
Copy link
Member

Kane610 commented May 10, 2022

Using account with full access rights.

Super admin? Can you share a screenshot of the user config page of the user?

@Maxybo
Copy link

Maxybo commented May 11, 2022

It's a local admin account created in the Unifi OS (UDMPRO)
This is the account that I have used for a while now without issue, everything else seems to work in terms of tracking, only noticed when the PoE management stopped working.

Screenshot 2022-05-11 115323
Screenshot 2022-05-11 115342
)

@daylehouse
Copy link

daylehouse commented May 12, 2022 via email

@Kane610
Copy link
Member

Kane610 commented May 12, 2022

What happens if you start downgrading your system, do you find a point where it starts working again?

@MidnightLink
Copy link

MidnightLink commented May 13, 2022

+1. Same problem here. See #70356

@iMiMx
Copy link

iMiMx commented May 13, 2022

I think maybe my problem started with the upgrade of the switch to 6.2.14 - pretty sure I was on 6.2.11 previously.

Model
USW-Pro-24-PoE
Firmware Version
6.2.14

I've got a lot of 'stuff' hanging off this switch, so will try and downgrade perhaps early Sunday morning....when the lazy people are all still asleep.

@Kane610
Copy link
Member

Kane610 commented May 13, 2022

will try and downgrade perhaps early Sunday morning

Thanks

@iMiMx
Copy link

iMiMx commented May 21, 2022

6.2.11 did not resolve the problem - but caused a whole heap of other issues during the downgrade. Thanks unifi.

Might be a while before I can test some more downgrades, need to let the general moaning from the family subside a bit!

@Kane610
Copy link
Member

Kane610 commented May 26, 2022

I've started doing some general refactoring of the unifi library. When I'm further along I will also upgrade my switch to the latest firmware and see if that has any effect.

@stephack
Copy link

stephack commented Jun 1, 2022

Chiming in to report similar issues.
I have a UDM-SE with 24POE-Enterprise switch. I'm not sure when it stopped working because the unifi integration was on a VM on a server that I had shutdown for a month. Once I spun it back up, my poe control and Mac based blocking stopped working. Both switch and UDM are on the latest production firmware.
Hopefully we get this sorted soon as I use this to limit access to devices for my kids based on a schedule.

@github-actions
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Jun 15, 2022
@stephack
Copy link

stephack commented Jun 15, 2022

Unfortunately I'm still seeing this with the latest update 2022.6.6
To reiterate my issue... I'm no longer able to control devices via POE or via simple mac blocking.
The entity in HA simply toggles itself back on and nothing changes. The devices remain on and able to communicate on the network.

Other seem to be posting similar issues in the forums but are not posting their issue via github.

@github-actions github-actions bot removed the stale label Jun 15, 2022
@Maxybo
Copy link

Maxybo commented Jun 15, 2022

Can confirm the issue is still present with the latest stable release also.

@MidnightLink
Copy link

+1. Problem persisting

@tsspmq
Copy link

tsspmq commented Jun 15, 2022

I think the guy working on issue 73071 has figured out why this is happening but not how to fix just yet.

@MidnightLink
Copy link

Opening this back up. The fix DOES fix it temporarily but it seems after some time (an hour I believe? Not 100% sure) it loses authorization. The only fix is to delete and set back up the integration but it happens again.

New message that I'm receiving.
Screenshot 2022-06-22 221809

@github-actions github-actions bot locked and limited conversation to collaborators Jul 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants