FireFly is a modular, multi-protocol IoT device discovery framework that allows you to scan your network for devices using several auto-discovery protocols:
- UPnP (SSDP)
- mDNS (via Zeroconf)
- WS-Discovery
It comes with a FastAPI backend that exposes a REST API for device discovery and a modern React front end built with Material-UI for a sleek and responsive user interface.
-
Multi-Protocol Discovery:
Discover IoT devices using UPnP, mDNS, and WS-Discovery. -
Modular Design:
Each protocol is implemented in its own module for easy maintenance and future extension. -
FastAPI Backend:
Provides a REST API endpoint (/api/discover
) to trigger scans and return discovery results in JSON format. -
Modern React Frontend:
A responsive UI built with React and Material-UI that lets you select protocols, adjust settings (e.g., timeout, mDNS service), and view discovered devices. -
Concurrently Run Backend and Frontend:
Option to run both services concurrently using tools likeconcurrently
for streamlined development.
- Python 3.7+
- Node.js & npm
- (Optional) Virtual Environment for Python dependencies
-
Create and Activate a Virtual Environment (Recommended):
python3 -m venv venv source venv/bin/activate
-
Install Python Dependencies:
pip install -r requirements.txt
-
Navigate to the Frontend Directory:
cd firefly
-
Install Node.js Dependencies:
npm install
-
Running the Application Option 1: Run Services Separately
- Start the Backend (from the project root):
python main.py
- Start the Frontend (from the firefly directory):
npm start
-
API Usage The FastAPI backend exposes an endpoint at:
http://<backend_ip>:8000/api/discover
Query parameters include:
protocol: Select a protocol (upnp, mdns, wsd, or all). timeout: Set the timeout in seconds. mdns_service: Specify the mDNS service type (or "All" to cycle through common services). For example:
http://<backend_ip>:8000/api/discover?protocol=upnp&timeout=5&mdns_service=_services._dns-sd._udp.local.
Contributing Contributions are welcome! Please feel free to open issues or submit pull requests. When contributing, try to follow the modular design of the project so that new discovery protocols or front-end enhancements integrate smoothly.