node-red-contrib-tdn-wifi
v1.0.1
Published
WiFi scan/connect config page for Node-RED (systemd-networkd + wpa_supplicant)
Maintainers
Readme
node-red-contrib-tdn-wifi
A Node-RED node that serves a WiFi scan/connect page at /wifi-config, for Raspberry Pi boards running
systemd-networkd + wpa_supplicant (not NetworkManager, not dhcpcd). No dependencies beyond Node's
own built-ins — nothing else to npm install.
Quick start
- Drag a WiFi Config node onto any flow (it needs no wiring — 0 inputs) and deploy.
- Open
/wifi-config(same host/port as Node-RED, or click Open WiFi Config page on the node). - Click Scan Networks, pick one, enter its password, Connect.
- On success the page shows the assigned IP, gateway, DNS servers, and a live reachability check
against
web.whatsapp.com.
⚠️ Security note: /wifi-config is unauthenticated by default (matching this Pi's other TDN pages)
and can change the Pi's WiFi network and store a new password on the device. Only run this on a
trusted LAN. If this Pi is ever reachable from an untrusted network, put it behind a reverse proxy or
VPN, or add your own auth in front of it.
Requirements on the Pi
wpa_cli(part ofwpasupplicant) reachable for the WiFi interface's control socket — Node-RED runs as root on the Pi, so this works without extra permission setup.ip(iproute2) — used to read the interface's IP address and default route.resolvectl(systemd-resolved) for DNS servers, with a fallback to reading/etc/resolv.confif it's not present.
Only home-style WPA2/WPA3-Personal networks are supported (SSID + password, 8-63 characters) — no WPA-Enterprise/802.1x.
Install / update
# Install (from the Pi, same pattern as node-red-contrib-tdn-whatsapp)
cd /root/.node-red
npm install /path/to/node-red-contrib-tdn-wifi
# Update after a new version is published
npm install node-red-contrib-tdn-wifi@latest
sudo systemctl restart noderedOutput
The node emits { payload: { event: 'connected' | 'disconnected', ssid? } } whenever the WiFi state
changes, polled every 30 seconds independent of the page — wire it to a
node-red-contrib-tdn-whatsapp Send node to get a WhatsApp alert when
this Pi's WiFi drops or reconnects.
Why no NetworkManager (nmcli)?
This Pi's networking is configured with systemd-networkd + wpa_supplicant directly, so the node drives
wpa_cli for scanning/associating and ip/resolvectl for reading the resulting IP configuration,
rather than nmcli. If you're deploying this on a Pi OS image that uses NetworkManager instead, this
package will not work as-is.
