projects
/
openhab-process.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Обработка команд увеличения/уменьшения громкости
[openhab-process.git]
/
mqtt-bt
/
bt-proximity
1
#!/bin/sh
2
3
. /etc/bt-proximity.conf
4
5
host=`hostname`
6
7
hciconfig hci0 up
8
9
cat $1 | while read mac user
10
do
11
12
if [ "$mac" != "" ]
13
then
14
l2ping -c 2 -t 10 $mac
15
if [ "$?" = "0" ]
16
then
17
mosquitto_pub -h $mqtt_host -p $mqtt_port -u $mqtt_user -P $mqtt_passwd -t $mqtt_topic/$user -m $host
18
logger -t bt-proximity "$mac ($user) detected by $host"
19
fi
20
fi
21
22
done