homebridge-network-presence
homebridge-network-presence copied to clipboard
Homebridge plugin that provides occupancy sensor for devices presence in your network
![](https://github.com/nitaybz/homebridge-network-presence/raw/master/branding/network_homebridge.png)
homebridge-network-presence
Homebridge plugin that provides occupancy sensors for devices presence on your network based on mac address or IP.
Requirements
check with: node -v
& homebridge -V
and update if needed
Description
This plugin was inspired by the old homebridge-people plugin by @PeteLawrence and it's fork, homebridge-people plus by @Glavin001.
I created this plugin due to the lack of updated, supported and maintained plugin to check devices on your current network.
With this plugin you can easily configure devices to monitor based on their mac address, ip address or hostname.
Installation
This plugin is HomeBridge verified and HOOBS certified and can be easily installed and configured through their UI.
If you don't use Homebridge UI or HOOBS, keep reading:
- Install homebridge using:
sudo npm install -g homebridge --unsafe-perm
- Install this plugin using:
sudo npm install -g homebridge-network-presence
- Update your configuration file. See
config-sample.json
in this repository for a sample.
Config File Example
"platforms": [
{
"platform": "NetworkPresence",
"interval": 10,
"threshold": 15,
"addressRange": "10.0.0.1-10.0.0.120",
"anyoneSensor": true,
"devices": [
{
"name": "my iPhone",
"mac": "cc:29:f5:3b:a2:f2",
"threshold": 5
},
{
"name": "my iPad",
"ip": "10.0.0.142"
},
{
"name": "my Apple Watch",
"hostname": "joes-applewatch.local"
}
],
"debug": false
}
]
Configurations Table
* advanced details below
Parameter | Description | Default | type |
---|---|---|---|
platform |
always "NetworkPresence" |
- | String |
interval |
Time in seconds between status polling for connected devices | 10 |
Integer |
threshold |
Time in minutes to wait before updating 'disconnected' status. important for not spamming your notifications or wrongly activating automation because the device has gone from the network for short time | 15 |
Integer |
addressRange |
(Optional) Define the address range of your devices to speed up discovery (e.g. "10.0.0.0/24", "10.0.0.1-10.0.0.30") | - | String |
anyoneSensor |
When set to true , the plugin will create extra accessory named "Anyone" to represent if ANY of the devices is detected |
false |
Boolean |
debug |
When set to true , the plugin will produce extra logs for debugging purposes |
false |
Boolean |
Devices | List of devices to monitor (with the below information) | Array | |
name |
Name of the accessory in HomeKit | String | |
mac |
Mac Address of the device e.g. cc:29:f5:3b:a2:f2 (can use ip or hostname instead) |
String | |
ip |
ip Address of the device (can use mac or hostname instead) |
String | |
hostname |
Hostname of the device (can use mac or ip instead) |
String | |
threshold |
device disconnect threshold (overrides platform threshold) | 15 |
Integer |
Issues & Debug
If you experience any issues with the plugins please refer to the Issues tab and check if your issue is already described there, if it doesn't, please report a new issue with as much detailed information as you can give (logs are crucial).
if you want to even speed up the process, you can add "debug": true
to your config, which will give me more details on the logs and speed up fixing the issue.
Support homebridge-network-presence
homebridge-network-presence is a free plugin under the MIT license. it was developed as a contribution to the homebridge/hoobs community with lots of love and thoughts. Creating and maintaining Homebridge plugins consume a lot of time and effort and if you would like to share your appreciation, feel free to "Star" or donate.