Where to file issues with docker image: monitor.sh docker image github
Monitor source:
andrewjfreyer/monitor Github
Monitor forum thread:
Home Assistant forum thread
Bluetooth-based passive presence detection of beacons, cell phones, and any other bluetooth device. The system is useful for mqtt-based home automation.
When running the image, the default configuration is stored in /config. To use custom configuration, mount a local configuration directory to /config
$ docker run -it --rm --net=host --cap-add=NET_ADMIN -v /local/config/:/config monitor.sh
Use an empty local directory as a config dir - on first run the script will create empty configuration file that you have to edit:
known_beacon_addresses
known_static_addresses
mqtt_preferences
--net=host is needed so the script will have access to hci0 --cap-add=NET_ADMIN is needed so that the script can cycle the hci0 bluetooth interface
$ docker run -it -d --net=host --cap-add=NET_ADMIN -v /local/config/:/config monitor.sh
You can add different script options (refer to the script readme file)
$ docker run -it -d --net=host --cap-add=NET_ADMIN -v /local/config/:/config monitor.sh bash monitor.sh -b -g
$ docker run -it --rm --net=host --cap-add=NET_ADMIN -v /local/config/:/config monitor.sh bash monitor.sh -h
Here is a sample docker-compose file. You can drop the command if you don't need a custom command.
version: '3'
services:
monitor.sh:
image: kabturek/monitor.sh
container_name: monitor.sh
restart: always
volumes:
- /srv/monitor:/config
network_mode: host
cap_add:
- NET_ADMIN
command: bash monitor.sh -e -x -g -D /config
Running:
$ docker-compose up -d monitor.sh