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.

Moderators: leecollings, remb0

Damsee
Posts: 58
Joined: Thursday 20 April 2017 1:17
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10717
Location: France
Contact:

Re: How to check presence of Beacon ?

Post by Damsee »

Nope i didn't.
I'm back to my old system using l2ping ro ping my phone.
RPI3 Raspbian Buster + Domoticz v2020.1 stable + RFXtrx433E + Z-Stick Gen5 + Amazon Echo (alexicz)
x5 THGN810 / x5 ZMNHJD1 / x2 Flood sensor FGFS101 / x1 Smoke sensor FGSD002
x1 ZMNHAD1 / x2 FGS213 / x3 Wallplug FGWPE/F / NodOn Soft remote CRC-3-6-0
McJohn
Posts: 91
Joined: Wednesday 10 October 2018 17:01
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Netherlands
Contact:

Re: How to check presence of Beacon ?

Post by McJohn »

Raspbian Buster 10
Domoticz 2020.2 (build 12067)
(both fresh new install)

There is a problem with this script:
https://www.domoticz.com/wiki/Presence_ ... _Beacon%29
https://raw.githubusercontent.com/jmleg ... _beacon.py

It gives a fault:

Code: Select all

sudo python test_beacon.py
Traceback (most recent call last):
  File "test_beacon.py", line 31, in <module>
    import bluetooth._bluetooth as bluez
  File "/usr/local/lib/python2.7/dist-packages/bluetooth/__init__.py", line 282, in <module>
    """
AttributeError: attribute '__doc__' of 'instancemethod' objects is not writable
It's also described here:
https://stackoverflow.com/questions/598 ... -python2-7

We don't know what and where the script has to be changed.
Maybe the original script is in the meantime outdated?

Thanks for the support.

PS: this error becomes also for the main script:
https://raw.githubusercontent.com/jmleg ... resence.py
McJohn
Posts: 91
Joined: Wednesday 10 October 2018 17:01
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Netherlands
Contact:

Re: How to check presence of Beacon ?

Post by McJohn »

Python problem is solved.
There is a fault into the Wiki.

https://www.domoticz.com/wiki/Presence_ ... _Beacon%29
Subject: Bluez - the linux bluetooth stack
When the version will be higher , you could do a simple :

Code: Select all

sudo apt-get install bluez 
It installed Bluez also into a wrong directory:
(/usr/local/lib/python2.7/dist-packages/bluetooth)

This has to be;

Code: Select all

sudo apt install python-bluez
And beside this, for the modern Raspberry's with standard Bluetooth, this line doesn't have to be installed:

Code: Select all

sudo apt-get install -y libusb-dev libdbus-1-dev libglib2.0-dev libudev-dev libical-dev libreadline-dev
Please could somebody fix the Wiki.
jes74
Posts: 1
Joined: Thursday 02 July 2020 13:16
Target OS: Linux
Domoticz version:
Contact:

Re: How to check presence of Beacon ?

Post by jes74 »

I've just found this thread and found it very interesting.

I have problems with fencing etc and all decent beacon ideas have been very apple orientated :twisted:

To me the concept of multiple RasPi/BLE boxes dotted about looks quite cool. I'd be interested in being able to recognize the approach of either my wife's car or my own and turn on external lighting and open an electric gate.

I think I'll be buying some NUT tags soon, but what is their range like?

many thanks....

Best Regards:
Jes74,,,
The Official website of Sri Lanka ETA and Sri Lanka Visa Online . Fill the application form for Evisa SriLanka and get Visa online within 24 hours.
cleverpat
Posts: 1
Joined: Wednesday 25 March 2015 17:26
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Contact:

Re: How to check presence of Beacon ?

Post by cleverpat »

Hello Everyone,

Anyone got it working with a Tile Pro ? I know that Tiles are not broadcasting as soon as they've been paired with the app, so I've left them unpaired.
However, they "disappear" after a certain time. They only broadcast back when I push the button (discovery mode).
I also tried to pair them with my raspberry directly, but I got an " org.bluez.Error.AuthenticationFailed" :-/
Anyone has already had presence detection working with Tile pro ?

Thanks in advance
Pat
PeteMelon59
Posts: 1
Joined: Tuesday 21 July 2020 18:37
Target OS: OS X
Domoticz version:
Contact:

Re: How to check presence of Beacon ?

Post by PeteMelon59 »

Hi,

I have received my order. So I think, i will test it in the next 10 days.

tvดูบอลสด
danielgrant007
Posts: 1
Joined: Friday 24 July 2020 13:04
Target OS: OS X
Domoticz version:
Contact:

Re: How to check presence of Beacon ?

Post by danielgrant007 »

It seems like something weird had happened to my RPi3 and now the service stopped working. It seems to be a bluetooth problem.
I cant run hciconfig anymore. I've reinstalled Bluez. Bluetoothctl gives me an empty row where I cant input anything.
US Travelers planning to visit Sri Lanka can check mandatory information required for applying Sri Lanka Visa for US citizens here.
JPdom
Posts: 2
Joined: Sunday 01 March 2020 11:43
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: How to check presence of Beacon ?

Post by JPdom »

I used this script python3 script : https://www.domoticz.com/forum/viewtopi ... 13#p234199
for several weeks.

But since some weeks, it doesn't work anymore
When I run beacon.py script, I have this error :

Code: Select all

Traceback (most recent call last):
  File "beacon.py", line 148, in <module>
    pkt = sock.recv(255)
_bluetooth.error: (32, 'Broken pipe')
I made no change in domoticz. I still have "4.10717" version.
I only periodically update raspian 9.13.

Can you help me to fix that ?
Thank you
rgroothuis
Posts: 347
Joined: Friday 03 April 2015 17:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: How to check presence of Beacon ?

Post by rgroothuis »

Apart from detecting Beacon's, does this solution also detect iPhones with bluetooth enabled?

I want to get this feedback before installing and trying. Thanks.
rgroothuis
Posts: 347
Joined: Friday 03 April 2015 17:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: How to check presence of Beacon ?

Post by rgroothuis »

rgroothuis wrote: Wednesday 14 October 2020 22:20 Apart from detecting Beacon's, does this solution also detect iPhones with bluetooth enabled?

I want to get this feedback before installing and trying. Thanks.
Anybody feedback on my question? In stead of detecting beacons with this solution, can iPhones also be detected? Can somebody confirm?
DAVIZINHO
Posts: 234
Joined: Sunday 27 August 2017 18:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Spain
Contact:

Re: How to check presence of Beacon ?

Post by DAVIZINHO »

hello.
this is so old but works. i use a raspi zero exclusive for this and works fine.

The problem is a "false away". the nut its static near the raspberry and detect HOME but, suddenly it detects a away and after a minute a HOME again.
I think is a problem.

someone have this problem?
DAVIZINHO
Posts: 234
Joined: Sunday 27 August 2017 18:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Spain
Contact:

Re: How to check presence of Beacon ?

Post by DAVIZINHO »

nobody use this bluetooth method?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest