Unifi Switches POE control

I have a wall tablet charging via POE through my unifi switch. Since there’s no client I assume I won’t be able to control it until you make the update to support infra? Any ETA? Thanks for this component, I use it for device tracking already and it works great.

That would show up as a client. It might be that it doesn’t show properly in unifi data that it uses poe. I’ve heard some of the poe-to-usb are invisible to unifi

Are you sure? I don’t even see it in the client list in Unifi itself. I was assuming because it’s supply power only and there is no IP/mac assigned to anything. To clarify, I’m using a POE to micro usb adapter for the tablet.

The only way to know for certain is to look in the logs

The unifi home assistant logs? I assume that would mean to enable some of these debugging options: https://www.home-assistant.io/integrations/unifi/#debugging-integration?

1 Like

Precisely :+1:

Pulled below from the logs. Any ideas or any other logs that would help?

     {'aggregated_by': False,
                  'autoneg': True,
                  'bytes-r': 0,
                  'dot1x_mode': 'unknown',
                  'dot1x_status': 'disabled',
                  'enable': True,
                  'flowctrl_rx': False,
                  'flowctrl_tx': False,
                  'full_duplex': False,
                  'is_uplink': False,
                  'jumbo': False,
                  'lldp_table': [],
                  'masked': False,
                  'media': 'GE',
                  'name': 'Kitchen Tablet',
                  'op_mode': 'switch',
                  'poe_caps': 7,
                  'poe_class': 'Class 4',
                  'poe_current': '59.44',
                  'poe_enable': True,
                  'poe_good': True,
                  'poe_mode': 'auto',
                  'poe_power': '3.15',
                  'poe_voltage': '52.95',
                  'port_idx': 16,
                  'port_poe': True,
                  'portconf_id': '5c85c216e4b0d8a3872ea258',
                  'rx_broadcast': 0,
                  'rx_bytes': 0,
                  'rx_bytes-r': 0,
                  'rx_dropped': 0,
                  'rx_errors': 0,
                  'rx_multicast': 0,
                  'rx_packets': 0,
                  'satisfaction': 100,
                  'speed': 0,
                  'speed_caps': 1048623,
                  'stp_pathcost': 0,
                  'stp_state': 'disabled',
                  'tx_broadcast': 0,
                  'tx_bytes': 0,
                  'tx_bytes-r': 0,
                  'tx_dropped': 0,
                  'tx_errors': 0,
                  'tx_multicast': 0,
                  'tx_packets': 0,
                  'up': False},

Another reference to it:

  {'name': 'Kitchen Tablet',
                      'poe_mode': 'auto',
                      'port_idx': 16,
                      'portconf_id': '5c85c216e4b0d8a3872ea258'},

Any thoughts?

Does anyone know when poe control for Unifi cameras will appear?

I bought a bunch of Unifi cameras, hoping to control them through a poe, and now I don’t know what to do :slightly_frowning_face:

The poe control is if you use a UniFi switch with POE and then connects a POE device to it

Yes, I already have a Unify POE switch, but I can’t control it with my 3G cameras, using it.
Switch in Home Assistant does not work.

Maybe you only use a viewer account with HASS?

no, I use my admin account.
I have this error:

'port_overrides'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 133, in handle_call_service
    connection.context(msg),
  File "/usr/src/homeassistant/homeassistant/core.py", line 1236, in async_call
    await asyncio.shield(self._execute_service(handler, service_call))
  File "/usr/src/homeassistant/homeassistant/core.py", line 1261, in _execute_service
    await handler.func(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
    self._platforms.values(), func, call, service_name, required_features
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 348, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 370, in _handle_service_platform_call
    await getattr(entity, func)(**data)
  File "/usr/src/homeassistant/homeassistant/components/unifi/switch.py", line 228, in async_turn_off
    await self.device.async_set_port_poe_mode(self.client.sw_port, "off")
  File "/usr/local/lib/python3.7/site-packages/aiounifi/devices.py", line 116, in async_set_port_poe_mode
    for port_override in self.port_overrides:
  File "/usr/local/lib/python3.7/site-packages/aiounifi/devices.py", line 85, in port_overrides
    return self.raw['port_overrides']
KeyError: 'port_overrides'

Can you share the log detailing the switch state from when UniFi integration gets started?

Any progress with the infrastructure devices? I search for a way to disable and enable my access points in a easy way. (with HA i could add it to my HomeKit for example) I would love to see this working! But great work so far :smiley:

At the moment i can only find some PHP solutions for toggling the Switch Port Profile (port-profile override).

Maybe there is a way to configure ports as entity manually? Normally you don’t change the port from your access point.

Bumping this thread to see if anyone has found a way to disable Poe for access points on a schedule. Thanks

Are you not getting a POE switch for your access point?

If you have the switch, you can easily setup an automation based on a schedule.

Second this question but for POE IP Cameras.
I’d like to be able to shut them off when the alarm is off.

Nope - Found an issue where HASS didn’t had Admin privileges and resolved that so I can block/unblock specific clients but all my POE devices are Unifi Infrastructure which the documentation and this thread states are not yet supported. Seems like there is an issue with how Unifi devices (and therefore probably camera as well) are represented in the data model that makes controlling them less likely.

I would gladly send some beer vouchers in the direction of a friendly dev able to unlock this issue as I am keen to shut down my family wifi at night to reduce emf exposure.

The POE control definitely works for an AP. I know because I accidentally shut mine off last week.