How to check presence of Beacon ?

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.
User avatar
emme
Posts: 936
Joined: Monday 27 June 2016 11:02
Target OS: Raspberry Pi
Domoticz version: latest
Location: Milano, Italy
Contact:

Re: How to check presence of Beacon ?

Post by emme » Sunday 22 July 2018 9:39

does the service quits or is it still alive?
by issuing a systemctl status check_beacon_presence you sould get something like:
Active: active (running)
and not
Active: active (dead)
or
Active: kill
or something else

if so... the script encounter an error and must be checked

most of the times errors are generated by interface (hci0) unavailability
if you have other applications that use hci0 (even issuing a hcitool lescan while the service is running will hang the service) you have to remeber to reset the interface afer each use to get the service work back again

Due to these issues I moved to nodeRed to check beacons and it works quite good!!
ciao
M
The most dangerous phrase in any language is:
"We always done this way"

redfirebrooks
Posts: 21
Joined: Sunday 07 January 2018 16:36
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: How to check presence of Beacon ?

Post by redfirebrooks » Monday 23 July 2018 13:27

Hello,

I bought 2 nut find 3 and i'd like to use them as beacon.
I tried to follow the tutorial here https://www.domoticz.com/wiki/Presence_ ... _Beacon%29
but I have this message when testing ;

Code: Select all

pi@domoticz:~ $ sudo python test_beacon.py
Traceback (most recent call last):
  File "test_beacon.py", line 31, in <module>
    import bluetooth._bluetooth as bluez
ImportError: No module named bluetooth._bluetooth
I have a RPI3

User avatar
emme
Posts: 936
Joined: Monday 27 June 2016 11:02
Target OS: Raspberry Pi
Domoticz version: latest
Location: Milano, Italy
Contact:

Re: How to check presence of Beacon ?

Post by emme » Monday 23 July 2018 14:14

looks like you miss the bluetooth stack for python

try with

Code: Select all

sudo apt-get update
sudo apt-get install python-pip python-dev ipython
sudo apt-get install bluetooth libbluetooth-dev
sudo pip install pybluez
The most dangerous phrase in any language is:
"We always done this way"

redfirebrooks
Posts: 21
Joined: Sunday 07 January 2018 16:36
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: How to check presence of Beacon ?

Post by redfirebrooks » Monday 23 July 2018 14:31

Thanks, but still no luck

Code: Select all

pi@domoticz:~ $ sudo python test_beacon.py
Traceback (most recent call last):
  File "test_beacon.py", line 33, in <module>
    import requests
ImportError: No module named requests
Ok solved installing some more packages

Running test_beacon.py I have endless lines...

Code: Select all

2018-07-23 19:14:16,543 - root - DEBUG - Tag 56:71:82:fd:19:12 is back after 0 sec. (Max 0). RSSI -78. DATA (-36,)
2018-07-23 19:14:16,570 - root - DEBUG - Tag 65:21:da:b6:04:12 is back after 0 sec. (Max 0). RSSI -59. DATA (0,)
2018-07-23 19:14:16,680 - root - DEBUG - Tag da:06:c2:e1:01:15 is back after 0 sec. (Max 0). RSSI -62. DATA (53,)
2018-07-23 19:14:16,751 - root - DEBUG - Tag 65:21:da:b6:04:12 is back after 0 sec. (Max 0). RSSI -59. DATA (0,)
2018-07-23 19:14:16,795 - root - DEBUG - Tag 56:71:82:fd:19:12 is back after 0 sec. (Max 0). RSSI -68. DATA (-36,)
2018-07-23 19:14:16,830 - root - DEBUG - Tag 47:78:82:9e:69:92 is back after 0 sec. (Max 0). RSSI -81. DATA (-53,)
2018-07-23 19:14:16,932 - root - DEBUG - Tag 65:21:da:b6:04:12 is back after 0 sec. (Max 0). RSSI -59. DATA (0,)
2018-07-23 19:14:16,965 - root - DEBUG - Tag 47:78:82:9e:69:92 is back after 0 sec. (Max 0). RSSI -88. DATA (-53,)
2018-07-23 19:14:17,015 - root - DEBUG - Tag c2:89:4e:74:07:0b is back after 1 sec. (Max 2). RSSI -89. DATA (-10,)
2018-07-23 19:14:17,056 - root - DEBUG - Tag 56:71:82:fd:19:12 is back after 0 sec. (Max 0). RSSI -79. DATA (-36,)
2018-07-23 19:14:17,100 - root - DEBUG - Tag 47:78:82:9e:69:92 is back after 0 sec. (Max 0). RSSI -82. DATA (-53,)
2018-07-23 19:14:17,115 - root - DEBUG - Tag 65:21:da:b6:04:12 is back after 0 sec. (Max 0). RSSI -59. DATA (0,)
2018-07-23 19:14:17,190 - root - DEBUG - Tag da:06:c2:e1:01:15 is back after 0 sec. (Max 0). RSSI -62. DATA (53,)
2018-07-23 19:14:17,233 - root - DEBUG - Tag 47:78:82:9e:69:92 is back after 0 sec. (Max 0). RSSI -76. DATA (-53,)
2018-07-23 19:14:17,299 - root - DEBUG - Tag 65:21:da:b6:04:12 is back after 0 sec. (Max 0). RSSI -60. DATA (0,)
2018-07-23 19:14:17,312 - root - DEBUG - Tag 56:71:82:fd:19:12 is back after 0 sec. (Max 0). RSSI -71. DATA (-36,)
2018-07-23 19:14:17,363 - root - DEBUG - Tag 47:78:82:9e:69:92 is back after 0 sec. (Max 0). RSSI -85. DATA (-53,)
2018-07-23 19:14:17,443 - root - DEBUG - Tag da:06:c2:e1:01:15 is back after 0 sec. (Max 0). RSSI -63. DATA (53,)
2018-07-23 19:14:17,481 - root - DEBUG - Tag 65:21:da:b6:04:12 is back after 0 sec. (Max 0). RSSI -61. DATA (0,)
2018-07-23 19:14:17,499 - root - DEBUG - Tag 47:78:82:9e:69:92 is back after 0 sec. (Max 0). RSSI -87. DATA (-53,)
2018-07-23 19:14:17,572 - root - DEBUG - Tag 56:71:82:fd:19:12 is back after 0 sec. (Max 0). RSSI -82. DATA (-36,)
2018-07-23 19:14:17,629 - root - DEBUG - Tag 47:78:82:9e:69:92 is back after 0 sec. (Max 0). RSSI -85. DATA (-53,)
2018-07-23 19:14:17,665 - root - DEBUG - Tag 65:21:da:b6:04:12 is back after 0 sec. (Max 0). RSSI -61. DATA (0,)
2018-07-23 19:14:17,698 - root - DEBUG - Tag da:06:c2:e1:01:15 is back after 0 sec. (Max 0). RSSI -62. DATA (53,)
2018-07-23 19:14:17,764 - root - DEBUG - Tag 47:78:82:9e:69:92 is back after 0 sec. (Max 0). RSSI -82. DATA (-53,)
2018-07-23 19:14:17,825 - root - DEBUG - Tag c2:89:4e:74:07:0b is back after 0 sec. (Max 2). RSSI -88. DATA (-10,)
2018-07-23 19:14:17,838 - root - DEBUG - Tag 56:71:82:fd:19:12 is back after 0 sec. (Max 0). RSSI -82. DATA (-36,)
2018-07-23 19:14:17,851 - root - DEBUG - Tag 65:21:da:b6:04:12 is back after 0 sec. (Max 0). RSSI -49. DATA (0,)
2018-07-23 19:14:17,895 - root - DEBUG - Tag 47:78:82:9e:69:92 is back after 0 sec. (Max 0). RSSI -73. DATA (-53,)
2018-07-23 19:14:17,953 - root - DEBUG - Tag da:06:c2:e1:01:15 is back after 0 sec. (Max 0). RSSI -64. DATA (53,)
2018-07-23 19:14:18,027 - root - DEBUG - Tag 47:78:82:9e:69:92 is back after 0 sec. (Max 0). RSSI -70. DATA (-53,)
2018-07-23 19:14:18,032 - root - DEBUG - Tag 65:21:da:b6:04:12 is back after 0 sec. (Max 0). RSSI -65. DATA (0,)
2018-07-23 19:14:18,097 - root - DEBUG - Tag 56:71:82:fd:19:12 is back after 0 sec. (Max 0). RSSI -80. DATA (-36,)
2018-07-23 19:14:18,159 - root - DEBUG - Tag 47:78:82:9e:69:92 is back after 0 sec. (Max 0). RSSI -88. DATA (-53,)
2018-07-23 19:14:18,208 - root - DEBUG - Tag da:06:c2:e1:01:15 is back after 0 sec. (Max 0). RSSI -62. DATA (53,)
2018-07-23 19:14:18,213 - root - DEBUG - Tag 65:21:da:b6:04:12 is back after 0 sec. (Max 0). RSSI -64. DATA (0,)
2018-07-23 19:14:18,291 - root - DEBUG - Tag 47:78:82:9e:69:92 is back after 0 sec. (Max 0). RSSI -83. DATA (-53,)
2018-07-23 19:14:18,359 - root - DEBUG - Tag 56:71:82:fd:19:12 is back after 0 sec. (Max 0). RSSI -71. DATA (-36,)
2018-07-23 19:14:18,423 - root - DEBUG - Tag 47:78:82:9e:69:92 is back after 0 sec. (Max 0). RSSI -83. DATA (-53,)
2018-07-23 19:14:18,585 - root - DEBUG - Tag 65:21:da:b6:04:12 is back after 0 sec. (Max 0). RSSI -58. DATA (0,)
2018-07-23 19:14:18,617 - root - DEBUG - Tag 56:71:82:fd:19:12 is back after 0 sec. (Max 0). RSSI -82. DATA (-36,)
2018-07-23 19:14:18,637 - root - DEBUG - Tag c2:89:4e:74:07:0b is back after 0 sec. (Max 2). RSSI -98. DATA (-10,)
2018-07-23 19:14:18,688 - root - DEBUG - Tag 47:78:82:9e:69:92 is back after 0 sec. (Max 0). RSSI -82. DATA (-53,)
2018-07-23 19:14:18,722 - root - DEBUG - Tag da:06:c2:e1:01:15 is back after 0 sec. (Max 0). RSSI -46. DATA (53,)
How should I select the NUT beacon ?

Frucoboti
Posts: 14
Joined: Thursday 17 May 2018 1:18
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: How to check presence of Beacon ?

Post by Frucoboti » Sunday 12 August 2018 23:04

emme wrote:
Sunday 22 July 2018 9:39
does the service quits or is it still alive?
by issuing a systemctl status check_beacon_presence you sould get something like:
Active: active (running)
and not
Active: active (dead)
or
Active: kill
or something else

if so... the script encounter an error and must be checked

most of the times errors are generated by interface (hci0) unavailability
if you have other applications that use hci0 (even issuing a hcitool lescan while the service is running will hang the service) you have to remeber to reset the interface afer each use to get the service work back again

Due to these issues I moved to nodeRed to check beacons and it works quite good!!
ciao
M
Hello, thanks for your answer. I have been on holidays since today.

I have been seeing that something in my Raspbian happens every hour, at hour:00 time. Then the script stops without exiting or anything:
Spoiler: show
2018-08-12 21:59:59,356 - root - DEBUG - Tag Tag_PasFco Detected c4:ab:d1:fd:87:55 - RSSI (-70,) - DATA unknown (85,)
2018-08-12 21:59:59,997 - root - DEBUG - Tag Tag_PasFco Detected c4:ab:d1:fd:87:55 - RSSI (-63,) - DATA unknown (85,)
2018-08-12 22:00:00,317 - root - DEBUG - Tag Tag_PasFco Detected c4:ab:d1:fd:87:55 - RSSI (-56,) - DATA unknown (85,)
2018-08-12 22:00:00,636 - root - DEBUG - Tag Tag_PasFco Detected c4:ab:d1:fd:87:55 - RSSI (-72,) - DATA unknown (85,)
2018-08-12 22:00:00,961 - root - DEBUG - Tag Tag_PasFco Detected c4:ab:d1:fd:87:55 - RSSI (-62,) - DATA unknown (85,)
2018-08-12 22:00:01,288 - root - DEBUG - Tag Tag_PasFco Detected c4:ab:d1:fd:87:55 - RSSI (-79,) - DATA unknown (85,)
2018-08-12 22:00:01,933 - root - DEBUG - Tag Tag_PasFco Detected c4:ab:d1:fd:87:55 - RSSI (-60,) - DATA unknown (85,)
2018-08-12 22:00:02,584 - root - DEBUG - Tag Tag_PasFco Detected c4:ab:d1:fd:87:55 - RSSI (-77,) - DATA unknown (85,)
2018-08-12 22:00:02,903 - root - DEBUG - Tag Tag_PasFco Detected c4:ab:d1:fd:87:55 - RSSI (-70,) - DATA unknown (85,)
2018-08-12 22:00:02,989 - root - DEBUG - Tag Tag_Mami Detected d6:19:04:59:11:d6 - RSSI (-81,) - DATA unknown (-42,)
2018-08-12 22:00:03,221 - root - DEBUG - Tag Tag_PasFco Detected c4:ab:d1:fd:87:55 - RSSI (-60,) - DATA unknown (85,)
2018-08-12 22:00:29,258 - root - WARNING - Tag Tag_Papi not seen since 34 sec => update absence
2018-08-12 22:00:29,273 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 192.168.1.125
2018-08-12 22:00:29,282 - requests.packages.urllib3.connectionpool - DEBUG - http://192.168.1.125:8090 "GET /json.htm?type=command&dparam=updateuservariable&idx=4&vname=Tag_Papi&vtype=2&vvalue=AWAY HTTP/1.1" 200 58
2018-08-12 22:00:29,289 - root - DEBUG - <Thread(Thread-13, started daemon 1969222768)> -> <Response [200]>
2018-08-12 22:00:34,263 - root - WARNING - Tag Tag_Mami not seen since 31 sec => update absence
2018-08-12 22:00:34,270 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 192.168.1.125
2018-08-12 22:00:34,270 - root - WARNING - Tag Tag_PasFco not seen since 31 sec => update absence
2018-08-12 22:00:34,281 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 192.168.1.125
2018-08-12 22:00:34,284 - requests.packages.urllib3.connectionpool - DEBUG - http://192.168.1.125:8090 "GET /json.htm?type=command&dparam=updateuservariable&idx=3&vname=Tag_Mami&vtype=2&vvalue=AWAY HTTP/1.1" 200 58
2018-08-12 22:00:34,289 - requests.packages.urllib3.connectionpool - DEBUG - http://192.168.1.125:8090 "GET /json.htm?type=command&dparam=updateuservariable&idx=7&vname=Tag_PasFco&vtype=2&vvalue=AWAY HTTP/1.1" 200 58
2018-08-12 22:00:34,290 - root - DEBUG - <Thread(Thread-14, started daemon 1969222768)> -> <Response [200]>
2018-08-12 22:00:34,294 - root - DEBUG - <Thread(Thread-15, started daemon 1958737008)> -> <Response [200]>
I can paste full log from the last start of the service, but I think that there is anything special, all normal. The last lines are the above, and since this Response 200, no more...

The service still running:
Spoiler: show
pi@raspberrypi:~ $ sudo systemctl status check_beacon_presence.service
* check_beacon_presence.service - check_beacon_presence Service
Loaded: loaded (/lib/systemd/system/check_beacon_presence.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2018-08-12 21:42:02 CEST; 1h 15min ago
Main PID: 19870 (check_beacon_pr)
CGroup: /system.slice/check_beacon_presence.service
`-19870 /usr/bin/python /usr/local/bin/check_beacon_presence.py

ago 12 21:42:02 raspberrypi systemd[1]: Started check_beacon_presence Service.
ago 12 21:42:03 raspberrypi sudo[19880]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/local/bin/hciconfig hci0 down
ago 12 21:42:03 raspberrypi sudo[19880]: pam_unix(sudo:session): session opened for user root by (uid=0)
ago 12 21:42:03 raspberrypi sudo[19880]: pam_unix(sudo:session): session closed for user root
ago 12 21:42:03 raspberrypi sudo[19889]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/local/bin/hciconfig hci0 up
ago 12 21:42:03 raspberrypi sudo[19889]: pam_unix(sudo:session): session opened for user root by (uid=0)
ago 12 21:42:03 raspberrypi sudo[19889]: pam_unix(sudo:session): session closed for user root
ago 12 21:42:03 raspberrypi sudo[19898]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/local/bin/hciconfig
ago 12 21:42:03 raspberrypi sudo[19898]: pam_unix(sudo:session): session opened for user root by (uid=0)
ago 12 21:42:03 raspberrypi sudo[19898]: pam_unix(sudo:session): session closed for user root
And daemon.log shows:
Spoiler: show
Aug 12 21:42:02 raspberrypi systemd[1]: Started check_beacon_presence Service.
Aug 12 21:44:00 raspberrypi mosquitto[380]: 1534103040: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
Aug 12 21:46:52 raspberrypi systemd[1]: Started Session c4 of user pi.
Aug 12 22:14:01 raspberrypi mosquitto[380]: 1534104841: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
Aug 12 22:44:02 raspberrypi mosquitto[380]: 1534106642: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
I am using internal RP3 BT, and acquiring info for Xiaomi Mi Flower Plan too, with another script that no stops never.

How can I check what is happening every hour?

BTW, someone knows a better way to do the same?

Lot of thanks.

User avatar
emme
Posts: 936
Joined: Monday 27 June 2016 11:02
Target OS: Raspberry Pi
Domoticz version: latest
Location: Milano, Italy
Contact:

Re: How to check presence of Beacon ?

Post by emme » Thursday 16 August 2018 17:08

uh... do you have another script that uses hci (bluetooth LE interface) for doing something else?

that could be the issue! the script uses hci in exclusive mode, if someting else uses the same hci it would be unavailable to the script since its reset

I see by the log that tah_papi and tag_mami are coorectly setted as AWAY (response 200)
...I do believe the problem is on the interface unavailability.... can you try to stop the other script for a couple of days?



P.S.
are you italian?
The most dangerous phrase in any language is:
"We always done this way"

Grinders
Posts: 6
Joined: Tuesday 28 August 2018 10:25
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: How to check presence of Beacon ?

Post by Grinders » Saturday 01 September 2018 14:59

Hello everybody. It is worth Domoticz Version: 4.9957 on Pi3. I use 3 pieces of NUT mini.
Installed the script, everything works great. Everything is determined instantly. Only sometimes the NUT mini is lost from the connection (implying that the weak built-in Bluetooth module). I'll try to buy an external one.
A single problem and very global for me with which I encountered and only on the 2nd day figured out (as a novice in this). The xiaomi agar motion sensors stop working, when the check_beacon_presence.py script runs. More precisely, everything works, out of 100% of what triggered the motion sensor, it determines only 15-20% (in comparison with the application mihome). I noticed it right away, because the light stopped working according to the script from the motion sensor. Then I noticed that Domoticz does not see all the temperature sensors. Only the script stops and everything immediately works like a clock.
What could it be? Help me please.
I used the original script check_beacon_presence.py with custom variables, as written in the wiki, then created virtual switches and changed the script as written earlier in this thread (on / off, http line). And so and so the result is one, the Domoticz system turns out to start to slow down. Errors do not produce the script (checked logs). Domoticz does not write anything to the log from errors. Where to look for the problem so far I can not even figure out. Can someone tell me.

User avatar
Ascari
Posts: 36
Joined: Thursday 28 September 2017 21:35
Target OS: Raspberry Pi
Domoticz version: 4.9
Location: Belgium
Contact:

Re: How to check presence of Beacon ?

Post by Ascari » Tuesday 04 September 2018 17:12

Hello all,

I want to use the internal bluetooh of my rpi 3b+ but I find nothing.
Somebody know how I can do ?

When I do the install on my old rpi with usb jey it's work, any adaption needed to use ineternal chips ?

Thx
pi@raspberrypi:~ $ sudo python test_beacon.py
2018-09-04 14:49:00,353 - root - DEBUG - Ok hci0 interface Up n running !
2018-09-04 14:49:00,354 - root - DEBUG - Connect to bluetooth device 0
hci0: Type: BR/EDR Bus: UART
BD Address: B8:27:EB:50:84:25 ACL MTU: 1021:8 SCO MTU: 64:1
UP RUNNING
RX bytes:1535 acl:0 sco:0 events:95 errors:0
TX bytes:3543 acl:0 sco:0 commands:95 errors:0

The installation process.
Spoiler: show
pi@raspberrypi:~ $ sudo apt-get update
Get:1 http://archive.raspberrypi.org/debian stretch InRelease [25.3 kB]
Get:2 http://raspbian.raspberrypi.org/raspbian stretch InRelease [15.0 kB]
Get:3 http://archive.raspberrypi.org/debian stretch/main armhf Packages [174 kB]
Fetched 215 kB in 0s (247 kB/s)
Reading package lists... Done
pi@raspberrypi:~ $ sudo apt-get install -y libusb-dev libdbus-1-dev libglib2.0-d ev libudev-dev libical-dev libreadline-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libudev-dev is already the newest version (232-25+deb9u4).
The following additional packages will be installed:
icu-devtools libglib2.0-bin libical2 libicu-dev libpcre16-3 libpcre3-dev
libpcre32-3 libpcrecpp0v5 libtinfo-dev
Suggested packages:
libglib2.0-doc icu-doc readline-doc
The following NEW packages will be installed:
icu-devtools libdbus-1-dev libglib2.0-bin libglib2.0-dev libical-dev
libical2 libicu-dev libpcre16-3 libpcre3-dev libpcre32-3 libpcrecpp0v5
libreadline-dev libtinfo-dev libusb-dev
0 upgraded, 14 newly installed, 0 to remove and 32 not upgraded.
Need to get 22.3 MB of archives.
After this operation, 88.1 MB of additional disk space will be used.
Get:1 http://mirror.linux.pizza/raspbian stretch/main armhf libpcrecpp0v5 armhf 2:8.39-3 [149 kB]
Get:2 http://mirror.linux.pizza/raspbian stretch/main armhf icu-devtools armhf 5 7.1-6+deb9u2 [157 kB]
Get:3 http://mirror.linux.pizza/raspbian stretch/main armhf libdbus-1-dev armhf 1.10.26-0+deb9u1 [201 kB]
Get:4 http://mirror.linux.pizza/raspbian stretch/main armhf libglib2.0-bin armhf 2.50.3-2 [1,608 kB]
Get:5 http://mirror.linux.pizza/raspbian stretch/main armhf libpcre16-3 armhf 2: 8.39-3 [235 kB]
Get:6 http://mirror.linux.pizza/raspbian stretch/main armhf libpcre32-3 armhf 2: 8.39-3 [227 kB]
Get:7 http://mirror.linux.pizza/raspbian stretch/main armhf libpcre3-dev armhf 2 :8.39-3 [565 kB]
Get:8 http://mirror.linux.pizza/raspbian stretch/main armhf libglib2.0-dev armhf 2.50.3-2 [2,775 kB]
Get:9 http://mirror.linux.pizza/raspbian stretch/main armhf libical2 armhf 2.0.0 -0.5+b1 [164 kB]
Get:10 http://mirror.linux.pizza/raspbian stretch/main armhf libicu-dev armhf 57 .1-6+deb9u2 [15.8 MB]
Get:11 http://mirror.linux.pizza/raspbian stretch/main armhf libical-dev armhf 2 .0.0-0.5+b1 [203 kB]
Get:12 http://mirror.linux.pizza/raspbian stretch/main armhf libtinfo-dev armhf 6.0+20161126-1+deb9u2 [65.6 kB]
Get:13 http://mirror.linux.pizza/raspbian stretch/main armhf libreadline-dev arm hf 7.0-3 [109 kB]
Get:14 http://mirror.linux.pizza/raspbian stretch/main armhf libusb-dev armhf 2: 0.1.12-30 [35.4 kB]
Fetched 22.3 MB in 5s (4,368 kB/s)
Selecting previously unselected package libpcrecpp0v5:armhf.
(Reading database ... 35340 files and directories currently installed.)
Preparing to unpack .../00-libpcrecpp0v5_2%3a8.39-3_armhf.deb ...
Unpacking libpcrecpp0v5:armhf (2:8.39-3) ...
Selecting previously unselected package icu-devtools.
Preparing to unpack .../01-icu-devtools_57.1-6+deb9u2_armhf.deb ...
Unpacking icu-devtools (57.1-6+deb9u2) ...
Selecting previously unselected package libdbus-1-dev:armhf.
Preparing to unpack .../02-libdbus-1-dev_1.10.26-0+deb9u1_armhf.deb ...
Unpacking libdbus-1-dev:armhf (1.10.26-0+deb9u1) ...
Selecting previously unselected package libglib2.0-bin.
Preparing to unpack .../03-libglib2.0-bin_2.50.3-2_armhf.deb ...
Unpacking libglib2.0-bin (2.50.3-2) ...
Selecting previously unselected package libpcre16-3:armhf.
Preparing to unpack .../04-libpcre16-3_2%3a8.39-3_armhf.deb ...
Unpacking libpcre16-3:armhf (2:8.39-3) ...
Selecting previously unselected package libpcre32-3:armhf.
Preparing to unpack .../05-libpcre32-3_2%3a8.39-3_armhf.deb ...
Unpacking libpcre32-3:armhf (2:8.39-3) ...
Selecting previously unselected package libpcre3-dev:armhf.
Preparing to unpack .../06-libpcre3-dev_2%3a8.39-3_armhf.deb ...
Unpacking libpcre3-dev:armhf (2:8.39-3) ...
Selecting previously unselected package libglib2.0-dev.
Preparing to unpack .../07-libglib2.0-dev_2.50.3-2_armhf.deb ...
Unpacking libglib2.0-dev (2.50.3-2) ...
Selecting previously unselected package libical2:armhf.
Preparing to unpack .../08-libical2_2.0.0-0.5+b1_armhf.deb ...
Unpacking libical2:armhf (2.0.0-0.5+b1) ...
Selecting previously unselected package libicu-dev.
Preparing to unpack .../09-libicu-dev_57.1-6+deb9u2_armhf.deb ...
Unpacking libicu-dev (57.1-6+deb9u2) ...
Selecting previously unselected package libical-dev:armhf.
Preparing to unpack .../10-libical-dev_2.0.0-0.5+b1_armhf.deb ...
Unpacking libical-dev:armhf (2.0.0-0.5+b1) ...
Selecting previously unselected package libtinfo-dev:armhf.
Preparing to unpack .../11-libtinfo-dev_6.0+20161126-1+deb9u2_armhf.deb ...
Unpacking libtinfo-dev:armhf (6.0+20161126-1+deb9u2) ...
Selecting previously unselected package libreadline-dev:armhf.
Preparing to unpack .../12-libreadline-dev_7.0-3_armhf.deb ...
Unpacking libreadline-dev:armhf (7.0-3) ...
Selecting previously unselected package libusb-dev.
Preparing to unpack .../13-libusb-dev_2%3a0.1.12-30_armhf.deb ...
Unpacking libusb-dev (2:0.1.12-30) ...
Setting up libdbus-1-dev:armhf (1.10.26-0+deb9u1) ...
Setting up libical2:armhf (2.0.0-0.5+b1) ...
Processing triggers for install-info (6.3.0.dfsg.1-1+b1) ...
Processing triggers for libglib2.0-0:armhf (2.50.3-2) ...
No schema files found: doing nothing.
Setting up libtinfo-dev:armhf (6.0+20161126-1+deb9u2) ...
Setting up libusb-dev (2:0.1.12-30) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Setting up libreadline-dev:armhf (7.0-3) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up libpcrecpp0v5:armhf (2:8.39-3) ...
Setting up libpcre32-3:armhf (2:8.39-3) ...
Setting up icu-devtools (57.1-6+deb9u2) ...
Setting up libpcre16-3:armhf (2:8.39-3) ...
Setting up libglib2.0-bin (2.50.3-2) ...
Setting up libpcre3-dev:armhf (2:8.39-3) ...
Setting up libicu-dev (57.1-6+deb9u2) ...
Setting up libglib2.0-dev (2.50.3-2) ...
Setting up libical-dev:armhf (2.0.0-0.5+b1) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
pi@raspberrypi:~ $ sudo mkdir bluez
pi@raspberrypi:~ $ cd bluez
pi@raspberrypi:~/bluez $ sudo wget http://www.kernel.org/pub/linux/bluetooth/blu ez-5.9.tar.xz
--2018-09-04 14:08:43-- http://www.kernel.org/pub/linux/bluetooth/bluez-5.9.tar .xz
Resolving www.kernel.org (www.kernel.org)... 147.75.44.153, 2604:1380:4090:1700: :1
Connecting to www.kernel.org (www.kernel.org)|147.75.44.153|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://www.kernel.org/pub/linux/blueto ... 5.9.tar.xz [following ]
--2018-09-04 14:08:44-- https://www.kernel.org/pub/linux/bluetooth/bluez-5.9.ta r.xz
Connecting to www.kernel.org (www.kernel.org)|147.75.44.153|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://mirrors.edge.kernel.org/pub/lin ... 5.9.tar.xz [ following]
--2018-09-04 14:08:44-- https://mirrors.edge.kernel.org/pub/linux/bluetooth/blu ez-5.9.tar.xz
Resolving mirrors.edge.kernel.org (mirrors.edge.kernel.org)... 147.75.101.1, 260 4:1380:2001:3900::1
Connecting to mirrors.edge.kernel.org (mirrors.edge.kernel.org)|147.75.101.1|:44 3... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1003972 (980K) [application/x-xz]
Saving to: ‘bluez-5.9.tar.xz’

bluez-5.9.tar.xz 100%[===================>] 980.44K --.-KB/s in 0.1s

2018-09-04 14:08:44 (8.23 MB/s) - ‘bluez-5.9.tar.xz’ saved [1003972/1003972]

pi@raspberrypi:~/bluez $ sudo tar -xJf bluez-5.9.tar.xz
pi@raspberrypi:~/bluez $ cd bluez-5.9+
-bash: cd: bluez-5.9+: No such file or directory
pi@raspberrypi:~/bluez $ cd bluez-5.9
pi@raspberrypi:~/bluez/bluez-5.9 $ sudo ./configure --disable-systemd
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking how to create a pax tar archive... gnutar
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether make supports nested variables... (cached) yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for C/C++ restrict keyword... __restrict
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking whether gcc and cc understand -c and -o together... yes
checking whether gcc accepts -fPIE... yes
checking build system type... armv7l-unknown-linux-gnueabihf
checking host system type... armv7l-unknown-linux-gnueabihf
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert armv7l-unknown-linux-gnueabihf file names to armv7l-unkn own-linux-gnueabihf format... func_convert_file_noop
checking how to convert armv7l-unknown-linux-gnueabihf file names to toolchain f ormat... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for signalfd... yes
checking for clock_gettime in -lrt... yes
checking for pthread_create in -lpthread... yes
checking for dlopen in -ldl... yes
checking for GLIB... yes
checking for DBUS... yes
checking D-Bus configuration directory... /etc
checking D-Bus system bus services dir... /usr/share/dbus-1/system-services
checking D-Bus session bus services dir... /usr/share/dbus-1/services
checking for UDEV... yes
checking for udev_hwdb_new in -ludev... yes
checking udev directory... /lib/udev
checking for ICAL... yes
checking readline/readline.h usability... yes
checking readline/readline.h presence... yes
checking for readline/readline.h... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/bluetoothd.8
config.status: creating lib/bluez.pc
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
pi@raspberrypi:~/bluez/bluez-5.9 $ sudo make
GEN lib/bluetooth/bluetooth.h
GEN lib/bluetooth/hci.h
GEN lib/bluetooth/hci_lib.h
GEN lib/bluetooth/sco.h
GEN lib/bluetooth/l2cap.h
GEN lib/bluetooth/sdp.h
GEN lib/bluetooth/sdp_lib.h
GEN lib/bluetooth/rfcomm.h
GEN lib/bluetooth/bnep.h
GEN lib/bluetooth/cmtp.h
GEN lib/bluetooth/hidp.h
GEN src/builtin.h
GEN obexd/src/builtin.h
make --no-print-directory all-am
CC lib/bluetooth.lo
CC lib/hci.lo
CC lib/sdp.lo
CC lib/uuid.lo
CCLD lib/libbluetooth-internal.la
ar: `u' modifier ignored since `D' is the default (see `U')
CC gdbus/mainloop.lo
CC gdbus/watch.lo
CC gdbus/object.lo
CC gdbus/client.lo
CC gdbus/polkit.lo
CCLD gdbus/libgdbus-internal.la
ar: `u' modifier ignored since `D' is the default (see `U')
CC client/main.o
CC client/display.o
CC client/agent.o
CC monitor/uuid.o
CCLD client/bluetoothctl
CC monitor/main.o
CC monitor/mainloop.o
CC monitor/display.o
CC monitor/hcidump.o
CC monitor/btsnoop.o
CC monitor/control.o
CC monitor/packet.o
CC monitor/vendor.o
CC monitor/lmp.o
CC monitor/l2cap.o
CC monitor/sdp.o
CC monitor/crc.o
CC monitor/ll.o
CCLD monitor/btmon
CC tools/hciattach.o
CC tools/hciattach_st.o
CC tools/hciattach_ti.o
CC tools/hciattach_tialt.o
CC tools/hciattach_ath3k.o
CC tools/hciattach_qualcomm.o
CC tools/hciattach_intel.o
CCLD tools/hciattach
CC tools/hciconfig.o
CC tools/csr.o
CCLD tools/hciconfig
CC tools/hcitool.o
CC src/oui.o
CCLD tools/hcitool
CC tools/hcidump.o
CC tools/parser/parser.o
CC tools/parser/lmp.o
CC tools/parser/hci.o
CC tools/parser/l2cap.o
CC tools/parser/amp.o
CC tools/parser/smp.o
CC tools/parser/att.o
CC tools/parser/sdp.o
CC tools/parser/rfcomm.o
CC tools/parser/bnep.o
CC tools/parser/cmtp.o
CC tools/parser/hidp.o
CC tools/parser/hcrp.o
CC tools/parser/avdtp.o
CC tools/parser/avctp.o
CC tools/parser/avrcp.o
CC tools/parser/sap.o
CC tools/parser/obex.o
CC tools/parser/capi.o
CC tools/parser/ppp.o
CC tools/parser/tcpip.o
CC tools/parser/ericsson.o
CC tools/parser/csr.o
CC tools/parser/bpa.o
CCLD tools/hcidump
CC tools/rfcomm.o
CCLD tools/rfcomm
CC tools/rctest.o
CCLD tools/rctest
CC tools/l2test.o
CCLD tools/l2test
CC tools/l2ping.o
CCLD tools/l2ping
CC tools/sdptool.o
CC src/sdp-xml.o
CCLD tools/sdptool
CC tools/ciptool.o
CCLD tools/ciptool
CC tools/bccmd.o
tools/bccmd.c: In function ‘cmd_buildname’:
tools/bccmd.c:406:18: warning: iteration 63 invokes undefined behavior [-Waggres sive-loop-optimizations]
name = array[(i * 2) + 4];
~~~~~^~~~~~~~~~~~~
tools/bccmd.c:405:2: note: within this loop
for (i = 0; i < sizeof(name); i++)
^~~
CC tools/csr_hci.o
CC tools/csr_usb.o
CC tools/csr_h4.o
CC tools/csr_3wire.o
CC tools/csr_bcsp.o
CC tools/ubcsp.o
CCLD tools/bccmd
CC profiles/cups/main.o
CC profiles/cups/sdp.o
CC profiles/cups/spp.o
CC profiles/cups/hcrp.o
CCLD profiles/cups/bluetooth
CC plugins/bluetoothd-hostname.o
CC plugins/bluetoothd-wiimote.o
CC plugins/bluetoothd-autopair.o
CC plugins/bluetoothd-policy.o
CC profiles/audio/bluetoothd-source.o
CC profiles/audio/bluetoothd-sink.o
CC profiles/audio/bluetoothd-a2dp.o
CC profiles/audio/bluetoothd-avdtp.o
CC profiles/audio/bluetoothd-media.o
CC profiles/audio/bluetoothd-transport.o
CC profiles/audio/bluetoothd-control.o
CC profiles/audio/bluetoothd-avctp.o
CC profiles/audio/bluetoothd-avrcp.o
CC profiles/audio/bluetoothd-player.o
CC profiles/network/bluetoothd-manager.o
CC profiles/network/bluetoothd-common.o
CC profiles/network/bluetoothd-server.o
CC profiles/network/bluetoothd-connection.o
CC profiles/input/bluetoothd-manager.o
CC profiles/input/bluetoothd-server.o
CC profiles/input/bluetoothd-device.o
CC profiles/input/bluetoothd-hog.o
CC profiles/input/bluetoothd-suspend-dummy.o
CC profiles/gatt/bluetoothd-gas.o
CC profiles/scanparam/bluetoothd-scan.o
CC profiles/deviceinfo/bluetoothd-deviceinfo.o
CC attrib/bluetoothd-att.o
CC attrib/bluetoothd-gatt.o
CC attrib/bluetoothd-gattrib.o
CC attrib/bluetoothd-gatt-service.o
CC btio/bluetoothd-btio.o
CC src/bluetoothd-main.o
CC src/bluetoothd-log.o
CC src/bluetoothd-systemd.o
CC src/bluetoothd-rfkill.o
CC src/bluetoothd-sdpd-server.o
CC src/bluetoothd-sdpd-request.o
CC src/bluetoothd-sdpd-service.o
CC src/bluetoothd-sdpd-database.o
CC src/bluetoothd-attrib-server.o
CC src/bluetoothd-sdp-xml.o
CC src/bluetoothd-sdp-client.o
CC src/bluetoothd-textfile.o
CC src/bluetoothd-glib-helper.o
CC src/bluetoothd-plugin.o
CC src/bluetoothd-storage.o
CC src/bluetoothd-agent.o
CC src/bluetoothd-error.o
CC src/bluetoothd-adapter.o
CC src/bluetoothd-profile.o
CC src/bluetoothd-service.o
CC src/bluetoothd-device.o
CC src/bluetoothd-dbus-common.o
CC src/bluetoothd-eir.o
CC src/shared/bluetoothd-util.o
CC src/shared/bluetoothd-mgmt.o
GEN src/bluetooth.service
CCLD src/bluetoothd
CC btio/obexd-btio.o
CC gobex/obexd-gobex.o
CC gobex/obexd-gobex-defs.o
CC gobex/obexd-gobex-packet.o
CC gobex/obexd-gobex-header.o
CC gobex/obexd-gobex-transfer.o
CC gobex/obexd-gobex-apparam.o
CC obexd/plugins/obexd-filesystem.o
CC obexd/plugins/obexd-bluetooth.o
CC obexd/plugins/obexd-opp.o
CC obexd/plugins/obexd-ftp.o
CC obexd/plugins/obexd-irmc.o
CC obexd/plugins/obexd-pbap.o
CC obexd/plugins/obexd-vcard.o
CC obexd/plugins/obexd-phonebook-dummy.o
CC obexd/plugins/obexd-mas.o
CC obexd/plugins/obexd-messages-dummy.o
CC obexd/client/obexd-mns.o
obexd/client/mns.c: In function ‘mns_connect’:
obexd/client/mns.c:104:2: warning: implicit declaration of function ‘manager_reg ister_session’ [-Wimplicit-function-declaration]
manager_register_session(os);
^~~~~~~~~~~~~~~~~~~~~~~~
obexd/client/mns.c: In function ‘mns_disconnect’:
obexd/client/mns.c:127:2: warning: implicit declaration of function ‘manager_unr egister_session’ [-Wimplicit-function-declaration]
manager_unregister_session(os);
^~~~~~~~~~~~~~~~~~~~~~~~~~
CC obexd/src/obexd-main.o
CC obexd/src/obexd-plugin.o
CC obexd/src/obexd-log.o
CC obexd/src/obexd-manager.o
CC obexd/src/obexd-obex.o
CC obexd/src/obexd-mimetype.o
CC obexd/src/obexd-service.o
CC obexd/src/obexd-transport.o
CC obexd/src/obexd-server.o
CC obexd/client/obexd-manager.o
CC obexd/client/obexd-session.o
CC obexd/client/obexd-bluetooth.o
CC obexd/client/obexd-sync.o
CC obexd/client/obexd-pbap.o
CC obexd/client/obexd-ftp.o
CC obexd/client/obexd-opp.o
CC obexd/client/obexd-map.o
CC obexd/client/obexd-map-event.o
CC obexd/client/obexd-transfer.o
CC obexd/client/obexd-transport.o
CC obexd/client/obexd-dbus.o
CC obexd/client/obexd-driver.o
CCLD obexd/src/obexd
CC attrib/gatttool.o
CC attrib/att.o
CC attrib/gatt.o
CC attrib/gattrib.o
CC btio/btio.o
CC attrib/interactive.o
CC attrib/utils.o
CC src/log.o
CCLD attrib/gatttool
CC gobex/gobex.o
CC gobex/gobex-defs.o
CC gobex/gobex-packet.o
CC gobex/gobex-header.o
CC gobex/gobex-transfer.o
CC gobex/gobex-apparam.o
CC tools/obex-client-tool.o
CCLD tools/obex-client-tool
CC tools/obex-server-tool.o
CCLD tools/obex-server-tool
CC tools/bluetooth-player.o
CCLD tools/bluetooth-player
CC unit/test-eir.o
CC src/eir.o
CC src/glib-helper.o
CCLD unit/test-eir
CC unit/test-uuid.o
CCLD unit/test-uuid
CC unit/test-textfile.o
CC src/textfile.o
CCLD unit/test-textfile
CC unit/test-crc.o
CCLD unit/test-crc
CC unit/test-mgmt.o
CC src/shared/util.o
CC src/shared/mgmt.o
CCLD unit/test-mgmt
CC unit/test-sdp.o
CC src/sdpd-database.o
CC src/sdpd-service.o
CC src/sdpd-request.o
CCLD unit/test-sdp
CC unit/test-gdbus-client.o
CCLD unit/test-gdbus-client
CC unit/util.o
CC unit/test-gobex-header.o
CCLD unit/test-gobex-header
CC unit/test-gobex-packet.o
CCLD unit/test-gobex-packet
CC unit/test-gobex.o
CCLD unit/test-gobex
CC unit/test-gobex-transfer.o
CCLD unit/test-gobex-transfer
CC unit/test-gobex-apparam.o
CCLD unit/test-gobex-apparam
CC unit/test-lib.o
CCLD unit/test-lib
CC tools/hid2hci.o
CCLD tools/hid2hci
GEN tools/97-hid2hci.rules
pi@raspberrypi:~/bluez/bluez-5.9 $ sudo make install
make --no-print-directory install-am
/bin/mkdir -p '/usr/local/bin'
/bin/bash ./libtool --mode=install /usr/bin/install -c client/bluetoothctl m onitor/btmon tools/hciattach tools/hciconfig tools/hcitool tools/hcidump tools/r fcomm tools/rctest tools/l2test tools/l2ping tools/sdptool tools/ciptool tools/b ccmd '/usr/local/bin'
libtool: install: /usr/bin/install -c client/bluetoothctl /usr/local/bin/bluetoo thctl
libtool: install: /usr/bin/install -c monitor/btmon /usr/local/bin/btmon
libtool: install: /usr/bin/install -c tools/hciattach /usr/local/bin/hciattach
libtool: install: /usr/bin/install -c tools/hciconfig /usr/local/bin/hciconfig
libtool: install: /usr/bin/install -c tools/hcitool /usr/local/bin/hcitool
libtool: install: /usr/bin/install -c tools/hcidump /usr/local/bin/hcidump
libtool: install: /usr/bin/install -c tools/rfcomm /usr/local/bin/rfcomm
libtool: install: /usr/bin/install -c tools/rctest /usr/local/bin/rctest
libtool: install: /usr/bin/install -c tools/l2test /usr/local/bin/l2test
libtool: install: /usr/bin/install -c tools/l2ping /usr/local/bin/l2ping
libtool: install: /usr/bin/install -c tools/sdptool /usr/local/bin/sdptool
libtool: install: /usr/bin/install -c tools/ciptool /usr/local/bin/ciptool
libtool: install: /usr/bin/install -c tools/bccmd /usr/local/bin/bccmd
/bin/mkdir -p '/usr/local/libexec/bluetooth'
/bin/bash ./libtool --mode=install /usr/bin/install -c src/bluetoothd obexd/ src/obexd '/usr/local/libexec/bluetooth'
libtool: install: /usr/bin/install -c src/bluetoothd /usr/local/libexec/bluetoot h/bluetoothd
libtool: install: /usr/bin/install -c obexd/src/obexd /usr/local/libexec/bluetoo th/obexd
/bin/mkdir -p '/usr/local/lib/cups/backend'
/bin/bash ./libtool --mode=install /usr/bin/install -c profiles/cups/bluetoo th '/usr/local/lib/cups/backend'
libtool: install: /usr/bin/install -c profiles/cups/bluetooth /usr/local/lib/cup s/backend/bluetooth
/bin/mkdir -p '/etc/dbus-1/system.d'
/usr/bin/install -c -m 644 src/bluetooth.conf '/etc/dbus-1/system.d'
/bin/mkdir -p '/usr/local/share/man/man1'
/usr/bin/install -c -m 644 tools/hciattach.1 tools/hciconfig.1 tools/hcitool.1 tools/hcidump.1 tools/rfcomm.1 tools/rctest.1 tools/l2ping.1 tools/sdptool.1 too ls/ciptool.1 tools/bccmd.1 tools/hid2hci.1 '/usr/local/share/man/man1'
/bin/mkdir -p '/usr/local/share/man/man8'
/usr/bin/install -c -m 644 src/bluetoothd.8 '/usr/local/share/man/man8'
/bin/mkdir -p '/lib/udev/rules.d'
/usr/bin/install -c -m 644 tools/97-hid2hci.rules '/lib/udev/rules.d'
/bin/mkdir -p '/lib/udev'
/bin/bash ./libtool --mode=install /usr/bin/install -c tools/hid2hci '/lib/u dev'
libtool: install: /usr/bin/install -c tools/hid2hci /lib/udev/hid2hci
pi@raspberrypi:~/bluez/bluez-5.9 $ sudo apt-get install python-bluez python-requ ests
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libbluetooth3 python-cffi-backend python-chardet python-cryptography
python-enum34 python-idna python-ipaddress python-openssl
python-pkg-resources python-pyasn1 python-setuptools python-six
python-urllib3
Suggested packages:
python-cryptography-doc python-cryptography-vectors python-enum34-doc
python-openssl-doc python-openssl-dbg doc-base python-socks
python-setuptools-doc python-ntlm
The following NEW packages will be installed:
libbluetooth3 python-bluez python-cffi-backend python-chardet
python-cryptography python-enum34 python-idna python-ipaddress
python-openssl python-pkg-resources python-pyasn1 python-requests
python-setuptools python-six python-urllib3
0 upgraded, 15 newly installed, 0 to remove and 32 not upgraded.
Need to get 1,308 kB of archives.
After this operation, 6,005 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://archive.raspberrypi.org/debian stretch/main armhf libbluetooth3 arm hf 5.43-2+rpt2+deb9u2 [92.5 kB]
Get:2 http://mirror.linux.pizza/raspbian stretch/main armhf python-bluez armhf 0 .22-1 [47.7 kB]
Get:3 http://mirror.linux.pizza/raspbian stretch/main armhf python-cffi-backend armhf 1.9.1-2 [60.7 kB]
Get:4 http://mirror.linux.pizza/raspbian stretch/main armhf python-pkg-resources all 33.1.1-1 [166 kB]
Get:5 http://mirror.linux.pizza/raspbian stretch/main armhf python-chardet all 2 .3.0-2 [96.0 kB]
Get:6 http://mirror.linux.pizza/raspbian stretch/main armhf python-enum34 all 1. 1.6-1 [35.0 kB]
Get:7 http://mirror.linux.pizza/raspbian stretch/main armhf python-idna all 2.2- 1 [32.6 kB]
Get:8 http://mirror.linux.pizza/raspbian stretch/main armhf python-ipaddress all 1.0.17-1 [18.1 kB]
Get:9 http://mirror.linux.pizza/raspbian stretch/main armhf python-pyasn1 all 0. 1.9-2 [51.8 kB]
Get:10 http://mirror.linux.pizza/raspbian stretch/main armhf python-setuptools a ll 33.1.1-1 [297 kB]
Get:11 http://mirror.linux.pizza/raspbian stretch/main armhf python-six all 1.10 .0-3 [14.4 kB]
Get:12 http://mirror.linux.pizza/raspbian stretch/main armhf python-cryptography armhf 1.7.1-3+b2 [174 kB]
Get:13 http://mirror.linux.pizza/raspbian stretch/main armhf python-openssl all 16.2.0-1 [43.7 kB]
Get:14 http://mirror.linux.pizza/raspbian stretch/main armhf python-urllib3 all 1.19.1-1 [77.5 kB]
Get:15 http://mirror.linux.pizza/raspbian stretch/main armhf python-requests all 2.12.4-1 [101 kB]
Fetched 1,308 kB in 2s (610 kB/s)
Selecting previously unselected package libbluetooth3:armhf.
(Reading database ... 36307 files and directories currently installed.)
Preparing to unpack .../00-libbluetooth3_5.43-2+rpt2+deb9u2_armhf.deb ...
Unpacking libbluetooth3:armhf (5.43-2+rpt2+deb9u2) ...
Selecting previously unselected package python-bluez.
Preparing to unpack .../01-python-bluez_0.22-1_armhf.deb ...
Unpacking python-bluez (0.22-1) ...
Selecting previously unselected package python-cffi-backend.
Preparing to unpack .../02-python-cffi-backend_1.9.1-2_armhf.deb ...
Unpacking python-cffi-backend (1.9.1-2) ...
Selecting previously unselected package python-pkg-resources.
Preparing to unpack .../03-python-pkg-resources_33.1.1-1_all.deb ...
Unpacking python-pkg-resources (33.1.1-1) ...
Selecting previously unselected package python-chardet.
Preparing to unpack .../04-python-chardet_2.3.0-2_all.deb ...
Unpacking python-chardet (2.3.0-2) ...
Selecting previously unselected package python-enum34.
Preparing to unpack .../05-python-enum34_1.1.6-1_all.deb ...
Unpacking python-enum34 (1.1.6-1) ...
Selecting previously unselected package python-idna.
Preparing to unpack .../06-python-idna_2.2-1_all.deb ...
Unpacking python-idna (2.2-1) ...
Selecting previously unselected package python-ipaddress.
Preparing to unpack .../07-python-ipaddress_1.0.17-1_all.deb ...
Unpacking python-ipaddress (1.0.17-1) ...
Selecting previously unselected package python-pyasn1.
Preparing to unpack .../08-python-pyasn1_0.1.9-2_all.deb ...
Unpacking python-pyasn1 (0.1.9-2) ...
Selecting previously unselected package python-setuptools.
Preparing to unpack .../09-python-setuptools_33.1.1-1_all.deb ...
Unpacking python-setuptools (33.1.1-1) ...
Selecting previously unselected package python-six.
Preparing to unpack .../10-python-six_1.10.0-3_all.deb ...
Unpacking python-six (1.10.0-3) ...
Selecting previously unselected package python-cryptography.
Preparing to unpack .../11-python-cryptography_1.7.1-3+b2_armhf.deb ...
Unpacking python-cryptography (1.7.1-3+b2) ...
Selecting previously unselected package python-openssl.
Preparing to unpack .../12-python-openssl_16.2.0-1_all.deb ...
Unpacking python-openssl (16.2.0-1) ...
Selecting previously unselected package python-urllib3.
Preparing to unpack .../13-python-urllib3_1.19.1-1_all.deb ...
Unpacking python-urllib3 (1.19.1-1) ...
Selecting previously unselected package python-requests.
Preparing to unpack .../14-python-requests_2.12.4-1_all.deb ...
Unpacking python-requests (2.12.4-1) ...
Setting up python-idna (2.2-1) ...
Setting up python-pyasn1 (0.1.9-2) ...
Setting up libbluetooth3:armhf (5.43-2+rpt2+deb9u2) ...
Setting up python-pkg-resources (33.1.1-1) ...
Setting up python-cffi-backend (1.9.1-2) ...
Setting up python-six (1.10.0-3) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Setting up python-enum34 (1.1.6-1) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up python-ipaddress (1.0.17-1) ...
Setting up python-bluez (0.22-1) ...
Setting up python-setuptools (33.1.1-1) ...
Setting up python-urllib3 (1.19.1-1) ...
Setting up python-chardet (2.3.0-2) ...
Setting up python-cryptography (1.7.1-3+b2) ...
Setting up python-requests (2.12.4-1) ...
Setting up python-openssl (16.2.0-1) ...
pi@raspberrypi:~/bluez/bluez-5.9 $ sudo cp attrib/gatttool /usr/local/bin/
pi@raspberrypi:~/bluez/bluez-5.9 $ sudo shutdown -r now
login as: pi
pi@192.168.0.184's password:
Linux raspberrypi 4.14.50-v7+ #1122 SMP Tue Jun 19 12:26:26 BST 2018 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Sep 4 14:06:03 2018 from 192.168.10.2

SSH is enabled and the default password for the 'pi' user has not been changed.
This is a security risk - please login as the 'pi' user and type 'passwd' to set a new password.


Wi-Fi is disabled because the country is not set.
Use raspi-config to set the country before use.

pi@raspberrypi:~ $ lsusb
Bus 001 Device 006: ID 174c:07d1 ASMedia Technology Inc.
Bus 001 Device 004: ID 046d:c31c Logitech, Inc. Keyboard K120
Bus 001 Device 005: ID 0424:7800 Standard Microsystems Corp.
Bus 001 Device 003: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
pi@raspberrypi:~ $ raspi-config
Script must be run as root. Try 'sudo raspi-config'
pi@raspberrypi:~ $ sudo raspi-config
OK
pi@raspberrypi:~ $ <!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In -->
-bash: !-: event not found
pi@raspberrypi:~ $ <svg version="1.1"
-bash: svg: No such file or directory
pi@raspberrypi:~ $ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w 3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
-bash: xmlns:xlink=http://www.w3.org/1999/xlink: No such file or directory
pi@raspberrypi:~ $ x="0px" y="0px" width="8.6px" height="19.7px" viewBox="0 0 8 .6 19.7" style="enable-background:new 0 0 8.6 19.7;"
pi@raspberrypi:~ $ xml:space="preserve">
-bash: syntax error near unexpected token `newline'
pi@raspberrypi:~ $ <style type="text/css">
-bash: syntax error near unexpected token `newline'
pi@raspberrypi:~ $ .st0{fill:none;stroke:#000000;stroke-width:4;stroke-miterlimi t:10;}
-bash: syntax error near unexpected token `}'
pi@raspberrypi:~ $ </style>
-bash: syntax error near unexpected token `newline'
pi@raspberrypi:~ $ <defs>
-bash: syntax error near unexpected token `newline'
pi@raspberrypi:~ $ </defs>
-bash: syntax error near unexpected token `newline'
pi@raspberrypi:~ $ <path class="st0" d="M1.2,1.6c0,0,8,6,4.5,17.5"/>
-bash: syntax error near unexpected token `newline'
pi@raspberrypi:~ $ </svg>
-bash: syntax error near unexpected token `newline'
pi@raspberrypi:~ $
pi@raspberrypi:~ $ sudo s lsusb -v -d 0a12:
sudo: s: command not found
pi@raspberrypi:~ $
pi@raspberrypi:~ $ sudo s lsusb -v -d 0a12:
sudo: s: command not found
pi@raspberrypi:~ $ sudo lsusb -v -d 0a12:
pi@raspberrypi:~ $
login as: pi
pi@192.168.0.184's password:
Linux raspberrypi 4.14.50-v7+ #1122 SMP Tue Jun 19 12:26:26 BST 2018 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Sep 4 14:19:14 2018 from 192.168.10.2

SSH is enabled and the default password for the 'pi' user has not been changed.
This is a security risk - please login as the 'pi' user and type 'passwd' to set a new password.

pi@raspberrypi:~ $ ^C
pi@raspberrypi:~ $ hciconfig
hci0: Type: BR/EDR Bus: UART
BD Address: B8:27:EB:50:84:25 ACL MTU: 1021:8 SCO MTU: 64:1
UP RUNNING
RX bytes:792 acl:0 sco:0 events:51 errors:0
TX bytes:2758 acl:0 sco:0 commands:51 errors:0

pi@raspberrypi:~ $ wget https://raw.githubusercontent.com/jmleg ... little-dom oticz/master/Presence-detection-beacon/test_beacon.py
--2018-09-04 14:46:02-- https://raw.githubusercontent.com/jmleglise/mylittle-do moticz/master/Presence-detection-beacon/test_beacon.py
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.36.13 3
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.36.1 33|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4979 (4.9K) [text/plain]
Saving to: ‘test_beacon.py’

test_beacon.py 100%[===================>] 4.86K --.-KB/s in 0s

2018-09-04 14:46:03 (10.1 MB/s) - ‘test_beacon.py’ saved [4979/4979]

pi@raspberrypi:~ $ sudo python test_beacon.py
2018-09-04 14:46:17,435 - root - DEBUG - Ok hci0 interface Up n running !
2018-09-04 14:46:17,436 - root - DEBUG - Connect to bluetooth device 0
^Cpi@raspberrypi:~ $ sudo python test_beacon.py
2018-09-04 14:47:17,359 - root - DEBUG - Ok hci0 interface Up n running !
2018-09-04 14:47:17,360 - root - DEBUG - Connect to bluetooth device 0
^Cpi@raspberrypi:~ $ sudo reboot
login as: pi
pi@192.168.0.184's password:
Linux raspberrypi 4.14.50-v7+ #1122 SMP Tue Jun 19 12:26:26 BST 2018 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Sep 4 14:42:00 2018 from 192.168.10.3

SSH is enabled and the default password for the 'pi' user has not been changed.
This is a security risk - please login as the 'pi' user and type 'passwd' to set a new password.

pi@raspberrypi:~ $ sudo python test_beacon.py
2018-09-04 14:49:00,353 - root - DEBUG - Ok hci0 interface Up n running !
2018-09-04 14:49:00,354 - root - DEBUG - Connect to bluetooth device 0
pi@raspberrypi:~ $ hciconfig
hci0: Type: BR/EDR Bus: UART
BD Address: B8:27:EB:50:84:25 ACL MTU: 1021:8 SCO MTU: 64:1
UP RUNNING
RX bytes:1535 acl:0 sco:0 events:95 errors:0
TX bytes:3543 acl:0 sco:0 commands:95 errors:0

pi@raspberrypi:~ $


If I try
pi@raspberrypi:~ $ sudo hcitool lescan
LE Scan ...

FF:FF:30:00:E5 nut
E5:BD:18:09:4F nut
C5:39:CE:7B:5F nut

I have result it's strange

User avatar
Ascari
Posts: 36
Joined: Thursday 28 September 2017 21:35
Target OS: Raspberry Pi
Domoticz version: 4.9
Location: Belgium
Contact:

Re: How to check presence of Beacon ?

Post by Ascari » Sunday 09 September 2018 10:48

I think the problem I have is Python but I want to know if you are using strech and this Puglin work ?

pimseb
Posts: 7
Joined: Wednesday 13 September 2017 13:51
Target OS: -
Domoticz version:
Contact:

Re: How to check presence of Beacon ?

Post by pimseb » Sunday 23 September 2018 11:37

redfirebrooks wrote:
Monday 23 July 2018 14:31
Thanks, but still no luck

Code: Select all

pi@domoticz:~ $ sudo python test_beacon.py
Traceback (most recent call last):
  File "test_beacon.py", line 33, in <module>
    import requests
ImportError: No module named requests
Ok solved installing some more packages

redfirebrooks : can you tell me whick packages you installed because I have the same error
Thank you

User avatar
Ascari
Posts: 36
Joined: Thursday 28 September 2017 21:35
Target OS: Raspberry Pi
Domoticz version: 4.9
Location: Belgium
Contact:

Re: How to check presence of Beacon ?

Post by Ascari » Sunday 23 September 2018 17:29

I solve with desactivate internal Bluetooth and install one usb bluetooth key.

Working with last beta and rpi 3b+

danbom
Posts: 1
Joined: Wednesday 26 September 2018 10:59
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: How to check presence of Beacon ?

Post by danbom » Wednesday 26 September 2018 11:14

Regarding the iTag, I bought a batch of four. Of the four, three DON'T turn themselves off (great) - yet one does. Difference hardware revision? Anyone figured out how to alter this behaviour?
For bonus points, has anyone figured out how to stop the iTag turning itself off in your pocket?!

echeberri77
Posts: 40
Joined: Friday 09 March 2018 19:52
Target OS: Linux
Domoticz version: 3.9203
Location: Italy
Contact:

Re: How to check presence of Beacon ?

Post by echeberri77 » Saturday 03 November 2018 13:01

Hello everybody,
I set up this script correctly (at least the bluetooth discovery part is working flawlessy...)
My problem is the lua script part and in particular the uservariables part.
I am a domoticz total noob, I tried to read the wiky but it is still hard to me...
I just want to use the basic script:

Code: Select all

--Variable scripts receive 7 tables from Domoticz: 
-- otherdevices, otherdevices_lastupdate, otherdevices_svalues, otherdevices_idx, uservariables, uservariables_lastupdate and uservariablechanged

commandArray = {}

beaconHome=0
for variableName, variableValue in pairs(uservariables) do
    if string.sub(variableName,1,3)=="Tag" and variableValue ~= "AWAY" then
      beaconHome=beaconHome+1
    end
end
if otherdevices['Alarm'] == 'On' and beaconHome>=1 then   -- switch Off Alarm because 1 beacon come back Home
    table.insert (commandArray, { ['Alarm'] ='Off' } )
elseif otherdevices['Alarm'] == 'Off' and beaconHome==0 then  -- switch On Alarm because all beacon are away
    table.insert (commandArray, { ['Alarm'] ='On' } )
end

return commandArray
My Alarm switch is called "Allarme", I have three phones (MAY, JAY, KAY) to check (they are correctly discovered from the python script).
How to set up the uservariables for those phone? I could create three user variables from domoticz options and name them MAY, JAY and KAY and give them a value....but wich value? AWAY? I am totally confused......

Can you help me please?

Thanks

Xavier

echeberri77
Posts: 40
Joined: Friday 09 March 2018 19:52
Target OS: Linux
Domoticz version: 3.9203
Location: Italy
Contact:

Re: How to check presence of Beacon ?

Post by echeberri77 » Saturday 03 November 2018 17:19

Ok, got it!
I just have to create as many blank value string variable as I want, their name must be the one specified under the conf part of the py script.
Is it too difficult to clarify it better? :?
By the way: my Xiaomi My Band 2 is correctly detected...
Why is this script not detecting a phone bluetooth? It think it should be the same....

QuadRotas
Posts: 2
Joined: Wednesday 07 November 2018 17:55
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: How to check presence of Beacon ?

Post by QuadRotas » Wednesday 07 November 2018 18:06

After fiddling with the wiki manual I am very close to having a fully working setup. Close, but still far away...

Installation and configuration went well, running the script manually does what it has to do, but running it as a service gives an error:

pi@raspberrypi:/usr/local/bin $ sudo /etc/init.d/check_beacon_presence start

[....] Starting check_beacon_presence (via systemctl): check_beacon_presence.serviceJob for check_beacon_presence.service failed because the control process exited with error code.
See "systemctl status check_beacon_presence.service" and "journalctl -xe" for details.
failed!

pi@raspberrypi:/usr/local/bin $ systemctl status check_beacon_presence.service
* check_beacon_presence.service - LSB: This daemon manages the bluetooth low energy device detector : check_beacon_presence.py
Loaded: loaded (/etc/init.d/check_beacon_presence; generated; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2018-11-07 16:50:12 CET; 31s ago
Docs: man:systemd-sysv-generator(8)
Process: 7305 ExecStart=/etc/init.d/check_beacon_presence start (code=exited, status=203/EXEC)

nov 07 16:50:12 raspberrypi systemd[1]: Starting LSB: This daemon manages the bluetooth low energy device detector : check_beacon_presence.py...
nov 07 16:50:12 raspberrypi systemd[1]: check_beacon_presence.service: Control process exited, code=exited status=203
nov 07 16:50:12 raspberrypi systemd[1]: Failed to start LSB: This daemon manages the bluetooth low energy device detector : check_beacon_presence.py.
nov 07 16:50:12 raspberrypi systemd[1]: check_beacon_presence.service: Unit entered failed state.
nov 07 16:50:12 raspberrypi systemd[1]: check_beacon_presence.service: Failed with result 'exit-code'.


pi@raspberrypi:/usr/local/bin $ journalctl -xe
nov 07 17:03:04 raspberrypi systemd[1]: Starting LSB: This daemon manages the bluetooth low energy device detector : check_beacon_presence.py...
-- Subject: Unit check_beacon_presence.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit check_beacon_presence.service has begun starting up.
nov 07 17:03:04 raspberrypi systemd[8021]: check_beacon_presence.service: Failed at step EXEC spawning /etc/init.d/check_beacon_presence: Exec format error
-- Subject: Process /etc/init.d/check_beacon_presence could not be executed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The process /etc/init.d/check_beacon_presence could not be executed and failed.
--
-- The error number returned by this process is 8.
nov 07 17:03:04 raspberrypi systemd[1]: check_beacon_presence.service: Control process exited, code=exited status=203
nov 07 17:03:04 raspberrypi systemd[1]: Failed to start LSB: This daemon manages the bluetooth low energy device detector : check_beacon_presence.py.
-- Subject: Unit check_beacon_presence.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit check_beacon_presence.service has failed.
--
-- The result is failed.
nov 07 17:03:04 raspberrypi systemd[1]: check_beacon_presence.service: Unit entered failed state.
nov 07 17:03:04 raspberrypi systemd[1]: check_beacon_presence.service: Failed with result 'exit-code'.
nov 07 17:03:04 raspberrypi sudo[8001]: pam_unix(sudo:session): session closed for user root
nov 07 17:03:05 raspberrypi sudo[8003]: pam_unix(sudo:session): session closed for user root
I've been googling like crazy but can't seem to find a solution. Can anyone point me in the right direction? I am using Raspbian Stretch 9.4, if that matters.

User avatar
emme
Posts: 936
Joined: Monday 27 June 2016 11:02
Target OS: Raspberry Pi
Domoticz version: latest
Location: Milano, Italy
Contact:

Re: How to check presence of Beacon ?

Post by emme » Wednesday 07 November 2018 18:09

are you sure you're not running more than one instance?

I'm more comfortable by using systemctl than rc.local
The most dangerous phrase in any language is:
"We always done this way"

QuadRotas
Posts: 2
Joined: Wednesday 07 November 2018 17:55
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: How to check presence of Beacon ?

Post by QuadRotas » Wednesday 07 November 2018 18:18

emme wrote:
Wednesday 07 November 2018 18:09
are you sure you're not running more than one instance?

I'm more comfortable by using systemctl than rc.local
I...am fairly sure I'm only running 1 instance. here was 1 previous attempt to get the script working but I didn't get past the first manual test.
After that I redid all steps correctly and got this far. I could look into systemctl but I'm not familiar at all with that.

echeberri77
Posts: 40
Joined: Friday 09 March 2018 19:52
Target OS: Linux
Domoticz version: 3.9203
Location: Italy
Contact:

Re: How to check presence of Beacon ?

Post by echeberri77 » Sunday 11 November 2018 14:41

Hi everybody!!
I made a blocky script for presence but it seems not to work... Logic show be that if variable MyBandSaverio is AWAY or if variable MyBandSilvia is AWAY then Set Allarm switch to on and MyBandPresence switch to OFF... at teh contrary if variable MyBandSaverio is different than AWAY or if variable MyBAndSilvia is different than AWAY the set Allarm swtioch to OFF and MyBandPresence switch to ON.

But is it not working... Why? It is not a matter of presence switch because I see the values of the variables canghing according to the beacons presence...

What is the problem then? See image on attach for more details!

Thanks for you help!

Xavier
Attachments
Senzanome.png
Senzanome.png (54.11 KiB) Viewed 35 times

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests