lepresenced und G-Tags - nach einiger Zeit nur noch absent/unreachable

Begonnen von stiefl, 18 August 2017, 13:00:51

Vorheriges Thema - Nächstes Thema

RoB81

Hallo,

danke für die schnelle Antwort.
Nach meinem Neustart heute Morgen lief zunächst alles. Jetzt eben - aus heiterem Himmel - sind wieder beide G-Tags absent.
Ich habe das LOG_Level gerade erst hochgestellt. Aber ich habe dennoch mal einen LOG hier reingepackt. Steht da etwas hilfreiches drin?

pi@raspberrypi:~ $ grep lepresenced /var/log/syslog
Apr  6 09:46:15 raspberrypi systemd[1]: Stopping lepresenced...
Apr  6 09:46:38 raspberrypi systemd[1]: Starting lepresenced...
Apr  6 09:46:48 raspberrypi systemd[1]: Started lepresenced.
Apr  6 11:57:53 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: hcitool exited, retrying...
Apr  6 12:30:02 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: Received unknown output: 'Disable scan failed: Connection timed out'!
Apr  6 12:30:02 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: hcitool exited, retrying...
Apr  6 12:30:13 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: Received unknown output: 'Set scan parameters failed: Connection timed out'!
Apr  6 12:30:13 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: hcitool exited, retrying...
Apr  6 12:30:24 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: Received unknown output: 'Set scan parameters failed: Connection timed out'!
Apr  6 12:30:24 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: hcitool exited, retrying...
Apr  6 12:30:35 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: Received unknown output: 'Set scan parameters failed: Connection timed out'!
Apr  6 12:30:35 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: hcitool exited, retrying...
Apr  6 12:30:46 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: Received unknown output: 'Set scan parameters failed: Connection timed out'!
Apr  6 12:30:46 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: hcitool exited, retrying...
Apr  6 12:30:57 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: Received unknown output: 'Set scan parameters failed: Connection timed out'!
Apr  6 12:30:57 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: hcitool exited, retrying...
Apr  6 12:31:08 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: Received unknown output: 'Set scan parameters failed: Connection timed out'!
Apr  6 12:31:08 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: hcitool exited, retrying...
Apr  6 12:31:19 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: Received unknown output: 'Set scan parameters failed: Connection timed out'!
Apr  6 12:31:19 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: hcitool exited, retrying...
Apr  6 12:31:30 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: Received unknown output: 'Set scan parameters failed: Connection timed out'!
Apr  6 12:31:30 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: hcitool exited, retrying...
Apr  6 12:31:41 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: Received unknown output: 'Set scan parameters failed: Connection timed out'!
Apr  6 12:31:41 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: hcitool exited, retrying...
Apr  6 12:31:52 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: Received unknown output: 'Set scan parameters failed: Connection timed out'!
Apr  6 12:31:52 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: hcitool exited, retrying...
Apr  6 12:32:03 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: Received unknown output: 'Set scan parameters failed: Connection timed out'!
Apr  6 12:32:03 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: hcitool exited, retrying...
Apr  6 12:32:14 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: Received unknown output: 'Set scan parameters failed: Connection timed out'!
Apr  6 12:32:14 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: hcitool exited, retrying...
Apr  6 12:32:25 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: Received unknown output: 'Set scan parameters failed: Connection timed out'!
Apr  6 12:32:25 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: hcitool exited, retrying...
Apr  6 12:32:36 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: Received unknown output: 'Set scan parameters failed: Connection timed out'!
Apr  6 12:32:36 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: hcitool exited, retrying...
Apr  6 12:32:47 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: Received unknown output: 'Set scan parameters failed: Connection timed out'!
Apr  6 12:32:47 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: hcitool exited, retrying...
Apr  6 12:32:58 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: Received unknown output: 'Set scan parameters failed: Connection timed out'!
Apr  6 12:32:58 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: hcitool exited, retrying...
Apr  6 12:33:09 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: Received unknown output: 'Set scan parameters failed: Connection timed out'!
Apr  6 12:33:09 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: hcitool exited, retrying...
Apr  6 12:33:20 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: Received unknown output: 'Set scan parameters failed: Connection timed out'!
Apr  6 12:33:20 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: hcitool exited, retrying...
Apr  6 12:33:31 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: Received unknown output: 'Set scan parameters failed: Connection timed out'!
Apr  6 12:33:31 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: hcitool exited, retrying...
Apr  6 12:33:42 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: Received unknown output: 'Set scan parameters failed: Connection timed out'!
Apr  6 12:33:42 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: hcitool exited, retrying...
Apr  6 12:33:53 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: Received unknown output: 'Set scan parameters failed: Connection timed out'!
Apr  6 12:33:53 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: hcitool exited, retrying...
Apr  6 12:34:04 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: Received unknown output: 'Set scan parameters failed: Connection timed out'!
Apr  6 12:34:04 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: hcitool exited, retrying...
Apr  6 12:34:15 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: Received unknown output: 'Set scan parameters failed: Connection timed out'!
Apr  6 12:34:15 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: hcitool exited, retrying...
Apr  6 12:34:27 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: Received unknown output: 'Set scan parameters failed: Connection timed out'!
Apr  6 12:34:27 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: hcitool exited, retrying...
Apr  6 12:34:38 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: Received unknown output: 'Set scan parameters failed: Connection timed out'!
Apr  6 12:34:38 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: hcitool exited, retrying...
Apr  6 12:34:49 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: Received unknown output: 'Set scan parameters failed: Connection timed out'!
Apr  6 12:34:49 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: hcitool exited, retrying...
Apr  6 12:35:00 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: Received unknown output: 'Set scan parameters failed: Connection timed out'!
Apr  6 12:35:00 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: hcitool exited, retrying...
Apr  6 12:35:11 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: Received unknown output: 'Set scan parameters failed: Connection timed out'!
Apr  6 12:35:11 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: hcitool exited, retrying...
Apr  6 12:35:22 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: Received unknown output: 'Set scan parameters failed: Connection timed out'!
Apr  6 12:35:22 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: hcitool exited, retrying...
Apr  6 12:35:33 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: Received unknown output: 'Set scan parameters failed: Connection timed out'!
Apr  6 12:35:33 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: hcitool exited, retrying...
Apr  6 12:35:44 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: Received unknown output: 'Set scan parameters failed: Connection timed out'!
Apr  6 12:35:44 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: hcitool exited, retrying...
Apr  6 12:35:55 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: Received unknown output: 'Set scan parameters failed: Connection timed out'!
Apr  6 12:35:55 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: hcitool exited, retrying...
Apr  6 12:36:06 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: Received unknown output: 'Set scan parameters failed: Connection timed out'!
Apr  6 12:36:06 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: hcitool exited, retrying...
Apr  6 12:36:17 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: Received unknown output: 'Set scan parameters failed: Connection timed out'!
Apr  6 12:36:17 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: hcitool exited, retrying...
Apr  6 12:36:28 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: Received unknown output: 'Set scan parameters failed: Connection timed out'!
Apr  6 12:36:28 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: hcitool exited, retrying...
Apr  6 12:36:39 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: Received unknown output: 'Set scan parameters failed: Connection timed out'!
Apr  6 12:36:39 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: hcitool exited, retrying...
Apr  6 12:36:50 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: Received unknown output: 'Set scan parameters failed: Connection timed out'!
Apr  6 12:36:50 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: hcitool exited, retrying...
Apr  6 12:37:01 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: Received unknown output: 'Set scan parameters failed: Connection timed out'!
Apr  6 12:37:01 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: hcitool exited, retrying...
Apr  6 12:37:12 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: Received unknown output: 'Set scan parameters failed: Connection timed out'!
Apr  6 12:37:12 raspberrypi lepresenced[491]: [tid:1] main::bluetooth_scan_threa                                                                                                                                                             d: hcitool exited, retrying...


Ich nutze Bluetooth auf dem Pi nur für die Anwesenheitserkennung. Ich habe auch keine weiteren Module (z.B: Batterielebensdauer) installiert. Das System ist noch relativ frisch aufgesetzt. Es laufen nur FHEM und Homebridge drauf.

Gibt es für die Anwesenheitserkennung eine stabilere Alternative? Am besten mit einem hohen WAF. Hab im Netz hier noch diese Anleitung gefunden: https://haus-automatisierung.com/hardware/fhem/2016/08/02/fhem-tutorial-reihe-part-15-anwesenheit-mit-bluetooth-le-tag-ermitteln.html

Könnte ich damit mein Problem lösen??

Wenn ich noch weitere Informationen liefern soll, mache ich das gerne

Vielen Dank!

PS: Hab, nachdem der Fehler nun wieder aufgetreten ist, den Pi einmal neugestartet, jetzt ist nun erstmal wieder Ruhe.

RoB81

Und hier ist mein Problem wieder!
Nach ca. 49 min., in denen es gut gegangen ist, sind nun wieder beide G-TAGs absent.

Das log sieht gleich aus:

Apr  6 12:43:06 raspberrypi systemd[1]: Stopping lepresenced...
Apr  6 12:43:29 raspberrypi systemd[1]: Starting lepresenced...
Apr  6 12:43:39 raspberrypi systemd[1]: Started lepresenced.
Apr  6 13:06:38 raspberrypi lepresenced[546]: [tid:1] main::bluetooth_scan_thread: hcitool exited, retrying...
Apr  6 13:16:06 raspberrypi lepresenced[546]: [tid:1] main::bluetooth_scan_thread: hcitool exited, retrying...
Apr  6 13:32:00 raspberrypi lepresenced[546]: [tid:1] main::bluetooth_scan_thread: hcitool exited, retrying...


Also, mittlerweile bin ich offen für alternative Realisierungen! Gibt es da etwas, wie ich mittels Bluetooth TAGs die Anwesenheit bzw. Abwesenheit an FHEM übermitteln kann, welche stabil funktioniert?

dkreutz

Kommt mir alles bekannt vor, bei mir haben folgende Maßnahmen geholfen:
1) die lepresenced Version von Beitrag #99
2) Deaktivierung des RPI-eigenen Bluetooth und Nutzung eines Bluetooth-USB-Dongle

Läuft seit Mitte Januar stabil. Probleme seitdem lagen an externen Faktoren: leere Batterie im G-Tag, ungünstige Positionierung/Abschirmung des G-Tag
Raspberry Pi3B+ (Bullseye) / JeeLink868v3c (LaCrosse), nanoCUL433 (a-culfw V1.24.02), HM-MOD-UART (1.4.1), TEK603, MapleCUL / diverse Sensoren/Sender/Aktoren von Technoline, Intertechno, Shelly, Homematic und MAX!, Froggit Wetterstation, Luftdaten.info / Autor des fhem-skill für Mycroft.ai

RoB81

@dkreutz: Klingt nach nem Plan 😉

Welchen Dongle nutzt du denn?

dkreutz

Raspberry Pi3B+ (Bullseye) / JeeLink868v3c (LaCrosse), nanoCUL433 (a-culfw V1.24.02), HM-MOD-UART (1.4.1), TEK603, MapleCUL / diverse Sensoren/Sender/Aktoren von Technoline, Intertechno, Shelly, Homematic und MAX!, Froggit Wetterstation, Luftdaten.info / Autor des fhem-skill für Mycroft.ai

RoB81

Zitat von: dkreutz am 06 April 2020, 16:36:27
So einen: https://eckstein-shop.de/Bluetooth-40-USB-Adapter-Empfaenger-Dongle-fuer-PC-Laptop-Windows-10-8-7-XP
Es dürfte aber auch jeder andere BT4.0 Dongle funktionieren.

Danke!
Gibt es irgendwo eine Anleitung, wie ich das Ganze dann umkonfigurieren muss? Also ich muss ja sicherlich das inter BT-Modul deaktivieren und den Dongle aktivieren, richtig?
Und kann bzw. muss ich dann in FHEM von lan-bluetooth auf local-bluetooth wechseln? Sorry, für die vielleicht blöden Fragen..

Vielen Dank schon mal für die Hilfe

PatrickR

Hi!

Zitat von: RoB81 am 06 April 2020, 13:46:53
Das log sieht gleich aus:

Apr  6 12:43:06 raspberrypi systemd[1]: Stopping lepresenced...
Apr  6 12:43:29 raspberrypi systemd[1]: Starting lepresenced...
Apr  6 12:43:39 raspberrypi systemd[1]: Started lepresenced.
Apr  6 13:06:38 raspberrypi lepresenced[546]: [tid:1] main::bluetooth_scan_thread: hcitool exited, retrying...
Apr  6 13:16:06 raspberrypi lepresenced[546]: [tid:1] main::bluetooth_scan_thread: hcitool exited, retrying...
Apr  6 13:32:00 raspberrypi lepresenced[546]: [tid:1] main::bluetooth_scan_thread: hcitool exited, retrying...

Uff, das sieht ja übel aus. Diese Meldungen "hcitool exited" sollten eigentlich überhaupt nicht kommen. In der Häufigkeit (übrigens auch schon in Deinem vorigen Posting) habe ich das noch nicht gesehen. Das Setzen des Loglevel hat übrigens scheinbar nicht funktioniert.


Zitat von: RoB81 am 06 April 2020, 12:48:38
Gibt es für die Anwesenheitserkennung eine stabilere Alternative? Am besten mit einem hohen WAF. Hab im Netz hier noch diese Anleitung gefunden: https://haus-automatisierung.com/hardware/fhem/2016/08/02/fhem-tutorial-reihe-part-15-anwesenheit-mit-bluetooth-le-tag-ermitteln.html
Naja, da es bei Deinen obigen Problemen schon mit lepresenced deftige Probleme gibt, würde ich ehrlich gesagt nicht davon ausgehen, dass Dir die hemdsärmlige Bastelvariante hilft. Zumal der Autor selbst sagt, dass sie nicht mehr aktuell ist und Du den Kurs kaufen sollst.

Zitat von: dkreutz am 06 April 2020, 14:52:44
Kommt mir alles bekannt vor, bei mir haben folgende Maßnahmen geholfen:
1) die lepresenced Version von Beitrag #99
2) Deaktivierung des RPI-eigenen Bluetooth und Nutzung eines Bluetooth-USB-Dongle

Läuft seit Mitte Januar stabil. Probleme seitdem lagen an externen Faktoren: leere Batterie im G-Tag, ungünstige Positionierung/Abschirmung des G-Tag
Aha! Ich habe dazu leider nie Feedback bekommen und die Version daher auch nie released. Kannst Du mal die Ausgabe vom folgenden Befehl posten:

ps aux|grep [l]epresenced;sudo zgrep "telling hcidump to restart" /var/log/syslog*


In Deinem Fall RoB81 würde ich nicht davon ausgehen, dass Dir die neue lepresenced-Version groß hilft, da ist irgendwo tiefer der Wurm drin, Kollisionen mit anderen Bluetooth-Diensten, Kernel, Hardware... Der Ansatz mit dem externen Dongle ist sicherlich der Erfolg versprechendste.

Zitat von: RoB81 am 06 April 2020, 17:36:33
Gibt es irgendwo eine Anleitung, wie ich das Ganze dann umkonfigurieren muss? Also ich muss ja sicherlich das inter BT-Modul deaktivieren und den Dongle aktivieren, richtig?
Und kann bzw. muss ich dann in FHEM von lan-bluetooth auf local-bluetooth wechseln? Sorry, für die vielleicht blöden Fragen..
Ich würde es erstmal probieren, das interne Bluetooth-Modul in Ruhe zu lassen. Wenn Dein Problem von Kollisionen kommt, dann sollen sich die Verursacher jetzt nicht noch auf den schönen neuen Dongle stürzen.

Bevor Du den Dongle ansteckst, führe mal folgenden Befehl aus:

sudo hcitool dev

Ausgabe dann z. B.:

Devices:
hci0 B8:27:EB:BD:6F:28

Das heißt, Dein aktueller, interner Dongle hat die Adresse B8:27:EB:BD:6F:28.

Wenn Du jetzt den neuen Dongle ansteckst und den Befehl erneut ausführst sollte es noch eine zusätzliche Zeile mit hci1 und einer anderen Adresse geben. In dem Fall dann in /etc/default/lepresenced die Zeile:

#BLUETOOTH_DEVICE="hci0"

in

BLUETOOTH_DEVICE="hci1"

ändern (Das Nummernzeichen am Anfang beachten.) und lepresenced neu starten.

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

dkreutz

Zitat von: PatrickR am 06 April 2020, 18:39:32
Aha! Ich habe dazu leider nie Feedback bekommen und die Version daher auch nie released. Kannst Du mal die Ausgabe vom folgenden Befehl posten:

ps aux|grep [l]epresenced;sudo zgrep "telling hcidump to restart" /var/log/syslog*


Ich hatte mir immer vorgenommen dazu hier ein Feedback zu geben, aber da ist anscheinend immer was dazwischen gekommen...
Hier das Ergebnis:
$ ps aux|grep [l]epresenced;sudo zgrep "telling hcidump to restart" /var/log/syslog*
root     30637  1.6  0.7  35220  7084 ?        Ssl  Mar04 763:22 /usr/bin/perl /usr/sbin/lepresence --device hci0 --listenaddress 0.0.0.0 --listenport 5333 --loglevel LOG_WARNING
Raspberry Pi3B+ (Bullseye) / JeeLink868v3c (LaCrosse), nanoCUL433 (a-culfw V1.24.02), HM-MOD-UART (1.4.1), TEK603, MapleCUL / diverse Sensoren/Sender/Aktoren von Technoline, Intertechno, Shelly, Homematic und MAX!, Froggit Wetterstation, Luftdaten.info / Autor des fhem-skill für Mycroft.ai

RoB81

Hallo und nochmal vielen Dank für die umfassende Hilfe.

Ich frag mich aber wirklich, wieso das bei mir so schief läuft. Zumal ich den Raspi gestern komplett neu aufgesetzt habe. Außer FHEM und Homebridge habe ich dort nichts installiert.
Bei der Installation von FHEM bin ich übrigens nach der Anleitung im FHEMWiki vorgegangen. Dort kommt dann ja auch ein Punkt "Verwendung UART für Zusatzmodule". Dort soll man u.a. ttyAM0 deaktivieren, UART aktivieren und umkonfigurieren. Hierbei wird dann die serielle Schnittstelle mit der Bluetooth Schnittstelle getauscht.

Ich hab von alle überhaupt keine Ahnung, habe mich während meiner Installation aber an die Schritte gehalten. Jetzt habe ich diese Schritte im Verdacht ursächlich für meiner Probleme zu sein. Ich hab jetzt mal die Umkonfiguration der /boot/config.txt rückgängig gemacht und werde beobachten, ob sich meine Probleme damit erledigt haben.

Wenn ich das richtig verstanden habe, sind diese Schritte nur erforderlich, wenn man Aufsteckmodule für den GPIO Port verwenden will, das habe ich nicht vor!

Ist das was ich mache totaler Quatsch oder kann man das ruhig mal versuchen?

PatrickR

Hi!

Zitat von: RoB81 am 06 April 2020, 21:15:51
Bei der Installation von FHEM bin ich übrigens nach der Anleitung im FHEMWiki vorgegangen. Dort kommt dann ja auch ein Punkt "Verwendung UART für Zusatzmodule". Dort soll man u.a. ttyAM0 deaktivieren, UART aktivieren und umkonfigurieren. Hierbei wird dann die serielle Schnittstelle mit der Bluetooth Schnittstelle getauscht.
[...]
Wenn ich das richtig verstanden habe, sind diese Schritte nur erforderlich, wenn man Aufsteckmodule für den GPIO Port verwenden will, das habe ich nicht vor!

Ist das was ich mache totaler Quatsch oder kann man das ruhig mal versuchen?
Ich bin da zugegebenermaßen kein Experte aber ich verstehe das Wiki auch so, dass es um Aufsteckmodule für den Pinheader geht. Gerade core_freq liest sich, als könnte es Nebenwirkungen haben. Ich würde es mal ohne die Einstellungen probieren.

Patrick

/Edit:
Zitat# serielle Schnittstelle aktivieren und mit BT Schnittstelle tauschen
Also die Einstellung hat definitiv Auswirkungen auf Bluetooth.

/Edit2:
Wenn Du zufällig in Berlin wohnst kann ich mal schauen, ob ich noch nen BT-Dongle rumfliegen habe.
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

ToKa

Zitat von: PatrickR am 06 April 2020, 18:39:32
Aha! Ich habe dazu leider nie Feedback bekommen und die Version daher auch nie released. Kannst Du mal die Ausgabe vom folgenden Befehl posten:

Hallo Patrick,

ich hatte diese Version gar nicht mitbekommen und teste sie jetzt mal. Die Aussetzer bei mir sind zwar nach den Änderungen der Einstellungen für die serielle Schnittstelle (baud Rate) bei mir sehr selten geworden, aber immer noch nicht ganz weg.

Vielleicht hilft ja der restart in der neuen Version.

Beste Grüße
Torsten
RaspberryPi3 mit RaZberry2 und Conbee II
Fibaro: FGWPE/F-101 Switch & FIBARO System FGWPE/F Wall Plug Gen5, FGSD002 Smoke Sensor
EUROtronic: SPIRIT Wall Radiator Thermostat Valve Control
Shelly2.5 Rollladenaktoren
Zipato Bulb 2, Osram und InnrLight

PatrickR

Hi!

Zitat von: ToKa am 07 April 2020, 11:58:58
ich hatte diese Version gar nicht mitbekommen und teste sie jetzt mal. Die Aussetzer bei mir sind zwar nach den Änderungen der Einstellungen für die serielle Schnittstelle (baud Rate) bei mir sehr selten geworden, aber immer noch nicht ganz weg.
Die Version war eigentlich für das spezielle Problem eines Nutzers. Jetzt wäre interessant, ob es auch bei anderen auftritt, daher danke für das Testangebot. Was genau hattest Du denn an der Baudrate geändert? Könnte für RoB81 interessant sein.

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

ToKa

RaspberryPi3 mit RaZberry2 und Conbee II
Fibaro: FGWPE/F-101 Switch & FIBARO System FGWPE/F Wall Plug Gen5, FGSD002 Smoke Sensor
EUROtronic: SPIRIT Wall Radiator Thermostat Valve Control
Shelly2.5 Rollladenaktoren
Zipato Bulb 2, Osram und InnrLight

PatrickR

Zitat von: ToKa am 07 April 2020, 11:58:58
Die Aussetzer bei mir sind zwar nach den Änderungen der Einstellungen für die serielle Schnittstelle (baud Rate) bei mir sehr selten geworden, aber immer noch nicht ganz weg.

Zitat von: ToKa am 07 April 2020, 12:48:44
Siehe mein Post #85 am: 02 Oktober 2019, 21:29:27
Damit nicht alle die Änderung der Baudrate suchen müssen:
https://forum.fhem.de/index.php/topic,75559.msg980043.html#msg980043

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

_fhemuser_

Zitat von: PatrickR am 04 April 2020, 12:49:15
Hi!

Dem Log nach zu urteilen dürfte es überhaupt nicht funktionieren. Poste doch mal bitte ein Log mit LOG_DEBUG (/etc/default/lepresenced anpassen.).

Ansonsten wird leider sehr oft berichtet, dass es mit dem internen Bluetooth-Modul des RPi4 Probleme gibt. Der Ansatz ist üblicherweise ein billiger USB-Dongle.

Patrick
Hallo Patrick,

es liegt wohl an dem internen BT Modul. In der Logdatei kommen im Sekundentakt die Fehler:Apr  7 15:14:47 raspi4 lepresenced[29685]: [tid:1] main::bluetooth_scan_thread: hcitool exited, retrying...
Apr  7 15:14:48 raspi4 lepresenced[29685]: [tid:2] main::bluetooth_dump_thread: hcidump exited, retrying...
Apr  7 15:14:48 raspi4 lepresenced[29685]: [tid:1] main::bluetooth_scan_thread: Received unknown output: 'Invalid device: No such device'!
zwischendurch so zwei mal pro Stunde auch eine positve Meldung, dass zB ein Beacon erkannt wurde.

Ich teste mal mit einem anderen Bluetoothmodul oder verwende für die Beacons ein ESP32.

VG
_fhemuser_
fhem in der aktuellsten Version auf:
Raspberry 4 mit SSD | fhem2fhem | NanoCul433 Selbstbau | NanoCul868 Selbstbau | DbLog | MAX! | zigbee2MQTT | homebridge | alexa
inkl zigbee2MQTT Server, Unifi-Server

Raspberry 4 mit SD Karte | fhem2fhem | motioneye