home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.91k stars 30.98k forks source link

Unifi: Unable to switch PoE to passthrough #91911

Closed pb1dft closed 1 year ago

pb1dft commented 1 year ago

The problem

The Unifi Network integration has the abillity to disable and enable PoE on an interface.

The UCS8 has the option off or passthrough.

The plugin is sending off and auto.

What version of Home Assistant Core has the issue?

core-2023.4.6

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

unifi

Link to integration documentation on our website

https://www.home-assistant.io/integrations/unifi#understanding-unifi-naming-unifi-network-application-is-the-unifi-controller

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 1 year ago

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!

Code owner commands Code owners of `unifi` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign unifi` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


unifi documentation unifi source (message by IssueLinks)

Kane610 commented 1 year ago

Do you have any logs to share?

pb1dft commented 1 year ago

Correct setting for https://ip:8443/api/s/site_id/stat/device/mac_address

Passthrough: {"port_idx":8,"portconf_id":"5b5883c893949715cacd46e2","name":"Port 8","poe_mode":"passthrough","port_security_mac_address":[]}

Off: {"port_idx":8,"portconf_id":"5b5883c893949715cacd46e2","name":"Port 8","poe_mode":"off","port_security_mac_address":[]}

Diag for port 8: { "port_idx": 8, "media": "GE", "port_poe": true"poe_caps": 1, "speed_caps": 1048623, "op_mode": "switch", "portconf_id": "5b5883c893949715cacd46e2", "poe_mode": "auto", "name": "Port 8", "enable": true, "masked": false, "aggregated_by": false }

Kane610 commented 1 year ago

What version of unifi controller are you running? I'm running 7.3.83

Is it correct that poe_caps == 1 for that port?

Looking at my own US8 it has caps == 8

pb1dft commented 1 year ago

Unifi version 7.3.76

I have the switch version with 1 poe-in & 1 poe-out interface. where the poe-out == passthrough.

Regards

-----Original Message----- From: Robert Svensson @.> Reply-To: home-assistant/core @.> To: home-assistant/core @.> Cc: pb1dft @.>, Author @.***> Subject: Re: [home-assistant/core] Unifi: Unable to switch PoE to passthrough (Issue #91911) Date: 04/24/2023 07:15:43 PM

What version of unifi controller are you running? Is it correct that poe_caps == 1 for that port? Looking at my own US8 it has caps == 8 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Kane610 commented 1 year ago

Same device as I have. Can you upgrade your controller to 7.3.83 and see what caps you get after that?

pb1dft commented 1 year ago

{"port_idx":8,"media":"GE","port_poe":true,"poe_caps":8,"speed_caps":1048623,"op_mode":"switch","portconf_id":"5b5883c89 3949715cacd46e2","poe_mode":"auto","autoneg":true,"dot1x_mode":"unknown","dot1x_status":"disabled","enable":true,"flowct rl_rx":false,"flowctrl_tx":false,"full_duplex":false,"is_uplink":false,"jumbo":false,"mac_table":[],"poe_enable":false," poe_voltage":"48.00","rx_broadcast":223,"rx_bytes":49773468352,"rx_dropped":0,"rx_errors":2,"rx_multicast":56,"rx_packet s":47664778,"satisfaction":85,"satisfaction_reason":2,"speed":0,"stp_pathcost":0,"stp_state":"disabled","tx_broadcast":2 294720,"tx_bytes":2844910590,"tx_dropped":0,"tx_errors":0,"tx_multicast":1462291,"tx_packets":37343746,"up":false,"tx_by tes-r":0,"rx_bytes-r":0,"bytes-r":0,"name":"Port 8","port_security_mac_address":[],"masked":false,"aggregated_by":false}

Indeed is says poe_caps:8 now but stil setting the value to auto instead of passthrough

Regards

-----Original Message----- From: Robert Svensson @.> Reply-To: home-assistant/core @.> To: home-assistant/core @.> Cc: pb1dft @.>, Author @.***> Subject: Re: [home-assistant/core] Unifi: Unable to switch PoE to passthrough (Issue #91911) Date: 04/24/2023 08:44:29 PM

Same device as I have. Can you upgrade your controller to 7.3.83 and see what caps you get after that? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Kane610 commented 1 year ago

Great if it's also 8

We could probably assume that if poe caps is 8 it supports passthrough

pb1dft commented 1 year ago

I guess so. I can power on a different type of switch to see what that says.

Regards

-----Original Message----- From: Robert Svensson @.> Reply-To: home-assistant/core @.> To: home-assistant/core @.> Cc: pb1dft @.>, Author @.***> Subject: Re: [home-assistant/core] Unifi: Unable to switch PoE to passthrough (Issue #91911) Date: 04/25/2023 07:37:22 PM

Great if it's also 8 We could probably assume that if poe caps is 8 it supports passthrough — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Kane610 commented 1 year ago

I guess so. I can power on a different type of switch to see what that says. Regards

I did a small mapping the other day, you can compare with what you get and see if its the same and if something is ,missing

https://github.com/Kane610/aiounifi/issues/364