Devices and Hostnames
Bandix discovers devices on its own: every MAC address seen on the monitored interface becomes an entry in the device list, with its IPv4 and IPv6 addresses, hostname and connection type. This page covers how devices are identified, how to give them friendly names, and how to remove them.
How Devices Are Identified
The backend keys every device by MAC address. For each device, getStatus returns:
| Field | Meaning |
|---|---|
mac |
MAC address (the device's identity) |
ip4 |
IPv4 address |
ip6 |
List of IPv6 addresses |
host |
Hostname |
conn |
Access type: wifi, wired or router |
uplink |
Interface the device is attached to, for example eth1, lan2, phy0-ap0 (empty if unknown) |
w_ch |
Wi-Fi channel number (0 when not Wi-Fi) |
w_freq |
Wi-Fi primary channel frequency in MHz (0 when unavailable) |
last |
Last-seen timestamp in milliseconds |
The rest of the record holds the traffic counters described in RPC Methods.
Because identity is the MAC address, devices that use randomized (private) MAC addresses appear as a new device whenever their MAC changes. Rate limits, quotas and hostname bindings are attached to the MAC, so they do not follow such a device to its new address. Disable MAC randomization for your home network on devices you want to manage.
Hostnames
The host value comes from the backend's device information (DHCP leases and similar sources). When a device has no hostname, the list shows its IP address.
Setting a Hostname
- On the Status page, click Settings in the device's row.
- In the Device Settings dialog, type the new name in the Hostname field.
- Click Save next to the field.
The name is sent to the backend as a hostname binding for the MAC address (method setHostname) and appears on the next refresh. If the value did not change, nothing is sent.
From the shell:
ubus call luci.bandix setHostname '{"mac":"aa:bb:cc:dd:ee:ff","hostname":"living-room-tv"}'
Output similar to:
{
"success": true,
"message": "Hostname binding set successfully"
}
Removing a Binding
Clear the field and click Save. An empty hostname is sent to the backend, which the RPC plugin documents as removing the binding.
Hostname Pitfalls
- The RPC plugin builds the request body by inserting the hostname into a JSON string without escaping it. A hostname containing a double quote
"or a backslash\produces invalid JSON, and the backend rejects the request. Stick to letters, digits, spaces, dots, hyphens and underscores. - The Status page does not check the RPC result: if the backend answers with an error (
"success": false), the dialog still behaves as if the save worked, and the old name simply stays in the list. Only a failed RPC call shows "Failed to set hostname".
Deleting Devices
Deleting a device removes it from the backend's device list together with its traffic history. Devices that are still online reappear as soon as they send traffic again.
One Device
Click ✕ in the Actions column. Confirm the dialog "Are you sure you want to delete this device? Traffic history will be removed." The page calls deleteDevice and reloads the list. A failed call shows "Failed to delete device".
Several Devices at Once
- Tick the checkboxes next to the devices, or use Select all next to the Device List title. Select all only selects the devices currently displayed.
- Click Delete selected (n).
- Confirm the dialog. It warns that the devices' traffic history, hostname bindings, rate limits and quotas will also be removed, and that online devices may reappear.
The selection is captured when the confirmation dialog opens, so the 1-second refresh cannot change what gets deleted. The page sends the MAC addresses in batches of 50 to deleteDevices one after another, so that each request finishes within LuCI's RPC timeout.
For each batch, the backend reports which MACs were deleted, not_found or failed. The page checks that every requested MAC appears exactly once in that answer; otherwise it reports "Invalid batch deletion response". If any device failed, a warning lists the counts ("Deleted: 3; not found: 0; failed: 1.") and one line per failure.
Batch deletion needs a backend that implements DELETE /api/traffic/devices/batch. An older backend answers 404 or 405, which the plugin turns into "Batch deletion is unavailable. Update the Bandix service."
The checkboxes and the Delete selected button are disabled while a deletion runs, and for users without write access.
Excluding the Router
The router itself can appear in the list (with conn set to router). To hide it from the statistics, enable Exclude Interface Device (traffic_exclude_iface_device) on the Settings page. See Configuration.
Neighbor Table Problems
If devices show stale IP addresses or two devices seem to share an address, the backend's neighbor (IP-to-MAC) data may be outdated. Enable Neighbor Flush (traffic_neighbor_flush_enable) makes the backend flush it periodically. The setting's help text recommends leaving it off when the device list works normally.