Netmon is a network monitor that detects and displays changes in your home network.
It uses nmap
to detect devices and additionally used mDNS and NetBIOS to resolve hostnames.
The application consists of three independent parts:
- a JVM-based network scanner that publishes appearing and disappearing hosts using MQTT,
- a Kotlin/JS and Fritz2 based web interface that display the results, by subscribing to MQTT, and
- a Ansible-based installer that installs everyone on a Raspberry Pi (including the Pi 1 and Zero).
Netmon on a Raspberry Pi Zero with an 7-inch screen
Find detailed installation instructions in ansible/README.md.
./gradlew runShadow
./gradlew jsBrowserDevelopmentRun --continuous
If you installed Netmon on a Raspberry Pi, you can use the handy patch tool.
Just switch the directory, make patch executable, and
set the HOST
to work with:
cd ansible
chmod +x patch
export HOST=foo.local
SCANNER=1 ./patch
WEB_DISPLAY=1 ./patch
SCANNER=1 WEB_DISPLAY=1 ./patch
๐ก You can export your preferred settings, e.g.
export SCANNER=1 WEB_DISPLAY=1
to only have to type./patch
.
BROKER_HOST=test.mosquitto.org BROKER_PORT=1883
mqtt pub -t "dt/netmon/test/en0/10.10.10.0/24/host" -m '{
"event": "host",
"type": "up",
"host": {
"ip": "10.10.10.10",
"name": "test.local",
"status": "up",
"since": 1692455344
}
}' -r -h "$BROKER_HOST" -p "$BROKER_PORT"
BROKER_HOST=test.mosquitto.org BROKER_PORT=1883
mqtt sub -t dt/netmon/+/+/+/+/host -h "$BROKER_HOST" -p "$BROKER_PORT" -J
BROKER_HOST=test.mosquitto.org BROKER_PORT=1883
mqtt pub -t "dt/netmon/test/en0/10.10.10.0/24/host" -m '' -r -h "$BROKER_HOST" -p "$BROKER_PORT"
(cd mqtt.js && ./build.sh)
See mqtt.js/README.md for details.
Want to contribute? Awesome! The most basic way to show your support is to star the project, or to raise issues. You can also support this project by making a PayPal donation to ensure this journey continues indefinitely!
Thanks again for your support, it is much appreciated! ๐
MIT. See LICENSE for more details.