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.
jmleglise
Posts: 192
Joined: Tuesday 13 January 2015 0:27
Target OS: Raspberry Pi
Domoticz version: V3.5113
Location: FRANCE
Contact:

Re: How to check presence of Beacon ?

Postby jmleglise » Thursday 16 June 2016 23:14

Raspberry Pi2 + RFXTRX433E + KMTronic USB relay card
Blinds Somfy RTS, Blinds Bubendorff, Portal Somfy Evolvia 400, IP Video Doorbell ATZ-DBV01P, chacon IO, Oregon THN132ES, THN122N, Chinese PIR sensor PT2262, Bluetooth low energy dongle, iBeacon

jnoel68
Posts: 11
Joined: Tuesday 14 June 2016 15:44
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: How to check presence of Beacon ?

Postby jnoel68 » Monday 20 June 2016 11:57

Hi jmleglise, any idea ?
Thx
jnoel68 wrote:Hi,

Does anybody have an idea how to setup the same on Synology ?
I've bought a Bluetooth adapter, which is perfectly recognized by the Synology.
I've bought Chipolo beacons.
How can I setup bluez on my Synology to automatically update my beacons status in domoticz ?

Thx in advance,
Jerome

jmleglise
Posts: 192
Joined: Tuesday 13 January 2015 0:27
Target OS: Raspberry Pi
Domoticz version: V3.5113
Location: FRANCE
Contact:

Re: How to check presence of Beacon ?

Postby jmleglise » Tuesday 21 June 2016 19:28

Sorry, I don't use synology. There is a lot of information on google to install bluez on synology.

If you succeed, you could report here and complete the wiki ?
Raspberry Pi2 + RFXTRX433E + KMTronic USB relay card
Blinds Somfy RTS, Blinds Bubendorff, Portal Somfy Evolvia 400, IP Video Doorbell ATZ-DBV01P, chacon IO, Oregon THN132ES, THN122N, Chinese PIR sensor PT2262, Bluetooth low energy dongle, iBeacon

jnoel68
Posts: 11
Joined: Tuesday 14 June 2016 15:44
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: How to check presence of Beacon ?

Postby jnoel68 » Thursday 18 August 2016 9:49

jmleglise wrote:Sorry, I don't use synology. There is a lot of information on google to install bluez on synology.

If you succeed, you could report here and complete the wiki ?

Unfortunately, still unable to install bluez on my synology
in fact, there is a package available for optware/entware (which are tools to allow install standard linux package) but the bluez version is 3.36, and the team don't want to upgrade to bluez 5 for compatibilty reason with other packages ...
Still trying to install it :oops:

User avatar
jumbotroll
Posts: 476
Joined: Tuesday 13 January 2015 15:36
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Oslo,Norway
Contact:

Re: How to check presence of Beacon ?

Postby jumbotroll » Thursday 18 August 2016 17:24

jnoel68 wrote:
jmleglise wrote:Sorry, I don't use synology. There is a lot of information on google to install bluez on synology.

If you succeed, you could report here and complete the wiki ?

Unfortunately, still unable to install bluez on my synology
in fact, there is a package available for optware/entware (which are tools to allow install standard linux package) but the bluez version is 3.36, and the team don't want to upgrade to bluez 5 for compatibilty reason with other packages ...
Still trying to install it :oops:


I have compiled spk package Bluez version 5.41 for DS1511+ arch-x86 for DSM 6.0 for you to test . Binary files are located in /usr/local/bluez .
I have not tested this package even when I do not use bluetooth.
http://www.jadahl.com/synology6/?arch=x86
Regards
Jumbotroll
http://www.jadahl.com

jnoel68
Posts: 11
Joined: Tuesday 14 June 2016 15:44
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: How to check presence of Beacon ?

Postby jnoel68 » Friday 19 August 2016 0:52

jumbotroll wrote:
jnoel68 wrote:
jmleglise wrote:Sorry, I don't use synology. There is a lot of information on google to install bluez on synology.

If you succeed, you could report here and complete the wiki ?

Unfortunately, still unable to install bluez on my synology
in fact, there is a package available for optware/entware (which are tools to allow install standard linux package) but the bluez version is 3.36, and the team don't want to upgrade to bluez 5 for compatibilty reason with other packages ...
Still trying to install it :oops:


I have compiled spk package Bluez version 5.41 for DS1511+ arch-x86 for DSM 6.0 for you to test . Binary files are located in /usr/local/bluez .
I have not tested this package even when I do not use bluetooth.
http://www.jadahl.com/synology6/?arch=x86

Thanks Jumbotroll, installation went fine -> Bluez is well installed in folder /usr/local/bluez
But still unable to import "bluetooth" or "bluez" in the python script provided by jmleglise, always the same issue :
No module named bluetooth._bluetooth

I'm not fine with python, so I'm not sure that the import can look in /usr/local/bluez, so I've tried to copy this folder in one of the PYTHONPATH, but still not working ... si maybe the bluez module should be compiled for python before ...
@jmleglise, if you have any idea, thanks to help

chrispazz
Posts: 50
Joined: Friday 08 July 2016 10:38
Target OS: -
Domoticz version:
Contact:

Re: How to check presence of Beacon ?

Postby chrispazz » Monday 22 August 2016 14:27

Hi,
On my Raspberry PI 3 I tried in every way but I never are able to run the script.
I always get the same error of previous user: No module named bluetooth._bluetooth

Gatttool is working ok so I am looking to a different method to test presence of my NUT 2 beacon.

Any alternative idea?

Thank you

jmleglise
Posts: 192
Joined: Tuesday 13 January 2015 0:27
Target OS: Raspberry Pi
Domoticz version: V3.5113
Location: FRANCE
Contact:

Re: How to check presence of Beacon ?

Postby jmleglise » Tuesday 23 August 2016 11:54

Hi chrispass,

At what line/test of the wiki did you failed ?
Raspberry Pi2 + RFXTRX433E + KMTronic USB relay card
Blinds Somfy RTS, Blinds Bubendorff, Portal Somfy Evolvia 400, IP Video Doorbell ATZ-DBV01P, chacon IO, Oregon THN132ES, THN122N, Chinese PIR sensor PT2262, Bluetooth low energy dongle, iBeacon

jmleglise
Posts: 192
Joined: Tuesday 13 January 2015 0:27
Target OS: Raspberry Pi
Domoticz version: V3.5113
Location: FRANCE
Contact:

Re: How to check presence of Beacon ?

Postby jmleglise » Tuesday 23 August 2016 17:56

And I had this error (No module named bluetooth._bluetooth) when python don't find the bluez library. (problem of path.)

- is it your first python script ?
- respect all path of the wiki.
Raspberry Pi2 + RFXTRX433E + KMTronic USB relay card
Blinds Somfy RTS, Blinds Bubendorff, Portal Somfy Evolvia 400, IP Video Doorbell ATZ-DBV01P, chacon IO, Oregon THN132ES, THN122N, Chinese PIR sensor PT2262, Bluetooth low energy dongle, iBeacon

evertzwevert
Posts: 1
Joined: Saturday 27 August 2016 12:52
Target OS: NAS (Synology & others)
Domoticz version: 3.5523
Contact:

Re: How to check presence of Beacon ?

Postby evertzwevert » Saturday 27 August 2016 18:35

Hi!

First of all: thanks JMLEGLISE for all your pioneering work on the BTLE beacons. I really enjoyed implementing it.

I used this script successfully on my raspberry pi in combination with 2 NUTS. however now i'm going nuts trying to get it working on the synology ds126+II being stuck on the "No module named bluetooth._bluetooth" python error.

* i installed the bluez package from jumbotroll (BlueZ v5.41-1) since I was not able to compile Bluez succesfully myself, and gave up on it.
* According to the wiki i should
sudo apt-get install python-bluez python-requests -> i cannot install python bluez or -requests from optware
sudo cp attrib/gatttool /usr/local/bin/ ->i cannot find the gattool anywhere

Did anyone get past the python error and got this working on Synology ?
Can some point me in the direction of a solution ?

thanks!

woody4165
Posts: 412
Joined: Monday 14 March 2016 14:55
Target OS: Linux
Domoticz version: beta
Location: Rome, Italy
Contact:

Re: How to check presence of Beacon ?

Postby woody4165 » Monday 17 October 2016 17:43

Hi

I come back in this 3d after a lot of time since I'm having problem with a kind of beacon.
I got a Nut 3 mini and it's working.
Now I've got a Nut 2, but it cannot be found.
The strange thing is that if I run a BLE scanner app on Android I cannot find it either.
While if I run the Nut App I can find it. If I click on the Nut the phone ring and if I click on the phone (Nut app) on this device it ring also.

Strange think is that the Ble Scanner, and also the check_beacon_presence script of course, don't find it.
The battery is ok, I changed with a new one.

Any suggestion?

Thanks

jmleglise
Posts: 192
Joined: Tuesday 13 January 2015 0:27
Target OS: Raspberry Pi
Domoticz version: V3.5113
Location: FRANCE
Contact:

Re: How to check presence of Beacon ?

Postby jmleglise » Monday 17 October 2016 21:48

Hi,

I have the nut 2 and it's working without problem, (from this seller : http://www.banggood.com/Mini-Smart-Patc ... 88462.html )

If you don't see your beacon with this command, I'am afraid that you will not be able to use it :

Code: Select all

sudo hcitool lescan
Raspberry Pi2 + RFXTRX433E + KMTronic USB relay card
Blinds Somfy RTS, Blinds Bubendorff, Portal Somfy Evolvia 400, IP Video Doorbell ATZ-DBV01P, chacon IO, Oregon THN132ES, THN122N, Chinese PIR sensor PT2262, Bluetooth low energy dongle, iBeacon

nillix
Posts: 6
Joined: Tuesday 29 December 2015 11:32
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: How to check presence of Beacon ?

Postby nillix » Tuesday 18 October 2016 9:16

Hi there,

I ordered two of these NUT beacons + BLE USB Stick. They are working fine with the app on Iphone etc. But there is one thing I miss in the wiki article ( https://www.domoticz.com/wiki/Presence_ ... rgy_Beacon )) and the discussion here. As far as I know, you have to have a permanent connection to these beacons in order to correctly detect them, am I right? I mean, the script is working well and the beacons are detected when I make them visible (long press on the button of the beacon) But I don´t want to push the button everytime I´m coming home etc. I think this is not in your mind as well. So I already tried to connect them with raspberry and it worked with bluetoothctl. But when I leave the cli of bluetoothctl, the connection is lost. So how this should be managed?

I really hope that somebody can help me a little bit, because this is really a great thing when its working correctly! :)

Thanks Nils

woody4165
Posts: 412
Joined: Monday 14 March 2016 14:55
Target OS: Linux
Domoticz version: beta
Location: Rome, Italy
Contact:

Re: How to check presence of Beacon ?

Postby woody4165 » Tuesday 18 October 2016 9:24

@jmleglise all works fine now.

Don't know what happened, but after a reboot, removing and putting back the BT stick, now all is working. Strange that the Nut3 mini where working and the others didn't.

Thanks

sbisbilo
Posts: 11
Joined: Monday 07 March 2016 18:23
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: How to check presence of Beacon ?

Postby sbisbilo » Tuesday 18 October 2016 10:02

Hi,

I successfully installed the script on my domoticz system but my beacons are not awake, I have to push a long time the button on the top of it and there are staying awake for like 10 seconds.
I bought those ones : https://www.amazon.fr/NUT-Bluetooth-Int ... ndroid+IOS
There are Nut 2 apparently. Is there somthing to do to force them being awake all the time ?

Thanks for your answer.
Sylvain

nillix
Posts: 6
Joined: Tuesday 29 December 2015 11:32
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: How to check presence of Beacon ?

Postby nillix » Tuesday 18 October 2016 10:45

I will try this later at home (already tried parts of it, but not did the trusting at the end):

Code: Select all

Start the bluetoothctl interactive command. Enter "help" to get a list of available commands.

Turn the power to the controller on by entering "power on". It is off by default.
Enter "devices" to get the MAC Address of the device with which to pair.
Enter device discovery mode with "scan on" command if device is not yet on the list.
Turn the agent on with "agent on".
Enter "pair MAC Address" to do the pairing (tab completion works).
If using a device without a PIN, one may need to manually trust the device before it can reconnect successfully. Enter "trust MAC Address" to do so.
Finally, use "connect MAC address" to establish a connection.


Maybe it works for you as well...

sbisbilo
Posts: 11
Joined: Monday 07 March 2016 18:23
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: How to check presence of Beacon ?

Postby sbisbilo » Thursday 20 October 2016 10:57

So finally, I bought some Nut 3 mini and it's working :) There staying all the time awake ! But I have one more question : I'd like to write in a log file when the status of a Beacon is changing (away/home). How can I do that in LUA ?
Thanks

nillix
Posts: 6
Joined: Tuesday 29 December 2015 11:32
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: How to check presence of Beacon ?

Postby nillix » Thursday 20 October 2016 14:19

Hi sbisbilo,

that sounds good. Unfortunately my tries to have a stable connection with the NUT2 went all wrong... :(
I will give the NUT 3 a try!
Could you explain what you did? Which were the steps you took to get it working.

Thanks!
Nils

sbisbilo
Posts: 11
Joined: Monday 07 March 2016 18:23
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: How to check presence of Beacon ?

Postby sbisbilo » Thursday 20 October 2016 14:31

Hi nillix,

Yeah the nut 2 is not the good beacon for this purpose.
I just follow the wiki:

https://www.domoticz.com/wiki/Presence_detection_(Bluetooth_4.0_Low_energy_Beacon)

and It worked like a charm ! I'm using a raspberry pi 3 with the embedded Bluetooth device.
Last edited by gizmocuz on Thursday 20 October 2016 15:20, edited 1 time in total.
Reason: Please put URL's in a URL tag or they might not work (like this one)

sbisbilo
Posts: 11
Joined: Monday 07 March 2016 18:23
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: How to check presence of Beacon ?

Postby sbisbilo » Thursday 20 October 2016 15:14

Hi everyone,

Do you know if is it possible to use about 20 beacons in the same time with a bluetooth dongle ?

Thanks


Return to “Other questions and discussions”

Who is online

Users browsing this forum: No registered users and 2 guests