Files
NetAlertX/front/plugins/pihole_api_scan
sebingel 4c117db463 Fix elementOptions: rename typo 'ordeable' to 'orderable'
The key 'ordeable' in elementOptions was a long-standing typo for the
correct English word 'orderable'. Since the JS check in settings_utils.js
used the same misspelled key, the feature appeared to work — but it was
relying on the consistent propagation of a typo across the entire codebase.

Two pre-existing entries in front/plugins/ui_settings/config.json already
used the correct spelling 'orderable', but these had no effect because the
JavaScript check (option.ordeable === 'true') never matched them. As a
result, orderable behavior was silently disabled for those two settings.

Changes:
- front/js/settings_utils.js: renamed option.ordeable → option.orderable
  and isOrdeable → isOrderable (6 occurrences, lines 792/823/824/880/1079/
  1192/1228). The JS key check is the authoritative definition of the
  elementOptions property name, so this must change atomically with all
  config files.

- server/initialise.py:245: renamed "ordeable" → "orderable" in the
  hardcoded JSON string for LOADED_PLUGINS setting. This string is the
  source-of-truth for that setting's elementOptions and is not auto-
  generated from the plugin config files.

- front/plugins/*/config.json (33 files, 90 occurrences): renamed all
  "ordeable": "true" entries to "orderable": "true" via sed. All plugins
  used the typo consistently; they must be updated in the same commit to
  avoid a broken intermediate state.

The two formerly broken 'orderable' entries in ui_settings/config.json
are now matched by the corrected JS check and work as intended.

Fixes netalertx/NetAlertX#1584

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-03 18:28:48 +00:00
..
2026-02-11 01:55:02 +00:00
2025-11-29 14:18:54 +11:00

Overview - PIHOLEAPI Plugin — Pi-hole v6 Device Import

The PIHOLEAPI plugin lets NetAlertX import network devices directly from a Pi-hole v6 instance. This turns Pi-hole into an additional discovery source, helping NetAlertX stay aware of devices seen by your DNS server.

The plugin connects to your Pi-holes API and retrieves:

  • MAC addresses
  • IP addresses
  • Hostnames (if available)
  • Vendor info
  • Last-seen timestamps

NetAlertX then uses this information to match or create devices in your system.

Quick setup guide

  • You are running Pi-hole v6 or newer.
  • The Web UI password in Pi-hole is set.
  • Local network devices appear under Settings → Network in Pi-hole.

No additional Pi-hole configuration is required.

Usage

  • Head to Settings > Plugin name to adjust the default values.
Setting Key Description
PIHOLEAPI_URL Your Pi-hole base URL.
PIHOLEAPI_PASSWORD The Web UI base64 encoded (en-/decoding handled by the app) admin password.
PIHOLEAPI_SSL_VERIFY Whether to verify HTTPS certificates. Disable only for self-signed certificates.
PIHOLEAPI_RUN_TIMEOUT Request timeout in seconds.
PIHOLEAPI_API_MAXCLIENTS Maximum number of devices to request from Pi-hole. Defaults are usually fine.
PIHOLEAPI_FAKE_MAC Generate FAKE MAC from IP.

⚠️ Troubleshooting

Below are the most common issues and how to resolve them.


Authentication failed

Check the following:

  • The Pi-hole URL is correct and includes a trailing slash

    • http://192.168.1.10/
    • http://192.168.1.10/admin
  • Your Pi-hole password is correct

  • You are using Pi-hole v6, not v5

  • SSL verification matches your setup (disable for self-signed certificates)


Connection error

Usually caused by:

  • Wrong URL
  • Wrong HTTP/HTTPS selection
  • Timeout too low

Try:

PIHOLEAPI_URL = http://<pi-hole-ip>/
PIHOLEAPI_RUN_TIMEOUT = 60

No devices imported

Check:

  • Pi-hole shows devices under Settings → Network
  • NetAlertX logs contain:
[PIHOLEAPI] Pi-hole API returned data

If nothing appears:

  • Pi-hole might be returning empty results
  • Your network interface list may be empty
  • A firewall or reverse proxy is blocking access

Try enabling debug logging:

LOG_LEVEL = debug

Then re-run the plugin.


Some devices are missing

Check:

  • Pi-hole shows devices under Settings → Network
  • NetAlertX logs contain:
[PIHOLEAPI] Skipping invalid MAC (see PIHOLEAPI_FAKE_MAC setting) ...

If devices are missing:

  • The app skipps devices with invalid MACs
  • Enable PIHOLEAPI_FAKE_MAC if you want to import these devices with a fake mac and you are not concerned with data inconsistencies later on

Try enabling PIHOLEAPI_FAKE_MAC:

PIHOLEAPI_FAKE_MAC = 1

Then re-run the plugin.


Wrong or missing hostnames

Pi-hole only reports names it knows from:

  • Local DNS
  • DHCP leases
  • Previously seen queries

If names are missing, confirm they appear in Pi-holes own UI first.

Notes

  • Additional notes, limitations, Author info.

  • Version: 1.0.0

  • Author: jokob-sk, leiweibau

  • Release Date: 11-2025