PolarPatch/BlueWatch
حول
Passive Bluetooth neighbourhood monitor for Raspberry Pi and Linux: a live radar, device triage, categories and alerts for new devices. Meshcore/Meshtastic + RTL-SDR/HackRF support.
الأمان والخصوصيةالنمو المقاس للنجوم
- خلال 24 ساعة
- +٥٧
- خلال 7 أيام
- +٦٩
- خلال 15 يومًا
- +٧١
- خلال شهر
- +٧٣
تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.
README.md
الأصل
BlueWatch
Passive Bluetooth neighbourhood monitor for Raspberry Pi and Linux: a live radar, device triage, categories and alerts for new devices.
The real strength shows up once you actually start using it: categorize the devices you already know, your own phones, your TV, the smart plugs, the neighbour's robot lawnmower, whatever's expected around you, and BlueWatch filters all of that familiar traffic out of the way. What's left standing out is the interesting part: the moment an unrecognized device enters the radio range of whatever's running BlueWatch, it surfaces immediately instead of being buried under dozens of devices you've already triaged. The dashboard stops being a wall of MAC addresses and turns into an actual presence radar for your surroundings. You notice the one device that doesn't belong, not the fifty that do.
What's in it
- Live dashboard and signal radar. See what is around you right now. The radar shows signal strength as distance, marks new arrivals and departures, and keeps a live event log.
- Automatic device types. Phones, TVs, trackers, wearables and cycling gear, drones, cars and more are recognised from their Bluetooth advertisements, and you can override any of them.
- Your own categories. Sort familiar devices into nested categories with drag and drop, so the unfamiliar ones stand out.
- Sticky alerts. Pick device types to watch. An alert stays until you dismiss it, and comes back if the device returns after being away.
- Devices on your network. Nearby LAN devices found through mDNS show up next to the Bluetooth ones.
- Statistics that stay fast. Hourly overview graphs and an hourly rollup keep the dashboard quick even with thousands of devices.
- Automatic CSV export and cleanup. Old observations are written to one plain CSV file per day and removed from the database. It is off by default.
- Runs on small hardware. Includes stability fixes for the Bluetooth controller on a Raspberry Pi 3.
- Drone warning (2.0). Any drone, whatever its signal, opens a warning box on every page at once, with its position and the pilot's when it sends them.
- More radios (2.0). Wi-Fi ears, several RTL-SDRs and a HackRF at once (receive only), LoRa listener boards for Meshtastic, MeshCore, LoRaWAN and LoRa APRS, and ESP32 ears around the property.
- Perimeter and sites (2.0). Zones for ears around the property with "coming in" alerts, and other places (a cabin, a relative's house) with their own BlueWatch shown on the main one.
Started from bluehood (MIT licensed, see CREDITS.md) but has since diverged into its own project: known/
unknown device triage, user-defined nested categories with drag-and-drop
assignment, per-device arrive/depart notification overrides, an
independent watchlist, a live "nearby now" dashboard, IRK-based address
resolution, and a WiGLE.net vendor-lookup fallback, among other things
not in the original. See SPEC.md for the original design notes and
CREDITS.md for the full breakdown of what's inherited vs. new.
WARNING: Alpha Software
This project is in early development and is not ready for production use. Features may change, break, or be removed without notice. Use at your own risk. Data collected should be treated as experimental.
Screenshots
All taken in demo mode (?demo=1): names, addresses and messages are made up.
Dashboard: the day ring (today against a usual day, most seen and alerts per hour), key numbers, filters and the device list; Categories, Sites, Names to watch for and the LoRa chat on the left
Device Details: live signal second by second, signal history for 24 hours and 7 days, and the device's 30-day ring with weekdays and its routine
Drone warning: opens on every page the moment a drone is heard, with its position, pilot position and ID (?drone-demo=1 shows this example)
Radar: distance from the centre is signal strength, with a live log of arrivals and departures
Crowd: estimated people and personal devices over time
Mesh: network health, the node radar with status lights and a 24-hour replay, the day ring, reception per network, the Meshtastic and MeshCore chats, and the mesh map with links, routes, echoes, movers, late nodes and questions to a node
RF log: rtl_433 decodes on 433/868 MHz and the band monitor (noise floor per frequency, jamming alert), the Around the clock ring (cars by tyre sensors, remotes, weather) and weather stations
Ears: what the extra listeners hear and add to BlueWatch's own radio, per ear and per device type
All devices: search, date range and the full device list
Config > Mesh: node name, region and preset
Config > Radios (SDR): every RTL-SDR and HackRF with its job
Why?
Thousands of Bluetooth devices surround us at all times: phones, cars, TVs, headphones, hearing aids, delivery vehicles, and more. BlueWatch demonstrates how simple it is to passively detect these devices and observe patterns in their presence, no pairing, no active interaction, nothing the device owner would ever notice.
With enough data, you could potentially:
- Understand what time someone typically walks their dog
- Detect when a visitor arrives at a house
- Identify patterns in daily routines based on device presence
This metadata can reveal surprisingly personal information without any active interaction with the devices.
I came across bluehood and tried it out on a Raspberry Pi, liked the idea immediately, but ran into some gaps and features I wanted that weren't there yet. That turned into using Claude Code to grow it into its own project and take it in a somewhat different direction. Huge thanks to Danny McClelland for the work he put into the original Bluehood. None of this would exist without it.
BlueWatch is an educational tool to raise awareness about Bluetooth privacy. It started as a weekend project, but the implications are worth thinking about.
What?
BlueWatch is a Bluetooth scanner that:
- Continuously scans for nearby Bluetooth devices (both BLE and Classic)
- Identifies devices by vendor (MAC address lookup) and BLE service UUIDs
- Classifies devices into categories (phones, audio, wearables, IoT, vehicles, etc.)
- Tracks presence patterns over time with hourly/daily heatmaps
- Filters out noise from randomized MAC addresses (privacy-rotated devices)
- Analyzes device correlations to find devices that appear together
- Sends push notifications when watched devices arrive or leave
- Provides a web dashboard for monitoring and analysis
Features
Scanning
- Dual-mode scanning: Bluetooth Low Energy (BLE) and Classic Bluetooth
- MAC address vendor lookup (local database + online API fallback)
- BLE service UUID fingerprinting for accurate device classification
- Classic Bluetooth device class parsing
- Randomized MAC filtering (hidden from main view)
- Also lists devices announcing themselves on your local network (printers, TVs, speakers, computers, smart-home hubs) with their own name and model. Turn off with
BLUEWATCH_MDNS=0 - Crowd: roughly how many people are around, counted from the phones BlueWatch hears, through the day and against what is usual for the time. Totals only. See Crowd
- Wi-Fi ears (optional): with a second, monitor-mode Wi-Fi adapter, BlueWatch also recognises Axon/Flock camera networks, WiFi Pineapples, ESP deauthers, Pwnagotchis and Remote ID drones, and alerts on deauthentication floods and evil twins. See Wi-Fi Ears
- Sub-GHz (optional): with an RTL-SDR and
rtl_433installed, weather stations, tyre sensors, remotes and utility meters on 433/868 MHz show up too (the RF log page). A band monitor there tracks the noise floor of each frequency and alerts when it stays far above normal, which is what a car-key or alarm jammer looks like (Config > Alerts > Radio Alerts). An "Around the clock" ring there shows everything heard by hour: cars passing (from their tyre sensors, with the cars that come back on other days), remote and doorbell presses at their minute, weather and other sensors. Weather stations get their own box there: temperature, humidity and the like, a day ring by hour and 24 h / 7 day charts - Remote ears: extra passive listeners around the house (Home Assistant Bluetooth proxies or a spare Pi) report what they hear, and Device Details shows which room a device is nearest to. See Remote Ears
Device Management
- Mark devices as "Watched" for tracking personal devices
- Organize devices into custom groups
- Set friendly names for known devices
- Add custom notes/tags to any device
- Device type detection (phones, audio, wearables, IoT, vehicles, etc.)
Analytics
- 30-day presence timeline visualization
- Signal strength (RSSI) history chart with 7-day data
- Hourly and daily activity heatmaps showing when devices are active
- Pattern analysis ("Weekdays, evenings 5PM-9PM")
- Dwell time analysis showing total time devices spend in range
- Device correlation detection to find devices that appear together (co-presence plus synchronized arrival/departure)
- MAC-rotation linkage ("Likely same device"), heuristically links randomized identifiers that hand off in time, share a similar signal strength, and ping at a similar cadence
- Proximity zones (immediate, near, far, remote) based on signal strength
- Search by MAC, vendor, or name
- Date range search for historical queries
Notifications (via ntfy.sh)
- Push notifications to your phone/desktop
- Notify when new devices are detected
- Notify when watched devices return
- Notify when watched devices leave
- Possible RF jamming on 433/868 MHz (with an RTL-SDR)
- Any drone, whatever its signal (Remote ID over Bluetooth or Wi-Fi, DJI DroneID, drone makers' address blocks, RC links), with its position and pilot position when it sends them, and one more alert when three or more new drones show up within 10 minutes
- Names you watch for, on Bluetooth names and Wi-Fi network names (Config > Alerts > Drones and Names): plain text matches the start of a name,
*and?a whole name - Configurable thresholds for arrival/departure
Operations
- Heartbeat check-in, periodically POST status to an uptime monitoring service (e.g., Uptime Kuma, Healthchecks.io)
- Storage rotation, automatically prune sightings older than a configurable number of days; optionally restrict pruning to whole stale devices seen fewer than a minimum number of times (watched devices are never pruned); separately, forget device records not seen for N days (watched, categorised, named and noted devices are kept)
- Both configurable from the web UI or via environment variables
Web Interface
- Themes: cyberpunk by default, with dark and light one click away (the toggle in the top bar, or Config > Display); each browser remembers its own choice
- Compact/Detailed view toggle for different display preferences
- Screenshot mode to obfuscate MACs and names for safe sharing
- Keyboard shortcuts for power users (press
?to view) - CSV export of detailed device data (MAC, vendor, identifier, type, BT type, device class, watched/ignored flags, first/last seen, sightings, group, service UUIDs, and notes), exports the whole filtered set, not just the current page
- Device groups for organizing related devices
- Optional authentication to secure access
How?
Quick Start with Docker (Recommended)
Prerequisites, Linux hosts only
BlueWatch communicates with your Bluetooth adapter via BlueZ, the Linux Bluetooth stack. BlueZ must be installed and running on the host before starting the container. The Docker image itself does not include it.
# Debian / Ubuntu (including Ubuntu Server) sudo apt install bluez sudo systemctl enable --now bluetooth # Arch Linux sudo pacman -S bluez bluez-utils sudo systemctl enable --now bluetoothWithout BlueZ on the host you'll see an error like:
BLE scan error: [org.freedesktop.DBus.Error.ServiceUnknown] The name org.bluez was not provided by any .service files
# Clone this repository, then build and start with Docker Compose
git clone https://github.com/PolarPatch/BlueWatch.git
cd BlueWatch
docker compose up -d --build
# View logs
docker compose logs -f
There's no published BlueWatch image on a container registry yet. docker-compose.yml builds from the Dockerfile in this repo.
The web dashboard will be available at http://localhost:8080
Docker Requirements
- Docker with the Compose v2 plugin (
docker compose). On Raspberry Pi OS / Debian, install Docker from docs.docker.com/engine/install rather than the distro'sdocker.iopackage, which on Debian 12 (Bookworm) only ships the olddocker-composev1. - A 64-bit operating system on Raspberry Pi. On 32-bit Raspberry Pi OS, Docker pulls an ARMv5 image where the Python dependencies cannot be installed, so the build fails. Use 64-bit Raspberry Pi OS, or the one-command Linux installer, which works on 32-bit as well.
- Linux host with a BLE-capable Bluetooth adapter (Bluetooth 4.0+) that supports the Central role
- BlueZ installed and running on the host (
sudo apt install bluez && sudo systemctl enable --now bluetooth)
Note: Older adapters (Bluetooth 2.x/3.x) do not support BLE scanning. If your adapter lacks BLE Central role support, you will see:
No Bluetooth adapters with BLE 'central' role found.
Note: Docker runs in privileged mode with host networking for Bluetooth access. This is required for BLE scanning.
Docker Environment Variables
| Variable | Default | Description |
|---|---|---|
PUID |
1000 |
UID for the container user, set to match your host user (id -u) when using bind mounts |
PGID |
1000 |
GID for the container user, set to match your host group (id -g) when using bind mounts |
TZ |
UTC | Container timezone (e.g., Europe/London) |
BLUEWATCH_ADAPTER |
auto | Bluetooth adapter for BLE scanning (e.g., hci0) |
BLUEWATCH_CLASSIC_ADAPTER |
same as BLUEWATCH_ADAPTER |
Separate adapter for classic Bluetooth scanning (e.g., hci1). When set to a different adapter, BLE and classic scans run concurrently. |
BLUEWATCH_DATA_DIR |
/data |
Database storage directory |
BLUEWATCH_METRICS_PORT |
disabled | Prometheus metrics port (e.g., 9199) |
BLUEWATCH_PORT |
8080 |
Web dashboard port, handy with host networking in Docker. --port wins over it, and a port saved in Config > Operations wins over both |
BLUEWATCH_NTFY_SERVER |
https://ntfy.sh |
ntfy server for push notifications, for a self-hosted instance. A server saved in Config > Alerts wins over it |
BLUEWATCH_HEARTBEAT_URL |
disabled | URL to POST heartbeat check-ins (e.g., a healthchecks.io or uptime-kuma push URL) |
BLUEWATCH_HEARTBEAT_INTERVAL |
300 |
Seconds between heartbeat check-ins |
BLUEWATCH_WIFI_IFACE |
unset (off) | Monitor-mode Wi-Fi adapter to listen on, e.g. wlan1. See Wi-Fi Ears |
BLUEWATCH_TIMEZONE |
system timezone | IANA timezone the stored times were written in, e.g. Europe/Oslo. Only needed when it differs from the system's, for example in a container that runs in UTC. Times are sent to browsers as UTC either way |
BLUEWATCH_WIFI_CHANNELS |
1-13 |
Channels to hop through, e.g. 1,6,11,36,40,44,48 |
BLUEWATCH_WIFI_PCAP |
unset | Replay a radiotap .pcap through the Wi-Fi recognition instead of listening |
BLUEWATCH_PRUNE_DAYS |
0 (disabled) |
Auto-delete sightings older than N days to free storage |
BLUEWATCH_PRUNE_MIN_SIGHTINGS |
0 (disabled) |
When >0, prune whole stale devices (older than BLUEWATCH_PRUNE_DAYS and with fewer than N total sightings) instead of only trimming old sighting rows; watched devices are never pruned |
BLUEWATCH_DEVICE_RETENTION_DAYS |
0 (disabled) |
Forget device records (and their sightings) not seen for N days. Watched, categorised, named and noted devices, and devices linked to a known identity, are kept. Also in Config > Storage Rotation |
Bluetooth Adapter Requirements
BlueWatch requires a BLE-capable Bluetooth adapter (Bluetooth 4.0 or later) with Central role support. Older Bluetooth 2.x/3.x adapters do not support BLE scanning and will not work.
If your adapter does not support the BLE Central role, BlueWatch will exit with:
No Bluetooth adapters with BLE 'central' role found
You can check your adapter's capabilities with bluetoothctl show and look for central in the supported roles.
Linux without Docker (one command)
Works on Raspberry Pi OS, Debian and Ubuntu. The installer sets up BlueZ,
a private Python virtual environment in /opt/bluewatch, and a systemd
service that starts at boot:
git clone https://github.com/PolarPatch/BlueWatch.git
cd BlueWatch
./install.sh
The dashboard is then available at http://<your-machine>:8080. Data lives in
/var/lib/bluewatch. To upgrade, git pull and run ./install.sh again. To
remove it, run ./install.sh uninstall (add --purge to delete the data too).
install.sh picks the right installer for your OS (install-linux.sh on
Linux, launchd on macOS), so it is the same command everywhere.
Manual Installation (Linux)
Modern Debian, Ubuntu and Raspberry Pi OS refuse a plain pip install
into the system Python ("externally-managed-environment"), so use a virtual
environment:
# Install system dependencies (Debian/Ubuntu/Raspberry Pi OS)
sudo apt install bluez python3-venv python3-pip
# Install system dependencies (Arch Linux)
sudo pacman -S bluez bluez-utils python-pip
# Clone and install into a virtual environment
git clone https://github.com/PolarPatch/BlueWatch.git
cd BlueWatch
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
Bluetooth Permissions
Bluetooth scanning requires elevated privileges. Choose one:
Run as root (simplest):
sudo .venv/bin/bluewatchGrant capabilities to Python:
sudo setcap 'cap_net_admin,cap_net_raw+eip' $(readlink -f .venv/bin/python) .venv/bin/bluewatchUse the systemd service (recommended for always-on). The bundled
bluewatch.serviceexpects the package in/opt/bluewatch/venv, which is what./install.shsets up. If you installed elsewhere, edit theExecStart=line first:sudo cp bluewatch.service /etc/systemd/system/ sudo systemctl daemon-reload sudo systemctl enable --now bluewatch
macOS
BlueWatch works natively on macOS without Docker. macOS uses CoreBluetooth instead of BlueZ, which is handled automatically by the bleak library.
One command (installs into a private virtual environment and starts BlueWatch automatically at login):
git clone https://github.com/PolarPatch/BlueWatch.git
cd BlueWatch
./install.sh
Remove it with ./install.sh uninstall (add --purge to delete the data too).
Or run it manually:
# Clone the repository
git clone https://github.com/PolarPatch/BlueWatch.git
cd BlueWatch
# Create a virtual environment
python3 -m venv .venv
source .venv/bin/activate
# Install
pip install -e .
# Run
python -m bluewatch.daemon
The web dashboard will be available at http://localhost:8080
Note: On first run, macOS will prompt you to allow Bluetooth access. You must grant this permission for scanning to work.
Usage
# Start with web dashboard (default port 8080)
bluewatch
# Specify a different port
bluewatch --port 9000
# Use a specific Bluetooth adapter
bluewatch --adapter hci1
# Use separate adapters for BLE and classic scanning (concurrent)
bluewatch --adapter hci0 --classic-adapter hci1
# List available adapters
bluewatch --list-adapters
# Disable web dashboard (scanning only)
bluewatch --no-web
# Enable Prometheus metrics exporter on port 9199
bluewatch --metrics-port 9199
Web Dashboard
The dashboard provides:
- Device list with type icons, vendor, MAC, name, sightings, last seen
- Device filters by type (phones, audio, IoT, etc.) and watched status
- Search by MAC, vendor, or name
- Date range search to find devices seen in a specific time window
- Tabbed settings page, Alerts, Operations, Groups, Security, WiGLE, and Export (direct-link via hash, e.g.
/settings#operations) - Device details modal with:
- BLE service fingerprints
- Hourly/daily activity heatmaps
- 30-day presence timeline
- Signal strength (RSSI) history chart
- Pattern analysis
- Dwell time statistics
- Proximity zone indicator
- Notes field
- Group and type assignment
Keyboard Shortcuts
| Key | Action |
|---|---|
/ |
Focus search bar |
r |
Refresh device list |
c |
Toggle compact view |
w |
Toggle watch on selected device |
Esc |
Close modal |
? |
Show keyboard shortcuts |
Screenshot Mode / Demo Mode
Two levels of redaction for sharing screenshots safely, toggled via the
browser console (localStorage.setItem('bluewatch_screenshot_mode', 'true')
/ 'bluewatch_demo_mode') or, for demo mode, a ?demo=1 URL param:
- Screenshot mode: partial masking, MAC addresses show only the
first 2 octets (e.g.,
AA:BB:XX:XX:XX:XX), names show only the first 2 characters (e.g.,Da********) - Demo mode: full redaction, every MAC becomes
00:00:00:00:00:00, and names/vendors/categories are replaced with generic placeholders (used for this README's own screenshots) - CSV exports also respect screenshot mode
Push Notifications
BlueWatch can send push notifications via ntfy.sh, a free, open-source notification service.
- Create a topic at ntfy.sh (e.g.,
bluewatch-myname-alerts) - Subscribe to the topic on your phone using the ntfy app
- In BlueWatch settings, enter your topic name and enable notifications
- Self-hosted ntfy: set ntfy Server in Config > Alerts (or
BLUEWATCH_NTFY_SERVER), and an Access Token if the topic is protected
- Self-hosted ntfy: set ntfy Server in Config > Alerts (or
- Configure which events trigger notifications:
- New device detected
- Watched device returns (after being absent)
- Watched device leaves (not seen for X minutes)
Mesh
The Mesh page shows the public Meshtastic and MeshCore channels side by side,
heard by your own node (Meshtastic or MeshCore companion over USB or Wi-Fi) or
by a LoRa listener board (bluewatch-lora firmware for the Heltec V3).
Direct messages and private channels are never logged.
Below the chats, the mesh map puts the nodes on an OpenStreetMap map with the radio links heard between them (relays, MeshCore flood paths, Meshtastic neighbour lists), draws a MeshCore message's way through the repeaters, and has a network graph, coverage by direction, trails of nodes that move, favourites, cold nodes, records (farthest node, longest link), the busiest relays, and push alerts for new and returning nodes plus an RSS feed. Only the map tiles are fetched from the internet; nothing is sent over the air for it.
Network health at the very top gives five numbers for the last hour against the day before, each with what it means: traffic, how busy the channel is (time on air from packet size and preset), the share of packets that were copies through other repeaters, the noise floor (from RSSI and SNR) and the nodes heard.
The node radar places every mesh node your node or a LoRa listener board picks up by distance and bearing from you, with a list beside it: name, network, role (router, repeater, room server, ...), hops (0 = heard directly), signal and when it was last heard. Every Meshtastic packet names its sender; names, role and position come from node info on the default channels. A MeshCore node shows up when it sends an advert, and only when the advert's Ed25519 signature checks out. Packets that came over the internet (MQTT) are left out.
Each node in the list has a status light: green, yellow, orange or red by how long it has been quiet against its own usual gap between visits over the last 7 days, not a fixed time; grey while it is still being learned. The same lights fill Late nodes at the bottom. The strip under the radar shows the nodes heard per 10 minutes over the last 24 hours: click it, or press Replay 24 h, and the radar plays the day back.
Echoes, beside Routes, lists packets heard more than once: through other repeaters, or by a second listener, with the hops, path and signal of each copy. With no node selected, the map's side panel lists the nodes that moved in the last 24 hours and whether they left or came into a zone of 1, 5, 10 or 25 km around you. Raw packets for these are kept in memory only.
BlueWatch only transmits on the mesh, and only when you press a button: a reply on a public channel (Send), a MeshCore advert (Send advert), a question to one node from the map's side panel (Status, Telemetry or Trace for a MeshCore repeater; Trace, Position or Telemetry for a Meshtastic node), or Who hears me (one MeshCore discover request; the neighbours answer with how well they heard you). Replies are built and encrypted here and sent by your LoRa listener board (its own LoRa chip, firmware 0.3 or newer) or else your own node; questions and discover go through your own node. At most one transmission every 5 seconds and 10 % airtime per hour, and the board itself refuses anything but a mesh packet on the mesh's own frequency. Bluetooth and the SDRs never transmit.
Config > Mesh sets the node name, the region (Europe, USA/Canada, Australia/NZ, or your own frequencies) and the Meshtastic preset; frequencies are worked out as the Meshtastic firmware does, and LoRa boards on USB get them pushed automatically. The sidebar's LoRa chat shows the latest messages, LoRa APRS beacons and LoRaWAN operators.
Radios (SDR)
Config > Radios (SDR) lists every RTL-SDR and HackRF on USB, and each one gets a job:
| Job | What it does |
|---|---|
| rtl_433 | Decodes 433/868 MHz sensors on the frequencies set below it (the classic setup) |
| rtl_433 on 868 MHz | Parks a second radio on 868 MHz (meters, alarms) so neither has to hop |
Receive only: every SDR process is built by one function that only accepts
receive tools (rtl_433, hackrf_info), so the HackRF's
transmit tool is never started. A HackRF needs sudo apt install hackrf soapysdr-module-hackrf.
Perimeter
Put ears around the property (garage, barn, gate; the ESP32 ear firmware or Home Assistant proxies) and give each a zone and a ring in Config > Ears: outer (edge of the property) or inner (near the house). BlueWatch's own radio is the inner zone "House". Alerts:
- Coming in: heard by an outer ear and then within 5 minutes by an inner one.
- Night visitor: a never-seen device by an outer ear in the quiet hours. By default BlueWatch learns them from the place itself (the quietest stretch of the last 14 days, 4-9 hours, else 23-06); they can also be set by hand.
Categorized and watched devices are expected and never alert.
Sites
A cabin, a workshop or a relative's house can run its own BlueWatch. In
Config > Sites, give each one a name and a site token, and list them on
your main BlueWatch with their address. The main one polls each site every
minute and shows its devices today, open alerts and drones in the sidebar;
drones at a site open the drone warning there too. Each site keeps its own
devices and alerts. Connect sites over a VPN (Tailscale, WireGuard), never an
open port; an https:// site is verified, or pinned by its certificate
fingerprint when it is self-signed.
HTTPS
Config > Security > HTTPS serves the dashboard over HTTPS on its own port
(8443 by default), beside plain HTTP, which the CYD display, ears and Home
Assistant keep using. Choose a self-signed certificate (download it and mark
it trusted on your phone or PC) or paste your own (Let's Encrypt with your own
domain, tailscale cert, your own CA). Browsers only allow desktop drone
alerts over HTTPS.
Never store
Config > Operations > Never store lists addresses BlueWatch must never record: your own phones, a neighbour who asked, a whole maker's address block (first 3-5 bytes). A listed device is not written, not shown and never alerts, and stored matches can be deleted.
Remote Ears
One radio only hears so far. An ear is another passive listener that reports what it hears to your BlueWatch, so devices in the garage or upstairs show up too, and Device Details shows which listener hears each device loudest. In practice, that tells you which room it is in.
- In Config > Ears, give the ear a name and create a token. The token is shown once. BlueWatch only keeps a fingerprint of it.
An ESP32, ESP32-S3 or ESP32-C3 board can be an ear on
its own with the bluewatch-ears-esp32 firmware (passive scan; set Wi-Fi, the
BlueWatch address, the token and a name over USB serial).
2. Connect a listener:
- Home Assistant: install the BlueWatch Ears integration and enter your BlueWatch address and the token. Every Bluetooth adapter and ESPHome Bluetooth proxy that Home Assistant knows about becomes a listener, named after the proxy.
- A spare Linux box or Raspberry Pi with BlueWatch installed:
macOS cannot be an ear, because it hides real Bluetooth addresses.bluewatch-ear --hub http://<bluewatch-address>:8080 --token bwear_... --name "Garage" - Just trying it out:
python3 tools/fake_ear.py --token bwear_...simulates three rooms and a device walking between them.
Ears only listen. They never connect to devices or transmit anything. You can pause or remove an ear at any time, and removing it makes its token stop working immediately.
The ear API is small: GET /api/ears/v1/hello checks a token, and
POST /api/ears/v1/heard delivers a batch of up to 400 observations. Both
take Authorization: Bearer <token>. See bluewatch/ears.py for the exact
format and limits.
Crowd
The Crowd page (/crowd) estimates how many people are around: right now,
through the last 24 hours or 7 days, and against the median for the same
time of day over the past week. BlueWatch counts the phones it heard at
-80 dBm or louder per 1, 5 or 10 minutes (a slider on the page): short
buckets catch people passing by, long ones show who stays. Phones change address every 15 minutes or so,
so two phone addresses that never overlap and are about as loud are counted
once. Watches, earbuds and other personal devices are shown as a second
line. Trackers, TVs, beacons and unidentified devices are left out.
Only the totals are stored (crowd_buckets); the count is worked out from
sightings BlueWatch already keeps, so the page has history from the start.
It is an estimate: people without a phone are missed, and neighbours are
counted. Changes are more telling than the level.
Wi-Fi Ears
Optional, and off by default. With a USB Wi-Fi adapter that supports monitor mode, BlueWatch listens to Wi-Fi management frames as well (beacons, probe responses and deauthentication frames). It never transmits. Of data frames it reads only which step of a Wi-Fi handshake (EAPOL) one is, never their content. The Raspberry Pi's own Wi-Fi cannot do monitor mode, so this needs a second adapter; MediaTek chips (mt76 driver, e.g. MT7612U or MT7921AU) work out of the box on Linux. Realtek adapters usually need out-of-tree drivers.
BLUEWATCH_WIFI_IFACE=wlan1 bluewatch # or: bluewatch --wifi-iface wlan1
BlueWatch puts the adapter in monitor mode itself and hops through channels
1-13 (set BLUEWATCH_WIFI_CHANNELS for 5 GHz). It refuses the interface the
machine is online through.
Unlike Bluetooth, ordinary networks and phones are not stored. Only matches become devices (radio "wifi" in Device Details):
| Match | Type |
|---|---|
Axon body camera networks (AB2-, AB3-, AB4-, AXON-), Flock setup networks, EZVIZ camera setup networks (EZVIZ_), DJI Osmo camera networks (osmo_); the makers' own address blocks of Flock, Axon, WatchGuard and Digital Ally (body cams), ShotSpotter (gunshot sensors), Arlo, Blink, i-PRO, Wyze, SimpliSafe, Avigilon, Axis, FLIR, GeoVision, Hanwha Vision, March Networks, Mobotix and Sunell; hidden / mini camera setup networks (the camera UID as name, ABCD-123456-ABCDE, and LookCam, HDWifiCam, YCC365, Sricam, Yoosee, Zosi, V380 prefixes); thermal optics (HIKMICRO_, Pulsar Stream Vision names) |
Camera |
| Address blocks of DJI, Skydio and Parrot; TBS Crossfire RC networks; drones' own networks (DJI Mavic, Mini, Spark, Tello, Phantom; Parrot Bebop, AR.Drone; 3DR Solo; Syma, Propel and more) | Drone |
| Address blocks of Luxottica (Ray-Ban/Oakley Meta), Rokid and Vuzix | Smart Glasses |
Icom IC-705 in access point mode (IC-705) |
Two-way Radio |
| Dashcam networks (VIOFO, BlackVue, 70mai, Thinkware, Nextbase, Vantrue, Rove, Redtiger) and the address blocks of BlackVue, 70mai and Thinkware; fleet cameras (Lytx, Samsara); in-vehicle routers (Cradlepoint, Sierra AirLink: patrol cars, but also buses and ambulances); car hotspots (BMW, Mercedes, GM, Nissan, CarLink); IOSiX truck loggers | Vehicle |
Sonos address blocks; Google Home in setup (GoogleHome1234) |
Speaker |
WiFi Pineapple (Pineapple_), ESP deauther (pwned), Pwnagotchi (its self-announcing beacon, with name and handshake count) |
Wi-Fi Attack Tool |
| Remote ID beacons (ASTM F3411 over Wi-Fi), decoded like the Bluetooth ones; French Direct Remote ID (position, height above takeoff, speed, course, takeoff point); DJI's older DroneID beacon; ExpressLRS setup networks | Drone |
A matched access point also shows what it says about itself: network type, internet access, venue and Hotspot 2.0 (set by the access point, not checked), and the standard elements it carries (WPA, WMM, WPS, ...).
Attacks that are not a device come as push alerts instead:
- a deauthentication flood (30 frames in 10 s from one sender, or 6 aimed at everyone at once, which routers almost never send);
- an evil twin (the same network name both open and password-protected);
- a beacon flood (40 access points never heard before within 10 s: fake networks from a beacon spammer);
- a Karma/MANA rogue access point (one transmitter answering probe requests as 5 or more different networks within a minute);
- handshake harvesting (one client starting a handshake with 5 or more
access points within a minute, or an access point sending the first
handshake message 4 times with no answer: how PMKIDs and handshakes are
collected to crack Wi-Fi passwords offline).
/api/wifishows the capture status and the latest alerts.
Trusted networks. List your own network names (and the neighbours') in Config > Alerts > Wi-Fi Alerts. For the first days (3 by default) every access point sending such a name is learned. After that, a new access point with that name alerts when it uses weaker security, comes from another maker or a made-up address, or is 15 dB louder than any known one. A new node from a known maker is learned quietly. BlueWatch never joins the network.
No adapter yet? --wifi-pcap capture.pcap replays a radiotap capture (for
example from tcpdump -i wlan1mon -w capture.pcap) through the same
recognition.
LoRaWAN Operators
With the bluewatch-lora listener firmware (Heltec V3, separate project,
receive only) set to preset lorawan or hop all, BlueWatch names the
LoRaWAN networks around you: every LoRaWAN data frame starts with the
device address in the clear, and the front of that address belongs to one
operator in the LoRa Alliance's NetID allocation table ("The Things
Network", "Netmore", "Lyse" and about 170 more). Each operator becomes one
device (type Network, radio "lora") with how many of its devices were heard
in the last hour. The payload is encrypted and never touched; join frames
and private NetIDs are skipped. The listener hears EU868 channel 1 at SF7,
so it catches a share of the traffic, not all of it.
Data Storage
Data is stored in ~/.local/share/bluewatch/bluewatch.db (SQLite).
Override location with environment variables:
BLUEWATCH_DATA_DIR- Directory for data filesBLUEWATCH_DB_PATH- Direct path to database file
Note: Heartbeat and pruning settings can be configured from the web UI (Settings > Operations) or via environment variables. GUI values take priority over env vars.
How It Works
Device Classification
BlueWatch classifies devices using multiple signals (in priority order):
- BLE Service UUIDs - Most accurate (Heart Rate = wearable, A2DP = audio, etc.)
- Device name patterns - "iPhone", "Galaxy", "AirPods", etc.
- Vendor OUI lookup - Apple, Samsung, Bose, etc.
Every automatic class gets a confidence grade, shown on Device Details (with what decided it) and as a small square next to the class in the device list (green high, amber medium, red low):
| Grade | Means | Examples |
|---|---|---|
| High | An ID registered to the maker, or an exact protocol | Drone Remote ID, AirTag / Find My, Flipper Zero, Fast Pair model, rtl_433 decodes |
| Medium | A product name, a maker with many products, or a shared service | "Skydio 2", a smart-lock maker's company ID, Heart Rate service |
| Low | A word in the name, a generic module or company ID, a guess | "iPhone" in a name, HC-05 serial module, vendor name only |
The grade can be set by hand in Device Details (the Confidence dropdown: High, Medium, Low, or Auto to go back to the classifier's grade).
Config > Alerts > Minimum Confidence keeps weak matches from raising type alerts. Drones and classes set by hand always alert, unless their confidence was set by hand: then that grade decides.
Randomized MACs
Modern devices randomize their MAC addresses for privacy. BlueWatch:
- Detects randomized MACs (locally administered bit)
- Hides them from the main device list (not useful for tracking)
- Shows a count of hidden randomized devices
Pattern Analysis
BlueWatch analyzes sighting timestamps to detect patterns:
- Time of day: Morning, Afternoon, Evening, Night
- Day of week: Weekdays, Weekends
- Frequency: Constant, Daily, Regular, Occasional, Rare
Example patterns: "Daily, evenings (5PM-9PM)", "Weekdays, morning (8AM-12PM)"
Device Correlation
BlueWatch detects devices that frequently appear together within a configurable time window. This can reveal:
- Devices owned by the same person (phone + smartwatch)
- People who travel together
- Devices that share a schedule
Proximity Zones
Based on RSSI signal strength, devices are classified into proximity zones:
- Immediate (> -50 dBm): Very close, within a few meters
- Near (-50 to -60 dBm): Nearby, same room
- Far (-60 to -70 dBm): Further away, adjacent rooms
- Remote (< -70 dBm): Distant, at edge of detection range
Dwell Time Analysis
Tracks how long devices spend in range by analyzing gaps between sightings. A configurable gap threshold (default 15 minutes) determines when a new "session" begins.
Prometheus Metrics
BlueWatch can expose metrics for Prometheus scraping. Enable by setting the BLUEWATCH_METRICS_PORT environment variable or the --metrics-port CLI flag.
# Via environment variable
export BLUEWATCH_METRICS_PORT=9199
# Via CLI
bluewatch --metrics-port 9199
Metrics are served at http://host:9199/metrics.
Available Metrics
| Metric | Type | Description |
|---|---|---|
bluewatch_scans_total |
Counter | Total scan cycles completed |
bluewatch_scan_errors_total |
Counter | Scan errors (label: scan_type) |
bluewatch_sightings_total |
Counter | Total device sightings recorded |
bluewatch_new_devices_total |
Counter | New unique devices discovered |
bluewatch_last_scan_devices |
Gauge | Devices in last scan (label: scan_type) |
bluewatch_devices_total |
Gauge | Unique devices in DB (label: bt_type) |
bluewatch_devices_active |
Gauge | Devices seen in last 5 minutes |
bluewatch_devices_watched |
Gauge | Watched device count |
bluewatch_devices_ignored |
Gauge | Ignored device count |
bluewatch_scan_duration_seconds |
Histogram | Scan cycle duration |
bluewatch_device_rssi_dbm |
Histogram | RSSI distribution of BLE devices |
bluewatch_build_info |
Info | Version information |
Grafana Dashboard
A ready-to-import Grafana dashboard is included at grafana/bluewatch-dashboard.json. Import it via the Grafana UI (Dashboards > Import) or the API:
curl -X POST "http://localhost:3000/api/dashboards/db" \
-H "Authorization: Bearer <your-api-key>" \
-H "Content-Type: application/json" \
-d "{\"dashboard\": $(cat grafana/bluewatch-dashboard.json), \"overwrite\": true}"
Troubleshooting
No devices found
- Ensure your adapter supports BLE (Bluetooth 4.0+) with the Central role, older adapters won't work
- Ensure Bluetooth adapter is enabled:
bluetoothctl power on - Check adapter is detected:
bluewatch --list-adapters - Run with sudo if permission denied
Docker issues
BLE scan error: org.freedesktop.DBus.Error.ServiceUnknown / The name org.bluez was not provided
BlueZ is not installed or not running on the host. Fix:
sudo apt install bluez # Debian/Ubuntu
sudo systemctl enable --now bluetooth
docker compose restart
General checklist:
- Ensure BlueZ is installed on the host (not just in the container)
- Verify Bluetooth service is running:
systemctl status bluetooth - Confirm your adapter is visible:
bluetoothctl list
Contributing
Contributions welcome! Please open an issue or PR on GitHub.
For credit for the bluehood-era contributors whose work this project's
scanning/persistence/notification plumbing was originally built on, see
CREDITS.md.
Questions or interest in the project? Reach out at [email protected].
Support
BlueWatch is free and always will be. If it is useful to you and you would like to say thanks, you can buy PolarPatch a coffee.
BlueWatch started out as bluehood by Danny McClelland. If you enjoy it, consider buying Danny a coffee too.
License
MIT License - See LICENSE for details.
Disclaimer
This tool is for educational purposes only. Be mindful of privacy laws in your jurisdiction when monitoring Bluetooth devices. The author is not responsible for any misuse of this software.
استكشف مشاريع مشابهة ومرتبطة
جارٍ التحميل…