Skip to content

Commit

Permalink
Aling config options and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ianperrin committed Apr 29, 2018
1 parent 2d9da7b commit af2c06d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
1 change: 1 addition & 0 deletions MMM-NetworkScanner.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Module.register("MMM-NetworkScanner", {
// Default module config.
defaults: {
devices: [], // an array of device objects e.g. { macAddress: "aa:bb:cc:11:22:33", name: "DEVICE-NAME", icon: "FONT-AWESOME-ICON"}
network: "-l", // a Local Network IP mask to limit the mac address scan, i.e. `192.168.0.0/24`. Use `-l` for the entire localnet
showUnknown: true, // shows devices found on the network even if not specified in the 'devices' option
showOffline: true, // shows devices specified in the 'devices' option even when offline
showLastSeen: false, // shows when the device was last seen e.g. "Device Name - last seen 5 minutes ago"
Expand Down
23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,18 @@ Add the module to the modules array in the `config/config.js` file:
## Config Options
| **Option** | **Default** | **Description** |
| --- | --- | --- |
| `devices` | [] | an array of device objects e.g. { macAddress: "aa:bb:cc:11:22:33", name: "DEVICE-NAME", icon: "FONT-AWESOME-ICON"} |
| `network` | "" | Local Network IP mask, i.e. "192.168.0.0/24" |
| `showUnknown` | true | shows devices found on the network even if not specified in the `devices` option |
| `showOffline` | true | shows devices specified in the `devices` option even when offline |
| `showLastSeen` | false | shows when the device was last seen e.g. "Device Name - last seen 5 minutes ago" |
| `keepAlive` | 180 | how long (in seconds) a device should be considered 'alive' since it was last found on the network |
| `updateInterval` | 10 | how often (in seconds) the module should scan the network |
| `sort` | `true` | sorts the devices in alphabetical order when shown in the mirror |
| `residents` | [] | names of devices that should be monitored if they are in |
| `occupiedCMD` | `{notification: 'TEST', payload: {action: 'test-occupied'}}` | Notification to be sent when a resident returnes home e.g. `{notification: 'REMOTE_ACTION', payload: {action: 'MONITORON'}}` would turn the mirror on when a resedent returnes home. |
| `vacantCMD` | `{notification: 'TEST', payload: {action: 'test-occupied'}}` | Notification to be sent when all residents have left home. |
| `devices` | [] | an array of device objects e.g. `{ macAddress: "aa:bb:cc:11:22:33", name: "DEVICE-NAME", icon: "FONT-AWESOME-ICON"}` |
| `network` | "-l" | `optional` a Local Network IP mask to limit the mac address scan, i.e. `192.168.0.0/24`. If not specified the entire localnet 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` Notification to be sent when a resident returnes home e.g. `{notification: 'REMOTE_ACTION', payload: {action: 'MONITORON'}}` would turn the mirror on when a resedent returnes home. |
| `vacantCMD` | `{}` | `optional` Notification to be sent when all residents have left home. |
| `debug` | `false` | `optional` adds extended messages to the log. |

### Example Config
Scan every 5 seconds and only display the specified devices whether they are online or offline. Devices will be considered online for 5 mins after they are last seen:
Expand Down

0 comments on commit af2c06d

Please sign in to comment.