Skip to content

UniFi Network: client presence, triggers and KNX addresses

Link’nXAdministratorInstaller

Link’nX web: UniFi Network trigger and single KNX table of a declared controller

In Link’nX, the connection or disconnection of a UniFi Network client can trigger a scenario. The controller’s KNX table also maps group addresses to network commands (block, WLAN, restart, PoE) and to states: client connected or blocked, WLAN enabled, number of active clients.

Intended for administrators and installers. The presence of a client corresponds to a device associated with the network, not to an identified person. The number of clients may include phones, computers and connected devices.

  • The controller is declared in Link’nX.
  • You know the MAC of the monitored clients, as shown by the console, and the group addresses planned in the ETS project.

Trigger a scenario on connection or disconnection

Section titled “Trigger a scenario on connection or disconnection”
  1. In the right project and the right gateway, open Triggers → Add → UniFi Network.
  2. Fill in Name, then UniFi Network controller.
  3. Fill in Client MAC address, for example 02:00:00:00:00:01, a fictitious value to replace with the MAC of the client as seen by the console.
  4. In Event, choose Client connected or Client disconnected.
  5. Click the floppy disk at the bottom right, wait for Success! and find the trigger in the list.
  6. Associate it with the relevant scenario and save that scenario. To edit an existing trigger, follow trigger editing.

These events correspond to observed changes:

  • The first reading establishes the initial state; it does not automatically count as a new connection.
  • A disconnection is confirmed over several readings: the reaction is therefore not instant, and no exact delay is guaranteed.
  • Controller unavailability does not indicate that the client has left, and a previously displayed state does not indicate its current presence.

From the UniFi Network list, click the controller’s two arrows, Gateway mode configuration. This gateway uses a single table: each row has Target (client MAC / device ID), Command / state, DPT, KNX group address and Active.

  1. Click Add.
  2. Choose Command / state, in the Commands or States group.
  3. Fill in the target corresponding to the point. Active client count concerns the whole site and accepts an empty target; the other points require a target.
  4. Check the proposed DPT. It remains editable: keep the type planned with the installer.
  5. Fill in KNX group address, for example 1/2/3, a fictitious address to replace according to the ETS project. Check Active for the mapping to use.
  6. Also complete the required fields of any inactive rows, or remove an unneeded row with its Delete trash can.
  7. Click the floppy disk at the bottom right and wait for Success! / Updated!. Save before leaving: this table does not ask for confirmation when you leave.

The trash can removes a row from the form; save to keep the deletion. To suspend a mapping while keeping its settings, uncheck Active and save.

All the commands offered use DPT 1.001. Their targets are the same as in the UniFi Network actions.

CommandValue 1Value 0
Block clientRequest blocking of the MACRequest its unblocking
Enable WLANRequest enabling of the named WLANRequest its disabling
Reconnect (kick) clientRequest reconnection of the MACNo reconnection command
Restart deviceRequest a restart of the device MACNo restart request
PoE power-cycle portRequest the power cycle of the MAC_port targetNo cycle requested

The KNX table does not offer a separate Unblock client or Disable WLAN row: send 0 on the corresponding command. Do not use restarts and PoE cycles simply to check a mapping.

StateTargetDPTReading and limit
Client connectedClient MAC1.0011 associated, 0 absent from the known presence state; neither proof of human presence nor a guarantee of freshness if communication is lost
Client blockedClient MAC1.0011 known block; for an offline client, 0 does not rule out a block decided elsewhere
WLAN enabledExact WLAN name1.0011 enabled, 0 disabled in the available state; do not replace a missing value with 0
Active client countNone needed7.001Number of devices on the site, without deducing a number of people from it
  1. Reopen the trigger to review the controller, the MAC and the event, then check that it is in the saved scenario.
  2. Leave and reopen Gateway mode configuration to review all the mappings.
  3. Send a command from the bus in the authorized context, then check its effect in the UniFi console. For a state, compare the value received on the bus with the console.
  • The scenario does not react: check the controller, the site, the MAC, the event, the association with the scenario and its saving.
  • A feedback is missing: check the point, its target, the DPT, the address, Active, the saving and the controller context.
  • The WLAN target is not unique, or an offline block must be established with certainty: have the situation confirmed by the network manager or by support.

If checking these fields has already failed, write to support@can-nx.com with the expected event or point, the observed result and a summary of the tests, instead of changing other settings at random. Do not send any password or named list of occupants.

French labels: Adresse MAC du client, Événement, Client connecté, Client déconnecté, Commande / état, Commandes, États, Client bloqué, WLAN activé and Nombre de clients actifs.