detect presence at home with homeean
Branch: master
Clone or download
stfnhmplr
stfnhmplr bumped version
Latest commit 6b87920 Feb 5, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin fixed script path Jan 14, 2019
dist fixed timezone issues in log Feb 5, 2019
src fixed timezone issues in log Feb 5, 2019
test added good old ping for ext. ip adresses Jan 15, 2019
.gitignore iphone presence detection update Aug 29, 2018
README.md switched to arping and ble mac Jan 14, 2019
package-lock.json added good old ping for ext. ip adresses Jan 15, 2019
package.json bumped version Feb 5, 2019

README.md

homeean-presence

homeean-presence provides a simple way to detect presence at your home. For each person an IP device in the same network and a BLE device can be monitored. In addition, the presence state of a person can be manually set for a certain time via webhook.

If the status changes, a webhook can be triggered.

Installation

Raspbian/Debian/Ubuntu

sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev libpcap-dev
sudo setcap cap_net_raw+eip $(eval readlink -f `which node`)

see https://github.com/noble/bleno#prerequisites

the package is available via npm

sudo npm install -g homeean-presence --unsafe-perm

create a config.json in ~/homeean-presence

You can add as many person as you wish.

{
    "interval": 20,"
    threshold": 300,
    "port": 3000,
    "webhooks": {
        "absent": "https://webhook-for-absence",
        "present": "https://webhook-for-presence"
    },
    "persons": [
        {
            "name": "Your Name",
            "ip": "192.168.1.1",
            "ble": "AA:BB:CC:DD:EE:FF",
	        "webhooks": {
	            "absent": "https://webhook-for-absence",
	            "present": "https://webhook-for-presence"
            }
        },
        ...
    ]
}

run

homeean-presence

debug

LOG_LEVEL=DEBUG homeean-presence