How to check presence of Beacon ?
Moderators: leecollings, remb0
- emme
- Posts: 909
- Joined: Monday 27 June 2016 11:02
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest
- Location: Milano, Italy
- Contact:
Re: How to check presence of Beacon ?
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
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"
"We always done this way"
-
- Posts: 40
- Joined: Sunday 07 January 2018 15:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: How to check presence of Beacon ?
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 ;
I have a RPI3
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
Version: 2024.1
Build Hash: 5279c8261
Compile Date: 2024-01-01 12:59:22
dzVents Version: 3.1.8
Python Version: 3.9.2
Raspbian Bullseye
Raspberry3B+
RFLINK R48.4
Build Hash: 5279c8261
Compile Date: 2024-01-01 12:59:22
dzVents Version: 3.1.8
Python Version: 3.9.2
Raspbian Bullseye
Raspberry3B+
RFLINK R48.4
- emme
- Posts: 909
- Joined: Monday 27 June 2016 11:02
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest
- Location: Milano, Italy
- Contact:
Re: How to check presence of Beacon ?
looks like you miss the bluetooth stack for python
try with
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"
"We always done this way"
-
- Posts: 40
- Joined: Sunday 07 January 2018 15:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: How to check presence of Beacon ?
Thanks, but still no luck
Ok solved installing some more packages
Running test_beacon.py I have endless lines...
How should I select the NUT beacon ?
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
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,)
Version: 2024.1
Build Hash: 5279c8261
Compile Date: 2024-01-01 12:59:22
dzVents Version: 3.1.8
Python Version: 3.9.2
Raspbian Bullseye
Raspberry3B+
RFLINK R48.4
Build Hash: 5279c8261
Compile Date: 2024-01-01 12:59:22
dzVents Version: 3.1.8
Python Version: 3.9.2
Raspbian Bullseye
Raspberry3B+
RFLINK R48.4
-
- Posts: 6
- Joined: Thursday 17 May 2018 1:18
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: How to check presence of Beacon ?
Hello, thanks for your answer. I have been on holidays since today.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
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
The service still running:
- Spoiler: show
- Spoiler: show
How can I check what is happening every hour?
BTW, someone knows a better way to do the same?
Lot of thanks.
- emme
- Posts: 909
- Joined: Monday 27 June 2016 11:02
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest
- Location: Milano, Italy
- Contact:
Re: How to check presence of Beacon ?
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?
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"
"We always done this way"
-
- Posts: 7
- Joined: Tuesday 28 August 2018 10:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: How to check presence of Beacon ?
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.
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.
- Ascari
- Posts: 30
- Joined: Thursday 28 September 2017 21:35
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.9
- Location: Belgium
- Contact:
Re: How to check presence of Beacon ?
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
The installation process.
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
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
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
- Ascari
- Posts: 30
- Joined: Thursday 28 September 2017 21:35
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.9
- Location: Belgium
- Contact:
Re: How to check presence of Beacon ?
I think the problem I have is Python but I want to know if you are using strech and this Puglin work ?
-
- Posts: 42
- Joined: Wednesday 13 September 2017 13:51
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.1
- Location: France
- Contact:
Re: How to check presence of Beacon ?
redfirebrooks wrote: ↑Monday 23 July 2018 14:31 Thanks, but still no luckOk solved installing some more packagesCode: 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
redfirebrooks : can you tell me whick packages you installed because I have the same error
Thank you
- Ascari
- Posts: 30
- Joined: Thursday 28 September 2017 21:35
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.9
- Location: Belgium
- Contact:
Re: How to check presence of Beacon ?
I solve with desactivate internal Bluetooth and install one usb bluetooth key.
Working with last beta and rpi 3b+
Working with last beta and rpi 3b+
-
- Posts: 1
- Joined: Wednesday 26 September 2018 10:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: How to check presence of Beacon ?
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?!
For bonus points, has anyone figured out how to stop the iTag turning itself off in your pocket?!
-
- Posts: 39
- Joined: Friday 09 March 2018 18:52
- Target OS: Linux
- Domoticz version: 3.9203
- Location: Italy
- Contact:
Re: How to check presence of Beacon ?
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:
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
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
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
-
- Posts: 39
- Joined: Friday 09 March 2018 18:52
- Target OS: Linux
- Domoticz version: 3.9203
- Location: Italy
- Contact:
Re: How to check presence of Beacon ?
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....
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....
-
- Posts: 12
- Joined: Wednesday 07 November 2018 16:55
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: How to check presence of Beacon ?
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:
Installation and configuration went well, running the script manually does what it has to do, but running it as a service gives an error:
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.
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
- emme
- Posts: 909
- Joined: Monday 27 June 2016 11:02
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest
- Location: Milano, Italy
- Contact:
Re: How to check presence of Beacon ?
are you sure you're not running more than one instance?
I'm more comfortable by using systemctl than rc.local
I'm more comfortable by using systemctl than rc.local
The most dangerous phrase in any language is:
"We always done this way"
"We always done this way"
-
- Posts: 12
- Joined: Wednesday 07 November 2018 16:55
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: How to check presence of Beacon ?
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.
-
- Posts: 39
- Joined: Friday 09 March 2018 18:52
- Target OS: Linux
- Domoticz version: 3.9203
- Location: Italy
- Contact:
Re: How to check presence of Beacon ?
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
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 (54.11 KiB) Viewed 2620 times
-
- Posts: 23
- Joined: Monday 19 December 2016 8:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: Germany - Münsterland
- Contact:
Script is not working
Hi folks,
got the bluetooth beacon presence detection running with no success. System is a Pi3b with debian stretch and Domoticz 4.9700, beacon is a G-Tag which I can see with the lescan tool. Uservariable is set but no change from "away" to "home".
Can somebody translate for me the output when I ran the script manually?
Thanks in advance.
Greetz
Meikel
got the bluetooth beacon presence detection running with no success. System is a Pi3b with debian stretch and Domoticz 4.9700, beacon is a G-Tag which I can see with the lescan tool. Uservariable is set but no change from "away" to "home".
Can somebody translate for me the output when I ran the script manually?
Thanks in advance.
Greetz
Meikel
-
- Posts: 23
- Joined: Monday 19 December 2016 8:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: Germany - Münsterland
- Contact:
Script is working now, but...
...its writing the RSSI into the user variable and not HOME or AWAY. Why?
Meikel
Meikel
Who is online
Users browsing this forum: No registered users and 1 guest