Skip to content

UNFIMP does not populate devSSID for UniFi wireless clients #1832

Open

Description

@hbit1

What installation are you running?

Production (netalertx) 📦

Is there an existing issue for this?

The issue occurs in the following browsers. Select at least 2.

  • Firefox
  • Chrome
  • Edge
  • Safari (unsupported) - PRs welcome
  • N/A - This is an issue with the backend

Current Behavior

Bug description

The UNFIMP plugin successfully imports UniFi clients, including hostname, IP, vendor, and parent AP/switch information, but WiFi SSIDs are not populated in devSSID.

Environment

  • NetAlertX: v26.10.0
  • UniFi Network: 10.6.106
  • UniFi OS: 5.1.33
  • Controller type: UniFi Cloud Gateway
  • UNFIMP version setting: UDMP-unifiOS
  • Installation type: Production container

UNFIMP successfully connects to the UniFi controller and imports clients.

Current behavior

For a wireless client, the UniFi API data contains the actual WiFi SSID in essid.

Sanitized example:

{
  "is_wired": false,
  "hostname": "<REDACTED_HOSTNAME>",
  "last_connection_network_name": "<REDACTED_NETWORK_NAME>",
  "network": "<REDACTED_NETWORK_NAME>",
  "essid": "<REDACTED_SSID>",
  "last_uplink_name": "<REDACTED_AP_NAME>"
}

Another wireless client shows the same relevant fields:

{
  "is_wired": false,
  "hostname": "<REDACTED_HOSTNAME>",
  "last_connection_network_name": "<REDACTED_NETWORK_NAME>",
  "essid": "<REDACTED_SSID>"
}

The actual WiFi SSID is therefore available in the returned UniFi client data as:

essid

However, the current UNFIMP implementation in server/plugins/unifi_import/script.py uses:

extra=get_unifi_val(device, 'connection_network_name', ''),

In this environment, connection_network_name is not present in the returned wireless client objects, so extra remains empty.

There also appears to be a second issue in:

server/plugins/unifi_import/config.json

The UNFIMP extra column is defined without a mapped_to_column entry.

In particular, it does not contain:

"mapped_to_column": "scanSSID"

Other NetAlertX plugins that provide SSID information use this mapping. For example, the included WiFi Canary plugin defines its extra field using:

{
  "column": "extra",
  "mapped_to_column": "scanSSID"
}

At the same time, UNFIMP exposes devSSID in both its SET_ALWAYS and SET_EMPTY options, which suggests that the plugin is intended to populate devSSID.

Additional information

Parent topology import works correctly using the same UniFi client data.

Fields such as:

last_uplink_name
last_uplink_mac
last_uplink_remote_port
ap_mac

are available from UniFi and the corresponding parent AP/switch information is imported successfully by UNFIMP.

The issue therefore appears to be specific to SSID extraction and SSID-to-devSSID mapping.

No local patches have been applied. The behavior was observed with the unmodified NetAlertX v26.10.0 container.

Expected Behavior

Expected behavior

For wireless UniFi clients, UNFIMP should populate devSSID with the actual WiFi SSID reported by the UniFi controller.

For example:

devSSID = <REDACTED_SSID>

For wired clients, devSSID should remain empty.

Possible cause

There appear to be two related issues:

  1. script.py reads connection_network_name, while the UniFi client data returned in this environment provides the actual WiFi SSID in essid.

  2. The UNFIMP extra field is not mapped to scanSSID in config.json.

For comparison, the UniFi data may also contain:

last_connection_network_name

but this represents the UniFi network name, not necessarily the actual wireless SSID, so it should not be used as a substitute for essid.

Possible fix

The SSID extraction could use essid for wireless clients, for example:

ssid = (
    ''
    if device.get('is_wired') is True
    else get_unifi_val(device, 'essid', '')
)

and then:

extra=ssid,

The corresponding extra column in config.json could also be mapped to scanSSID:

{
  "column": "extra",
  "mapped_to_column": "scanSSID"
}

This would ensure that the SSID extracted from UniFi is propagated into NetAlertX's devSSID field.

Steps To Reproduce

  1. Run NetAlertX v26.10.0 with the UNFIMP plugin configured for a UniFi OS controller using UDMP-unifiOS.

  2. Allow UNFIMP to import clients from the UniFi controller.

  3. Verify that wireless clients are successfully imported and that other UniFi-derived information, such as hostname, vendor, and parent AP/switch data, is populated.

  4. Inspect the UniFi client data for a wireless client and confirm that it contains an essid value, for example:

{
  "is_wired": false,
  "essid": "<REDACTED_SSID>"
}
  1. Open the corresponding device in NetAlertX.

  2. Observe that devSSID is empty even though the UniFi client data contains the SSID in essid.

Relevant app.conf settings

docker-compose.yml

Activity

  1. jokob-sk commented on Oct 3, 2026

    @jokob-sk
    Collaborator

    Thanks for the detailed report — that makes sense, and the "essid" vs "connection_network_name" distinction is helpful.

    I don't have the time to dig into this properly at the moment, but I'm definitely open to a PR if you'd like to put together a fix. The proposed approach looks reasonable at a glance, and I'd be happy to review it when I get a chance.

  2. added and removed
    bug 🐛Something isn't working
    on Oct 3, 2026
  3. jokob-sk commented on Oct 6, 2026

    @jokob-sk
    Collaborator

    Big thanks to @itwormz implementing this.

    This should be available/fixed in the next release.
    It would be great if you could test the ghcr.io/netalertx/netalertx-dev Docker image in ~15 minutes (or once the latest GitHub Action finishes).

    ⚠️ Please back up everything first, or ideally spin up a separate container (make sure you use a unique PORT and GRAPHQL_PORT if running instances concurrently) with its own DB and config (a copy of your current setup), as database changes may occur.

    After updating:

    • Click the 🔄 refresh button in the blue header at the top
    • Hard refresh your browser cache (shift + reload) to force js and css files reload

    👉 If I don’t receive confirmation that this works, I may revert the changes to avoid introducing bugs.

    Disclaimer: Running the dev container long-term may lead to data loss, as upgrade paths are not guaranteed.

    Thanks in advance,
    j

  4. added
    Waiting for reply⏳Waiting for the original poster to respond, or discussion in progress.
    next release/in dev image 🚀This is coming in the next release or was already released if the issue is Closed.
    and removed on Oct 6, 2026
  5. itwormz commented on Oct 8, 2026

    @itwormz
    Contributor

    Confirmed: the fix works in the official dev image (dev-20261006-204857).
    I updated my home NetAlertX installation and disabled our local UniFi patch to verify the upstream implementation. After a scheduled UniFi import, I compared NetAlertX’s devSSID values against live data from my UniFi controller:

    • All 14 active wireless clients had an SSID matching UniFi’s essid.
    • All 28 active wired clients had an empty SSID.
    • No mismatches were found.
      All 75 existing device records were preserved, and the database integrity check passed.
      Thanks for merging fix(unifi): populate device SSIDs from wireless clients #1836!
  6. jokob-sk commented on Oct 9, 2026

    @jokob-sk
    Collaborator

    Thanks for the fix and testing @itwormz 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature request ➕New feature or requestWaiting for reply⏳Waiting for the original poster to respond, or discussion in progress.next release/in dev image 🚀This is coming in the next release or was already released if the issue is Closed.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions