All Projects → ianperrin → Mmm Networkscanner

ianperrin / Mmm Networkscanner

Licence: mit
A module for MagicMirror which determines the status of devices on the network based on their MAC or IP address

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Mmm Networkscanner

IPpy
🚀 Ping IP addresses and domains in parallel to find the accessible and inaccessible ones.
Stars: ✭ 54 (-36.47%)
Mutual labels:  ping, ip-address
Icmplib
Easily forge ICMP packets and make your own ping and traceroute.
Stars: ✭ 58 (-31.76%)
Mutual labels:  ping
Pingmydyno
Keep Heroku dynos awake forever ☕️
Stars: ✭ 22 (-74.12%)
Mutual labels:  ping
Serviceping
A ping like utility for tcp services
Stars: ✭ 41 (-51.76%)
Mutual labels:  ping
Prettyping
`prettyping` is a wrapper around the standard `ping` tool, making the output prettier, more colorful, more compact, and easier to read.
Stars: ✭ 922 (+984.71%)
Mutual labels:  ping
Table Tennis Computer Vision
Apply computer vision to table tennis for match / training analysis
Stars: ✭ 48 (-43.53%)
Mutual labels:  ping
Traypingapp
📡 OSX tray application showing DNS and ping latency
Stars: ✭ 5 (-94.12%)
Mutual labels:  ping
Iplocation
Get ip location information.
Stars: ✭ 70 (-17.65%)
Mutual labels:  ip-address
Pc Optimization Hub
collection of various resources devoted to performance and input lag optimization
Stars: ✭ 55 (-35.29%)
Mutual labels:  ping
Androidnetworktools
Set of useful android network tools
Stars: ✭ 978 (+1050.59%)
Mutual labels:  ping
Pingg
Ping latency graphing CLI
Stars: ✭ 33 (-61.18%)
Mutual labels:  ping
Stabping
Continuously monitor your connection/ISP's latency & speed and view them in interactive charts
Stars: ✭ 8 (-90.59%)
Mutual labels:  ping
Tcpinginfoview Classic
TCP 连接延迟测试
Stars: ✭ 54 (-36.47%)
Mutual labels:  ping
Ping Blocker
Stop sites from tracking the links you visit through hyperlink auditing
Stars: ✭ 23 (-72.94%)
Mutual labels:  ping
Ving
🐸 A ping utility with nice output, with powerful traceroute and port probe.
Stars: ✭ 62 (-27.06%)
Mutual labels:  ping
Is Online
Check if the internet connection is up
Stars: ✭ 894 (+951.76%)
Mutual labels:  ping
Ipmonitor
IP Monitor is a simple application which monitors your public IP address for changes and lets you set different kinds of notifications such as email, audio, pop up or executing a command
Stars: ✭ 28 (-67.06%)
Mutual labels:  ip-address
Smartping
综合性网络质量(PING)检测工具,支持正/反向PING绘图、互PING拓扑绘图与报警、全国PING延迟地图与在线检测工具等功能
Stars: ✭ 1,031 (+1112.94%)
Mutual labels:  ping
Ultrasonic
Minimalist library for Ultrasonic Module HC-SR04, PING))) and Seeed SEN136B5B to Arduino
Stars: ✭ 77 (-9.41%)
Mutual labels:  ping
Ipnetwork
A library to work with CIDRs in rust
Stars: ✭ 64 (-24.71%)
Mutual labels:  ip-address

MMM-NetworkScanner

A module for MagicMirror which determines the status of devices on the network based on their MAC address. It can also look up devices by IP addresses or hostnames. Static IP addresses work more consistently.

Example

Installation

In your terminal, install arp-scan:

cd ~/
sudo apt-get install arp-scan   

Optionally, update the vendor database used by arp-scan:

cd /usr/share/arp-scan
sudo get-iab -v -u http://standards-oui.ieee.org/iab/iab.txt
sudo get-oui -v -u http://standards-oui.ieee.org/oui/oui.txt

Clone this repository into the MagicMirror Modules folder:

cd ~/MagicMirror/modules
git clone https://github.com/ianperrin/MMM-NetworkScanner.git

Install the dependencies (sudo, ping) in the MMM-NetworkScanner module folder:

cd ~/MagicMirror/modules/MMM-NetworkScanner
npm install

Add the module to the modules array in the config/config.js file:

    {
        module: 'MMM-NetworkScanner',
        position: 'top_left', 
        config: {
            // Optional config options
        }        
    },

Config Options

Option Default Description
devices [] an array of devices to be found on the network. See Device object
network -l optional a network mask to limit the scope of the network scan, i.e. 192.168.0.0/24. If omitted, or set to -l, the entire network will be scanned.
showUnknown true optional shows devices found on the network even if not specified in the devices option
showOffline true optional shows devices specified in the devices option even when offline
showLastSeen false optional shows when the device was last seen e.g. "Device Name - last seen 5 minutes ago"
keepAlive 180 optional how long (in seconds) a device should be considered 'alive' since it was last found on the network
updateInterval 20 optional how often (in seconds) the module should scan the network
sort true optional sorts the devices in alphabetical order when shown in the mirror
residents [] optional an array of names of the devices that should be monitored if they are online
occupiedCMD {} optional the notification to be sent if one of the devices in the residents array is found online. See Notification Example.
vacantCMD {} optional the notification to be sent if NONE of the devices in the residents array is found online. See Notification Example.
debug false optional adds extended messages to the log.
colored false optional determines whether devices are shown in the color defined in the devices section.
coloredSymbolOnly false optional shows only the devices symbol.
showLastSeenWhenOffline: false optional show last seen only when offline.

Device Object

The device object contains information about the devices to be found on the network.

Key Description Example
macAddress optional the MAC address of the device. aa:bb:cc:11:22:33
ipAddress optional the IP address or host name of the device. 192.168.0.1 or github.com
name optional the friendly name for the device. If omitted, the macAddress or ipAddress will be used. Phone or Router
icon optional the symbol to show next to the device. See Font Awesome cheatsheet. If omitted, question will be used. There are a huge number of icons to choose from. Here are some examples: globe, server, desktop, laptop, mobile, wifi.
color optional the color the device should be display with. #ff0000 for red

Note A device object should only contain either a macAddress or an ipAddress NOT both.

Generating the device array

The devices array can be generated by using arps2mm.sh from within the scripts folder. The output of the script will include all the devices found on the network, using the name of the vendor identified from the arp-scan result. Run the following script, edit the device names and icons then copy the array into the config file:

cd ~/MagicMirror/modules/MMM-NetworkScanner/scripts
chmod +x arps2mm.sh
./arps2mm.sh

Note Updating the vendor database is recommended before generating the device array. See the installation instructions for details.

Example Config

Simple example

Scans the network (using the default updateInterval) and display the status of the four specified devices:

    {
        module: "MMM-NetworkScanner",
        position: "top_left",
        header: "Who's home",
        config: {
            devices: [
                { macAddress: "1a:1b:1c:1a:1b:1c", name: "Dad", icon: "male"},
                { macAddress: "2a:2b:2c:2a:2b:2c", name: "Mum", icon: "female"},
                { macAddress: "3a:3b:3c:3a:3b:3c", name: "Son", icon: "male"},
                { macAddress: "4a:4b:4c:4a:4b:4c", name: "Daughter", icon: "female"}
            ],
            showUnknown: false
     }

Keep alive example

Scan every 5 seconds and only display the specified devices whether they are online or offline. Devices will continue to be shown as online (i.e. kept alive) for 5 mins after they are last found:

    {
        module: 'MMM-NetworkScanner',
        position: 'top_left', 
        config: {
            devices: [
                    { ipAddress: "github.com", name: "Github", icon: "globe"},
                    { macAddress: "1a:1b:1c:1a:1b:1c", name: "Server", icon: "server"},
                    { macAddress: "2a:2b:2c:2a:2b:2c", name: "Desktop", icon: "desktop"},
                    { ipAddress: "10.1.1.10", name: "Laptop", icon: "laptop"},
                    { macAddress: "4a:4b:4c:4a:4b:4c", name: "Mobile", icon: "mobile"},
                ],
            showUnknown: false,
            showOffline: true,
            keepAlive: 300,
            updateInterval: 5
        }        
    },

Notification example

As with the previous example, this scans every 5 seconds and only display the specified devices whether they are online or offline. Devices will continue to be shown as online (i.e. kept alive) for 5 mins after they are last found on the network.

In addition, the module will send a notification (occupiedCMD) to turn the monitor on when either Mobile or Laptop (the residents) are found on the network. Another notification (vacantCMD) will be sent when neither device is online:

    {
        module: 'MMM-NetworkScanner',
        position: 'top_left', 
        config: {
            devices: [
                    { ipAddress: "github.com", name: "Github", icon: "globe"},
                    { macAddress: "1a:1b:1c:1a:1b:1c", name: "Server", icon: "server"},
                    { macAddress: "2a:2b:2c:2a:2b:2c", name: "Desktop", icon: "desktop"},
                    { ipAddress: "10.1.1.10", name: "Laptop", icon: "laptop"},
                    { macAddress: "4a:4b:4c:4a:4b:4c", name: "Mobile", icon: "mobile"},
                ],
            showUnknown: false,
            showOffline: true,
            keepAlive: 300,
            updateInterval: 5,
            residents: ["Mobile", "Laptop"],
            occupiedCMD: {notification: 'REMOTE_ACTION', payload: {action: 'MONITORON'}},
            vacantCMD  : {notification: 'REMOTE_ACTION', payload: {action: 'MONITOROFF'}},

        }        
    },

NOTE The REMOTE_ACTION notifications (MONITORON and MONITOROFF) actions require the MMM-Remote-Control module to be installed.

Updating

To update the module to the latest version, use your terminal to go to your MMM-NetworkScanner module folder and type the following command:

cd ~/MagicMirror/modules/MMM-NetworkScanner
git pull
npm install

If you haven't changed the modules, this should work without any problems. Type git status to see your changes, if there are any, you can reset them with git reset --hard. After that, git pull should be possible.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].