Anwesenheitserkennung Bluetooth PebbleBee

Begonnen von tomster, 06 November 2014, 10:01:16

Vorheriges Thema - Nächstes Thema

v.i.p.e.r

#270
Hi,

danke für die Antwort :)

1. Ok das kann sein - was habt ihr für einen ? Ich hab den LogiLink BT0015 (lsusb sagt: Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode))
2. der soll schon länger behoben sein - Meldungen sind von 2013 und 2014
3. ist bei mir aus
4. bringt leider keinen unterschied :(



Eventuell liegt es ja auch an dem perl script- eventuell kann Mathelf nochmal sagen, wo er den Code bei dem Python Script genau eingefügt hat - weil das script scheint sich geändert zu haben. Die Stelle gibt es so nicht mehr.

VG
Tim

Steffen

#271
Zitat von: PatrickR am 23 April 2015, 19:46:50
Mahlzeit!

Habe seit einer Woche mit G-Tags experimentiert und nach einigen schmerzhaften Fehlversuchen (bluez ist etwas launisch) nun ein bislang stabiles und zuverlässiges Setup am Laufen.

Setup:
-Angehängte Datei blescan.pl an geeignetem Ort ablegen
-Execute-Bit setzen
chmod +x blescan.pl
-Ausführung als root durch den FHEM-User erlauben. Eintrag in /etc/sudoers:
fhem ALL=NOPASSWD: /opt/fhem/pr/blescan.pl
-In FHEM wie folgt anlegen:
define Hirschgesicht Presence shellscript "sudo /opt/fhem/pr/blescan.pl de:ad:be:ef:d0:0d 10" 60 60
de:ad:be:ef:d0:0d ist hierbei die Adresse des G-Tags, 10 die Dauer des Scans (siehe unten).

Funktionsweise:
Das Skript führt für den eingestellten Zeitraum einen Scan nach Bluetooth-Low-Energy-Geräten durch (hcitool lescan). Sobald die eingestellte MAC-Adresse gefunden wird, bricht es ab und gibt 1 (=present) zurück. Nach Ablauf der eingestellten Zeit wird 0 (=absent) zurück gegeben. Da bluez sich gelegentlich aufzuhängen scheint ("Set scan parameters failed: Input/output error") wird in diesem Fall ein Reset durchgeführt (hciconfig hci0 reset). Die Aktivität des Skripts lässt sich im Syslog nachvollziehen, wo man auch zwecks Finetuning des Scan-Zeitraums nachvollziehen kann, nach wie vielen Sekunden der Tag gefunden wurde.

Wichtig:
-Unbedingt Formatierung der Bluetooth-Adresse beachten (Doppelpunkte, Kleinschreibung).
-Die G-Tags scheinen Ihre Advertisements nur zu versenden wenn sie nicht(!) mit der iOS-App (vermutlich auch mit anderen Apps/Geräten) gekoppelt sind.
-Das Skript geht davon aus, dass das Bluetooth-Device hci0 ist.

Patrick

Hallo!

Bekomme auf dem Cubi nur ein error zurück, was müste ich den in die Shell eingeben um erstmal zu sehen ob wo es nicht geht?

Bei eingabe von:


root@cubie:~# /opt/fhem/pr/blescan.pl 7c:2f:80:8f:9b:f7 10

Usage: blescan.pl <mac_address> <duration>
Example: blescan.pl de:ad:be:ef:d0:0d 10
root@cubie:~#


bekomme ich diese ausgabe!

In Fhem diese Fehler Meldung:

2015.04.30 20:56:37 2: PRESENCE (Hirschgesicht) - error while processing check: unexpected script output (expected 0 or 1):
Usage: blescan.pl <mac_address> <duration>
Example: blescan.pl de:ad:be:ef:d0:0d 10


mein define:
shellscript "sudo /opt/fhem/pr/blescan.pl 7c:2f:80:8f:9b:f7 10" 60 60

Mfg Steffen

v.i.p.e.r

Buchstaben in der MAC groß schreiben :)

Steffen

Zitat von: v.i.p.e.r am 30 April 2015, 22:02:08
Buchstaben in der MAC groß schreiben :)

Ok hast recht danke...aber im Post stand doch:
Wichtig:
-Unbedingt Formatierung der Bluetooth-Adresse beachten (Doppelpunkte, Kleinschreibung).

habe ich das wohl falsch verstanden?!

Mfg Steffen

PatrickR

Zitat von: Steffen am 30 April 2015, 22:06:38
Ok hast recht danke...aber im Post stand doch:
Wichtig:
-Unbedingt Formatierung der Bluetooth-Adresse beachten (Doppelpunkte, Kleinschreibung).

habe ich das wohl falsch verstanden?!

Mfg Steffen
Da gibt es nichts falsch zu verstehen. Mein Posting war einfach falsch  ;)
Danke, v.i.p.e.r und Steffen. Habe es mal editiert und passe gerade die Fehlermeldung des Skritps an.

Patrick
lepresenced - Tracking von Bluetooth-LE-Tags (Gigaset G-Tag) mittels PRESENCE

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning." - Rich Cook

Atze

RPI 2 und LogiLink BT0015, hab ich auch. Am USB-Hub und direkt am RPI getestet, leider keine Verbesserung. Werde mal sehen ob ich einen anderen Dongle finde.
(MAC muss Grossgeschrieben sein)
FHEM 5.8 , RPi 2 / CUL 3.2 / JEELINKnano - PCA301 / nanoCUL a-culfw 1.05.03
HMS: rm1002, s300th / FHT: fht8v-3, fht80tf
FS20: fs20st, fs20sm8, fs20s8m, fs20rsu, fs20rbm, fs20pce, fs20pcs, fs20ue1, fs20irp2, fs20dwt, fs20rpt-3, fs20str-2, fs20kse
IT: ITDM-250, ITLS-16, ITW-852, IT-1500
G-Data Milight

v.i.p.e.r


Steffen

Kann es sein das es mit dem script nur eine device/define abgefragt werden kann?

Wenn ich eine oder zwei define hinzufüge, bekomme ich sofort ein absent von allen define,
lasse ich nur eins Active bleibt es auf present.

Mfg Steffen

PatrickR

#278
Zitat von: Steffen am 30 April 2015, 22:47:03
Kann es sein das es mit dem script nur eine device/define abgefragt werden kann?

Wenn ich eine oder zwei define hinzufüge, bekomme ich sofort ein absent von allen define,
lasse ich nur eins Active bleibt es auf present.

Mfg Steffen
Hi!

Eigentlich nicht. Habe auch zwei Geräte definiert. Poste doch mal das Syslog mit der neuen Version (s. Folgeposting).

Patrick
lepresenced - Tracking von Bluetooth-LE-Tags (Gigaset G-Tag) mittels PRESENCE

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning." - Rich Cook

PatrickR

Mahlzeit!

Anbei die aktualisierte Version 0.3:
-Groß-/Kleinschreibung der MAC-Adresse wird nun ignoriert.
-Bluetooth-Device ist nun im Skript einstellbar (Zeile 19).
-Es wird nun ausgiebiger geloggt (insb. unerwartete Ausgaben während des Scans).*

* Falls alles funktioniert solltet Ihr im Skript (Zeile 17) den Log Level auf LOG_INFO setzen, damit das Syslog nicht so leidet.

Patrick
lepresenced - Tracking von Bluetooth-LE-Tags (Gigaset G-Tag) mittels PRESENCE

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning." - Rich Cook

Steffen

Hallo!

Habe jetzt es mal die Nacht durch laufen lassen und diseses Ergebnis bekommen:


2015.05.01 06:14:35 1: Timeout for PRESENCE_DoLocalShellScriptScan reached, terminated process 15491
2015.05.01 06:14:35 2: PRESENCE (Liescha) - device could not be checked (retrying in 10 seconds)
2015.05.01 06:14:41 1: Timeout for PRESENCE_DoLocalShellScriptScan reached, terminated process 15580
2015.05.01 06:14:41 2: PRESENCE (Steffen) - device could not be checked (retrying in 10 seconds)
2015.05.01 06:14:53 1: Timeout for PRESENCE_DoLocalShellScriptScan reached, terminated process 15691
2015.05.01 06:14:53 2: PRESENCE (Doreen) - device could not be checked (retrying in 10 seconds)
Can't init device hci0: Connection timed out (110)
2015.05.01 06:15:45 1: Timeout for PRESENCE_DoLocalShellScriptScan reached, terminated process 16207
2015.05.01 06:15:45 2: PRESENCE (Liescha) - device could not be checked after 1 retry (retrying in 10 seconds)
Can't init device hci0: Connection timed out (110)
2015.05.01 06:15:51 1: Timeout for PRESENCE_DoLocalShellScriptScan reached, terminated process 16268
2015.05.01 06:15:51 2: PRESENCE (Steffen) - device could not be checked after 1 retry (retrying in 10 seconds)
2015.05.01 06:15:56 3: Ragow_Kleinmachnow: Read response to Update didn't match any Reading(s)
2015.05.01 06:15:57 3: Ragow_Berlin: Read response to Update didn't match any Reading(s)
Can't init device hci0: Connection timed out (110)
2015.05.01 06:16:03 1: Timeout for PRESENCE_DoLocalShellScriptScan reached, terminated process 16378
2015.05.01 06:16:03 2: PRESENCE (Doreen) - device could not be checked after 1 retry (retrying in 10 seconds)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
2015.05.01 06:16:55 1: Timeout for PRESENCE_DoLocalShellScriptScan reached, terminated process 16641
2015.05.01 06:16:55 2: PRESENCE (Liescha) - device could not be checked after 2 retries (retrying in 10 seconds)
2015.05.01 06:17:02 1: Timeout for PRESENCE_DoLocalShellScriptScan reached, terminated process 16645
2015.05.01 06:17:02 2: PRESENCE (Steffen) - device could not be checked after 2 retries (retrying in 10 seconds)
Can't init device hci0: Connection timed out (110)
2015.05.01 06:17:05 2: PRESENCE (Doreen) - check returned a valid result after 2 unsuccesful retries
2015.05.01 06:17:05 3: Notify gesendet
Can't init device hci0: Connection timed out (110)
2015.05.01 06:17:16 2: PRESENCE (Liescha) - check returned a valid result after 3 unsuccesful retries
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
2015.05.01 06:18:07 2: PRESENCE (Steffen) - check returned a valid result after 3 unsuccesful retries
2015.05.01 06:18:07 3: Notify gesendet
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
2015.05.01 06:18:55 3: HCS ThermeControl Found 6 Device(s): 0 FHT, 6 HM-CC-TC, 0 MAX, demand: 0, idle: 6, ignored: 0, excluded: 0, unknown: 0, eco: no overdrive: no
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
2015.05.01 06:21:57 1: Timeout for PRESENCE_DoLocalShellScriptScan reached, terminated process 17247
2015.05.01 06:21:57 2: PRESENCE (Liescha) - device could not be checked (retrying in 10 seconds)
2015.05.01 06:21:57 3: Ragow_Kleinmachnow: Read response to Update didn't match any Reading(s)
2015.05.01 06:21:58 3: Ragow_Berlin: Read response to Update didn't match any Reading(s)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
2015.05.01 06:22:23 2: PRESENCE (Liescha) - check returned a valid result after 1 unsuccesful retry
2015.05.01 06:22:28 1: Timeout for PRESENCE_DoLocalShellScriptScan reached, terminated process 17540
2015.05.01 06:22:28 2: PRESENCE (Steffen) - device could not be checked (retrying in 10 seconds)
2015.05.01 06:23:38 1: Timeout for PRESENCE_DoLocalShellScriptScan reached, terminated process 17893
2015.05.01 06:23:38 2: PRESENCE (Steffen) - device could not be checked after 1 retry (retrying in 10 seconds)
Can't init device hci0: Connection timed out (110)
2015.05.01 06:23:56 3: HCS ThermeControl Found 6 Device(s): 0 FHT, 6 HM-CC-TC, 0 MAX, demand: 0, idle: 6, ignored: 0, excluded: 0, unknown: 0, eco: no overdrive: no
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
2015.05.01 06:24:48 1: Timeout for PRESENCE_DoLocalShellScriptScan reached, terminated process 18505
2015.05.01 06:24:48 2: PRESENCE (Steffen) - device could not be checked after 2 retries (retrying in 10 seconds)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
2015.05.01 06:25:18 2: PRESENCE (Steffen) - check returned a valid result after 3 unsuccesful retries
2015.05.01 06:25:19 3: Notify gesendet
Can't init device hci0: Connection timed out (110)
2015.05.01 06:26:13 1: Timeout for PRESENCE_DoLocalShellScriptScan reached, terminated process 18983
2015.05.01 06:26:13 2: PRESENCE (Liescha) - device could not be checked (retrying in 10 seconds)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
2015.05.01 06:26:44 2: PRESENCE (Liescha) - check returned a valid result after 1 unsuccesful retry
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
2015.05.01 06:27:57 3: Ragow_Kleinmachnow: Read response to Update didn't match any Reading(s)
2015.05.01 06:27:58 3: Ragow_Berlin: Read response to Update didn't match any Reading(s)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
2015.05.01 06:28:56 3: HCS ThermeControl Found 6 Device(s): 0 FHT, 6 HM-CC-TC, 0 MAX, demand: 1, idle: 5, ignored: 0, excluded: 0, unknown: 0, eco: no overdrive: no
2015.05.01 06:28:56 3: CUL_HM set Therme on
2015.05.01 06:28:57 3: Notify gesendet
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
2015.05.01 06:33:42 3: WW_AT: Keine Warnmeldung für die gesuchte Region vorhanden.
Can't init device hci0: Connection timed out (110)
2015.05.01 06:33:56 3: HCS ThermeControl Found 6 Device(s): 0 FHT, 6 HM-CC-TC, 0 MAX, demand: 1, idle: 5, ignored: 0, excluded: 0, unknown: 0, eco: no overdrive: no
2015.05.01 06:33:57 3: Ragow_Kleinmachnow: Read response to Update didn't match any Reading(s)
2015.05.01 06:33:58 3: Ragow_Berlin: Read response to Update didn't match any Reading(s)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
2015.05.01 06:38:56 3: HCS ThermeControl Found 6 Device(s): 0 FHT, 6 HM-CC-TC, 0 MAX, demand: 1, idle: 5, ignored: 0, excluded: 0, unknown: 0, eco: no overdrive: no
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
2015.05.01 06:39:57 3: Ragow_Kleinmachnow: Read response to Update didn't match any Reading(s)
2015.05.01 06:39:57 3: Ragow_Berlin: Read response to Update didn't match any Reading(s)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
2015.05.01 06:43:56 3: HCS ThermeControl Found 6 Device(s): 0 FHT, 6 HM-CC-TC, 0 MAX, demand: 1, idle: 5, ignored: 0, excluded: 0, unknown: 0, eco: no overdrive: no
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
2015.05.01 06:45:57 3: Ragow_Kleinmachnow: Read response to Update didn't match any Reading(s)
2015.05.01 06:45:58 3: Ragow_Berlin: Read response to Update didn't match any Reading(s)
Can't init device hci0: Connection timed out (110)
2015.05.01 06:47:39 1: Timeout for PRESENCE_DoLocalShellScriptScan reached, terminated process 21744
2015.05.01 06:47:39 2: PRESENCE (Liescha) - device could not be checked (retrying in 10 seconds)
2015.05.01 06:47:49 1: Timeout for PRESENCE_DoLocalShellScriptScan reached, terminated process 21843
2015.05.01 06:47:49 2: PRESENCE (Steffen) - device could not be checked (retrying in 10 seconds)
2015.05.01 06:47:59 1: Timeout for PRESENCE_DoLocalShellScriptScan reached, terminated process 21942
2015.05.01 06:47:59 2: PRESENCE (Doreen) - device could not be checked (retrying in 10 seconds)
2015.05.01 06:48:49 1: Timeout for PRESENCE_DoLocalShellScriptScan reached, terminated process 22420
2015.05.01 06:48:49 2: PRESENCE (Liescha) - device could not be checked after 1 retry (retrying in 10 seconds)
2015.05.01 06:48:56 3: HCS ThermeControl Found 6 Device(s): 0 FHT, 6 HM-CC-TC, 0 MAX, demand: 1, idle: 5, ignored: 0, excluded: 0, unknown: 0, eco: no overdrive: no
2015.05.01 06:48:59 1: Timeout for PRESENCE_DoLocalShellScriptScan reached, terminated process 22521
2015.05.01 06:48:59 2: PRESENCE (Steffen) - device could not be checked after 1 retry (retrying in 10 seconds)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
2015.05.01 06:49:15 2: PRESENCE (Doreen) - check returned a valid result after 1 unsuccesful retry
2015.05.01 06:49:15 3: Notify gesendet
Can't init device hci0: Connection timed out (110)
2015.05.01 06:49:24 2: PRESENCE (Liescha) - check returned a valid result after 2 unsuccesful retries
2015.05.01 06:50:09 1: Timeout for PRESENCE_DoLocalShellScriptScan reached, terminated process 23015
2015.05.01 06:50:09 2: PRESENCE (Steffen) - device could not be checked after 2 retries (retrying in 10 seconds)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
2015.05.01 06:51:21 1: Timeout for PRESENCE_DoLocalShellScriptScan reached, terminated process 23488
2015.05.01 06:51:21 2: PRESENCE (Steffen) - device could not be checked after 3 retries (resuming normal operation)
2015.05.01 06:51:24 1: Timeout for PRESENCE_DoLocalShellScriptScan reached, terminated process 23493
2015.05.01 06:51:24 2: PRESENCE (Liescha) - device could not be checked (retrying in 10 seconds)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
2015.05.01 06:51:58 3: Ragow_Berlin: Read response to Update didn't match any Reading(s)
2015.05.01 06:51:58 3: Ragow_Kleinmachnow: Read response to Update didn't match any Reading(s)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
2015.05.01 06:52:24 2: PRESENCE (Steffen) - check returned a valid result after 4 unsuccesful retries
2015.05.01 06:52:24 3: Notify gesendet
2015.05.01 06:52:34 1: Timeout for PRESENCE_DoLocalShellScriptScan reached, terminated process 23919
2015.05.01 06:52:34 2: PRESENCE (Liescha) - device could not be checked after 1 retry (retrying in 10 seconds)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
2015.05.01 06:53:44 1: Timeout for PRESENCE_DoLocalShellScriptScan reached, terminated process 24041
2015.05.01 06:53:44 2: PRESENCE (Liescha) - device could not be checked after 2 retries (retrying in 10 seconds)
2015.05.01 06:53:56 3: HCS ThermeControl Found 6 Device(s): 0 FHT, 6 HM-CC-TC, 0 MAX, demand: 1, idle: 5, ignored: 0, excluded: 0, unknown: 0, eco: no overdrive: no
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
2015.05.01 06:54:14 2: PRESENCE (Liescha) - check returned a valid result after 3 unsuccesful retries
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
2015.05.01 06:55:03 3: CUL_HM set Wz_DLampeDecke on
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
2015.05.01 06:57:58 3: Ragow_Kleinmachnow: Read response to Update didn't match any Reading(s)
2015.05.01 06:57:58 3: Ragow_Berlin: Read response to Update didn't match any Reading(s)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
2015.05.01 06:58:56 3: HCS ThermeControl Found 6 Device(s): 0 FHT, 6 HM-CC-TC, 0 MAX, demand: 1, idle: 5, ignored: 0, excluded: 0, unknown: 0, eco: no overdrive: no
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)
Can't init device hci0: Connection timed out (110)


Es kommt nach einem Kompletten Restart des Cubi kurz zu einem Present geht dann aber nach ca.1 Minute wieder in Absent über und das blieb dann so die Ganze Nacht so!

Wenn ich den Cubi wieder neu starte kommt das gleiche Ergebnis, kurz Present dann dauerhaft Absent...

Vielleicht eine Idee was man ändern könnte oder wo ich nach schauen könnte woran es liegt?

Mfg Steffen

PatrickR

#281
Mahlzeit!

Version 0.4 von blescan.pl.
Wenn hcitool nun abbricht ohne überhaupt zu scannen wird ein entsprechender Fehler im Syslog und STDOUT erzeugt, der auch in FHEM sichtbar ist. Zuvor wurde in bestimmten Fällen "absent" zurückgemeldet, was nicht wirklich hilfreich war. Das passierte bei mir, wenn das Bluetooth-Device komplett weg war. An dieser Stelle vielen Dank für dieses bluez-Feature.

Patrick
lepresenced - Tracking von Bluetooth-LE-Tags (Gigaset G-Tag) mittels PRESENCE

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning." - Rich Cook

Markus M.

Ich habe aktuell noch das Problem dass das Script plötzlich mehrmals läuft und so hci1 komplett blockiert.
Als kleiner Hinweis: meine Tags brauchen eine Scantime von 60 Sekunden.
Aktuell weder Smarthome noch FHEM vorhanden

PatrickR

#283
Zitat von: Markus M. am 02 Mai 2015, 18:03:52
Ich habe aktuell noch das Problem dass das Script plötzlich mehrmals läuft und so hci1 komplett blockiert.
Oha! Wie äussert sich das Blockieren von hci1?

Zitat von: Markus M. am 02 Mai 2015, 18:03:52
Als kleiner Hinweis: meine Tags brauchen eine Scantime von 60 Sekunden.
In welchen Intervallen lässt Du das Presence-Modul in FHEM das Skript aufrufen?
Wie viele Geräte fragt FHEM mit blescan ab?
Hast Du die G-Tags mit einem Gerät gepairt?

Patrick

/Edit: Habe mal eine kleine Statistik (3 G-Tags) gemacht:
Anzahl|Zeit bis zur Antwort
1730 0
1020 1
273 2
51 3
15 4
9 5
2 6
1 9
1 12

d. h. in den meisten Fällen ist die das Advertisement nach weniger als einer Sekunde da.

Von unterwegs gesendet.
lepresenced - Tracking von Bluetooth-LE-Tags (Gigaset G-Tag) mittels PRESENCE

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning." - Rich Cook

Steffen

Hallo!

Habe grundsätzlich bei meinem 3 G-tag auf dem cubi "error"
oder "Timeout"...

Hier mal ein paar Fehler Meldungen, vielleicht helfen die ja weiter?!



2015.05.03 13:01:08 2: PRESENCE (Steffen) - error while processing check: unexpected script output (expected 0 or 1): ERROR: hcitool exited before scanning.

2015.05.03 12:49:29 2: PRESENCE (Doreen) - error while processing check: unexpected script output (expected 0 or 1): ERROR: hcitool exited before scanning. Please check syslog!

2015.05.03 12:53:36 1: Timeout for PRESENCE_DoLocalShellScriptScan reached, terminated process 6258