this repository is no longer actively maintained
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.
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
sudo npm install -g homeean-presence --unsafe-perm
If you encounter problems with premissions, see here: https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally
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"
}
},
...
]
}
homeean-presence
# Put your config.json in the repository root!
# Build the image
docker build -t homeean-presence:latest .
# Run the image
docker run -it --net=host --name homeean-presence homeean-presence:latest
Attention: --net=host is required by the container to have access to the host subnet and bluetooth devices.
Set the enviroment variable LOG_LEVEL to DEBUG
LOG_LEVEL=DEBUG homeean-presence
- added support for nodejs v. 10
- improved logging
- fixed an issue with state update from webhook
- fixed timelock issue
- improved logging